Use the source IP we use as BGP router identifier.
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
This commit is contained in:
parent
21ae6221cf
commit
017a7d32fe
1 changed files with 5 additions and 1 deletions
4
bgp.c
4
bgp.c
|
|
@ -1361,6 +1361,10 @@ static int bgp_send_open(struct bgp_peer *peer)
|
|||
data.version = BGP_VERSION;
|
||||
data.as = htons(our_as);
|
||||
data.hold_time = htons(peer->hold);
|
||||
/* use the source IP we use as identifier, if available */
|
||||
if (peer->source_addr != INADDR_ANY)
|
||||
data.identifier = peer->source_addr;
|
||||
else
|
||||
data.identifier = my_address;
|
||||
|
||||
/* if we know peer doesn't support MP (mp_handling == DoesntHandleIPv6Routes)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue