diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2010-08-22 14:43:53 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2010-10-04 20:09:21 +0200 |
commit | 0c69be079abfd43b683c2d9daed3e9d42fd09ec2 (patch) | |
tree | 4bdc52e202573ed923191918c76d787ed9646617 /proto/ospf/ospf.c | |
parent | 2083c12f7d4e2617d5163da0e56b741a98270d6c (diff) |
Fixes a bug in NBMA on an iface with multiple IP addresses.
Diffstat (limited to 'proto/ospf/ospf.c')
-rw-r--r-- | proto/ospf/ospf.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c index 316d7292..0d8030b9 100644 --- a/proto/ospf/ospf.c +++ b/proto/ospf/ospf.c @@ -851,7 +851,7 @@ ospf_reconfigure(struct proto *p, struct proto_config *c) { found = 0; WALK_LIST(nb2, newip->nbma_list) - if (ipa_compare(nb1->ip, nb2->ip) == 0) + if (ipa_equal(nb1->ip, nb2->ip)) { found = 1; if (nb1->eligible != nb2->eligible) @@ -873,9 +873,12 @@ ospf_reconfigure(struct proto *p, struct proto_config *c) /* And then add new */ WALK_LIST(nb2, newip->nbma_list) { + if (!ipa_in_net(nb2->ip, ifa->addr->prefix, ifa->addr->pxlen)) + continue; + found = 0; WALK_LIST(nb1, ifa->nbma_list) - if (ipa_compare(nb1->ip, nb2->ip) == 0) + if (ipa_equal(nb1->ip, nb2->ip)) { found = 1; break; |