diff options
author | Dinesh Dutt <ddutt@cumulusnetworks.com> | 2013-08-24 07:55:57 +0000 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2013-11-07 18:15:43 -0800 |
commit | e7ad6b20d7a7c63ed7c640ab9f61c853e77508c5 (patch) | |
tree | 92454d3f9eca7c5f579c0c463f976e3e3b5873cc | |
parent | b81e97a8a7f85ecc7489dc8a7c7b9d403d9c4bc6 (diff) | |
download | quagga-e7ad6b20d7a7c63ed7c640ab9f61c853e77508c5.tar.bz2 quagga-e7ad6b20d7a7c63ed7c640ab9f61c853e77508c5.tar.xz |
ospf6d: fix linkdown handling
Ensure OSPFv3 handles link down even correctly.
OSPFv3 checks only the administrative status of a link instead of its
operative status. This prevents it up from detecting a real link down
event and reacting appropriately. Only protocol timer timeouts make it
detect a link down eventually. This patch makes it look for the operative
status of a link instead of admin status.
Signed-off-by: Dinesh G Dutt <ddutt at cumulusnetworks.com>
Reviewed-by: James Li <jli at cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
-rw-r--r-- | ospf6d/ospf6_interface.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index 94b599be..d1f5cba1 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -316,7 +316,7 @@ ospf6_interface_state_update (struct interface *ifp) if (oi->area == NULL) return; - if (if_is_up (ifp)) + if (if_is_operative (ifp)) thread_add_event (master, interface_up, oi, 0); else thread_add_event (master, interface_down, oi, 0); @@ -625,7 +625,7 @@ interface_up (struct thread *thread) oi->interface->name); /* check physical interface is up */ - if (! if_is_up (oi->interface)) + if (! if_is_operative (oi->interface)) { if (IS_OSPF6_DEBUG_INTERFACE) zlog_debug ("Interface %s is down, can't execute [InterfaceUp]", @@ -779,7 +779,7 @@ ospf6_interface_show (struct vty *vty, struct interface *ifp) type = "UNKNOWN"; vty_out (vty, "%s is %s, type %s%s", - ifp->name, updown[if_is_up (ifp)], type, + ifp->name, updown[if_is_operative (ifp)], type, VNL); vty_out (vty, " Interface ID: %d%s", ifp->ifindex, VNL); |