summaryrefslogtreecommitdiff
path: root/ripd/rip_interface.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2017-04-04 20:04:07 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2017-04-04 20:04:07 +0200
commit422f8d0ca9745a16b1f46710c621fc9f98200bcf (patch)
tree24e91ad38adfd824c624a4a46889e6102b913225 /ripd/rip_interface.c
parentb394fc99bc4b555aa3c78521439b28f1ff8886ef (diff)
parentb3cfe637a66a5de00c72125f5fa051155ccb4a29 (diff)
Merge branch 'master'
Diffstat (limited to 'ripd/rip_interface.c')
-rw-r--r--ripd/rip_interface.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c
index 4c750faf4c..a4ee2ba570 100644
--- a/ripd/rip_interface.c
+++ b/ripd/rip_interface.c
@@ -42,6 +42,9 @@
#include "ripd/rip_debug.h"
#include "ripd/rip_interface.h"
+DEFINE_HOOK(rip_ifaddr_add, (struct connected *ifc), (ifc))
+DEFINE_HOOK(rip_ifaddr_del, (struct connected *ifc), (ifc))
+
/* static prototypes */
static void rip_enable_apply (struct interface *);
static void rip_passive_interface_apply (struct interface *);
@@ -673,9 +676,7 @@ rip_interface_address_add (int command, struct zclient *zclient,
/* Check if this prefix needs to be redistributed */
rip_apply_address_add(ifc);
-#ifdef HAVE_SNMP
- rip_ifaddr_add (ifc->ifp, ifc);
-#endif /* HAVE_SNMP */
+ hook_call(rip_ifaddr_add, ifc);
}
return 0;
@@ -723,9 +724,7 @@ rip_interface_address_delete (int command, struct zclient *zclient,
zlog_debug ("connected address %s/%d is deleted",
inet_ntoa (p->u.prefix4), p->prefixlen);
-#ifdef HAVE_SNMP
- rip_ifaddr_delete (ifc->ifp, ifc);
-#endif /* HAVE_SNMP */
+ hook_call(rip_ifaddr_del, ifc);
/* Chech wether this prefix needs to be removed */
rip_apply_address_del(ifc);