Skip to content

Commit

Permalink
bgpd: speed up retry connection
Browse files Browse the repository at this point in the history
When configuring an ipv6 link local bgp peering, the interface
configuration may be refreshed and the socket is not updated.

Add a trigger in the interface configuration handler, and
reset the bgp peer upon the instance up event.

Signed-off-by: Philippe Guibert <[email protected]>
  • Loading branch information
pguibert6WIND committed Jul 12, 2023
1 parent 019c042 commit 64158b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions bgpd/bgp_vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -7604,6 +7604,9 @@ static int peer_interface_vty(struct vty *vty, const char *ip_str,
else
peer_interface_unset(peer);

if (!BGP_PEER_START_SUPPRESSED(peer))
BGP_EVENT_ADD(peer, BGP_Start);

return CMD_SUCCESS;
}

Expand Down
4 changes: 3 additions & 1 deletion bgpd/bgpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -3721,8 +3721,10 @@ void bgp_instance_up(struct bgp *bgp)

/* Kick off any peers that may have been configured. */
for (ALL_LIST_ELEMENTS(bgp->peer, node, next, peer)) {
if (!BGP_PEER_START_SUPPRESSED(peer))
if (!BGP_PEER_START_SUPPRESSED(peer)) {
BGP_EVENT_ADD(peer, BGP_Stop);
BGP_EVENT_ADD(peer, BGP_Start);
}
}

/* Process any networks that have been configured. */
Expand Down

0 comments on commit 64158b3

Please sign in to comment.