summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6d.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2017-08-23 16:54:15 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2017-08-24 00:18:53 +0200
commit427f8e61bb711b51891dbaee845215ca228951f1 (patch)
treebafe78de9e9f109c2f840eaf4a357511275695aa /ospf6d/ospf6d.c
parentlib: fix cosmetic issue with exit race (diff)
downloadfrr-427f8e61bb711b51891dbaee845215ca228951f1.tar.xz
frr-427f8e61bb711b51891dbaee845215ca228951f1.zip
ospf6d: properly update prefix list references
Register add/delete hooks with the prefix list code to properly change ospf6_area's prefix list in/out pointers. There are 2 other uncached uses of prefix lists in the ASBR route-map code and the interface code; these should probably be cached too. (To be fixed another day...) Fixes: #453 Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ospf6d/ospf6d.c')
-rw-r--r--ospf6d/ospf6d.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/ospf6d/ospf6d.c b/ospf6d/ospf6d.c
index f6b9e0ec1..84a56fb50 100644
--- a/ospf6d/ospf6d.c
+++ b/ospf6d/ospf6d.c
@@ -24,6 +24,7 @@
#include "linklist.h"
#include "vty.h"
#include "command.h"
+#include "plist.h"
#include "ospf6_proto.h"
#include "ospf6_network.h"
@@ -1139,6 +1140,20 @@ DEFUN (show_ipv6_ospf6_linkstate_detail,
return CMD_SUCCESS;
}
+static void ospf6_plist_add(struct prefix_list *plist)
+{
+ if (prefix_list_afi(plist) != AFI_IP6)
+ return;
+ ospf6_area_plist_update(plist, 1);
+}
+
+static void ospf6_plist_del(struct prefix_list *plist)
+{
+ if (prefix_list_afi(plist) != AFI_IP6)
+ return;
+ ospf6_area_plist_update(plist, 0);
+}
+
/* Install ospf related commands. */
void ospf6_init(void)
{
@@ -1154,6 +1169,9 @@ void ospf6_init(void)
ospf6_asbr_init();
ospf6_abr_init();
+ prefix_list_add_hook(ospf6_plist_add);
+ prefix_list_delete_hook(ospf6_plist_del);
+
ospf6_bfd_init();
install_node(&debug_node, config_write_ospf6_debug);