summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2013-10-21 15:06:09 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2013-10-21 15:06:09 +0200
commit33be3ba713901befe2df651b869a406df8fc8ace (patch)
treeaee1fcbf1230be57b3d3d754d1b462216de93293
parenta15dab76f93337b07b4b03a64ac3bac26285dfd9 (diff)
Accepts a change of OSPFv3 neighbor's IP address.
Thanks to Pierre Pfister for the patch.
-rw-r--r--proto/ospf/hello.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/proto/ospf/hello.c b/proto/ospf/hello.c
index 58e87bbf..68c345f4 100644
--- a/proto/ospf/hello.c
+++ b/proto/ospf/hello.c
@@ -152,6 +152,14 @@ ospf_hello_receive(struct ospf_packet *ps_i, struct ospf_iface *ifa,
n->iface_id = ntohl(ps->iface_id);
#endif
}
+#ifdef OSPFv3 /* NOTE: this could also be relevant for OSPFv2 on PtP ifaces */
+ else if (!ipa_equal(faddr, n->ip))
+ {
+ OSPF_TRACE(D_EVENTS, "Neighbor address changed from %I to %I", n->ip, faddr);
+ n->ip = faddr;
+ }
+#endif
+
ospf_neigh_sm(n, INM_HELLOREC);
pnrid = (u32 *) ((struct ospf_hello_packet *) (ps + 1));