projects
/
l2tpns.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use the source IP we use as BGP router identifier.
[l2tpns.git]
/
bgp.c
diff --git
a/bgp.c
b/bgp.c
index
0566393
..
bfcb86e
100644
(file)
--- a/
bgp.c
+++ b/
bgp.c
@@
-1303,7
+1303,7
@@
static int bgp_handle_input(struct bgp_peer *peer)
{
LOG(4, 0, 0, "BGP peer %s doesn't support BGP Capabilities\n", peer->name);
peer->mp_handling = DoesntHandleIPv6Routes;
{
LOG(4, 0, 0, "BGP peer %s doesn't support BGP Capabilities\n", peer->name);
peer->mp_handling = DoesntHandleIPv6Routes;
- bgp_
restart
(peer);
+ bgp_
set_retry
(peer);
return 0;
}
return 0;
}
@@
-1361,7
+1361,11
@@
static int bgp_send_open(struct bgp_peer *peer)
data.version = BGP_VERSION;
data.as = htons(our_as);
data.hold_time = htons(peer->hold);
data.version = BGP_VERSION;
data.as = htons(our_as);
data.hold_time = htons(peer->hold);
- data.identifier = my_address;
+ /* 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)
then don't add this parameter */
/* if we know peer doesn't support MP (mp_handling == DoesntHandleIPv6Routes)
then don't add this parameter */