Skip to content

Commit 34af55d

Browse files
committed
bgpd: honor missing nexthop for transparent+source
When a neighbor is established for an ip-transparent and the source address is well known, let's honor that the connection. Signed-off-by: Vincent Jardin <[email protected]>
1 parent 82b3fae commit 34af55d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bgpd/bgp_network.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -929,6 +929,12 @@ int bgp_getsockname(struct peer_connection *connection)
929929

930930
if (!bgp_zebra_nexthop_set(connection->su_local, connection->su_remote, &peer->nexthop,
931931
peer)) {
932+
/* no nexthop, but the admin has enforced the source address with an ip-transparent mode
933+
* so let's honor the configuration.
934+
*/
935+
if (CHECK_FLAG(peer->flags, PEER_FLAG_IP_TRANSPARENT) &&
936+
CHECK_FLAG(peer->flags, PEER_FLAG_UPDATE_SOURCE))
937+
return 0;
932938
flog_err(EC_BGP_NH_UPD,
933939
"%s: nexthop_set failed, local: %pSUp remote: %pSUp update_if: %s resetting connection - intf %s",
934940
peer->host, connection->su_local, connection->su_remote,

0 commit comments

Comments
 (0)