summaryrefslogtreecommitdiff
path: root/proto/bgp/bgp.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2012-12-27 12:56:23 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2012-12-27 12:56:23 +0100
commit79b4e12e6032faf6bb1f3feac385bd36ee53019e (patch)
tree0509f66417bbaf3429594ac7c359971d75b3ec49 /proto/bgp/bgp.c
parenta92cf57dd6ba021a495fe7268c86dc8e6aeecbb2 (diff)
Implements interface masks for choosing router id.
Router ID could be automatically determined based of subset of ifaces/addresses specified by 'router id from' option. The patch also does some minor changes related to router ID reconfiguration. Thanks to Alexander V. Chernikov for most of the work.
Diffstat (limited to 'proto/bgp/bgp.c')
-rw-r--r--proto/bgp/bgp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c
index 346c641b..249d2e07 100644
--- a/proto/bgp/bgp.c
+++ b/proto/bgp/bgp.c
@@ -1009,6 +1009,9 @@ bgp_reconfigure(struct proto *P, struct proto_config *C)
struct bgp_proto *p = (struct bgp_proto *) P;
struct bgp_config *old = p->cf;
+ if (proto_get_router_id(C) != p->local_id)
+ return 0;
+
int same = !memcmp(((byte *) old) + sizeof(struct proto_config),
((byte *) new) + sizeof(struct proto_config),
// password item is last and must be checked separately