summaryrefslogtreecommitdiffstats
path: root/proto/ospf/ospf.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2010-08-22 14:43:53 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2010-08-22 14:43:53 +0200
commitfaf58cec4d0c0d3c1fddee6faf2f57a1362477bb (patch)
tree6020b17013a7d6ede4e44991d8f0bcc56d21439f /proto/ospf/ospf.c
parentac4a1eedfc515e041877d48fd5f64ee4e3b30532 (diff)
downloadbird-faf58cec4d0c0d3c1fddee6faf2f57a1362477bb.tar
bird-faf58cec4d0c0d3c1fddee6faf2f57a1362477bb.zip
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.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c
index e1ba96a..a9dc1de 100644
--- a/proto/ospf/ospf.c
+++ b/proto/ospf/ospf.c
@@ -855,7 +855,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)
@@ -877,9 +877,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;