diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2017-04-04 20:04:07 +0200 |
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2017-04-04 20:04:07 +0200 |
| commit | 422f8d0ca9745a16b1f46710c621fc9f98200bcf (patch) | |
| tree | 24e91ad38adfd824c624a4a46889e6102b913225 /ospfd/ospf_zebra.c | |
| parent | b394fc99bc4b555aa3c78521439b28f1ff8886ef (diff) | |
| parent | b3cfe637a66a5de00c72125f5fa051155ccb4a29 (diff) | |
Merge branch 'master'
Diffstat (limited to 'ospfd/ospf_zebra.c')
| -rw-r--r-- | ospfd/ospf_zebra.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c index cb14273eed..abb6db0347 100644 --- a/ospfd/ospf_zebra.c +++ b/ospfd/ospf_zebra.c @@ -50,11 +50,11 @@ #include "ospfd/ospf_neighbor.h" #include "ospfd/ospf_nsm.h" #include "ospfd/ospf_zebra.h" -#ifdef HAVE_SNMP -#include "ospfd/ospf_snmp.h" -#endif /* HAVE_SNMP */ #include "ospfd/ospf_te.h" +DEFINE_HOOK(ospf_if_update, (struct interface *ifp), (ifp)) +DEFINE_HOOK(ospf_if_delete, (struct interface *ifp), (ifp)) + /* Zebra structure to hold current status. */ struct zclient *zclient = NULL; @@ -112,9 +112,7 @@ ospf_interface_add (int command, struct zclient *zclient, zebra_size_t length, ospf_if_update (NULL, ifp); -#ifdef HAVE_SNMP - ospf_snmp_if_update (ifp); -#endif /* HAVE_SNMP */ + hook_call(ospf_if_update, ifp); return 0; } @@ -143,9 +141,7 @@ ospf_interface_delete (int command, struct zclient *zclient, ("Zebra: interface delete %s[%u] index %d flags %llx metric %d mtu %d", ifp->name, ifp->vrf_id, ifp->ifindex, (unsigned long long)ifp->flags, ifp->metric, ifp->mtu); -#ifdef HAVE_SNMP - ospf_snmp_if_delete (ifp); -#endif /* HAVE_SNMP */ + hook_call(ospf_if_delete, ifp); for (rn = route_top (IF_OIFS (ifp)); rn; rn = route_next (rn)) if (rn->info) @@ -277,9 +273,7 @@ ospf_interface_address_add (int command, struct zclient *zclient, ospf_if_update (NULL, c->ifp); -#ifdef HAVE_SNMP - ospf_snmp_if_update (c->ifp); -#endif /* HAVE_SNMP */ + hook_call(ospf_if_update, c->ifp); return 0; } @@ -324,9 +318,7 @@ ospf_interface_address_delete (int command, struct zclient *zclient, /* Call interface hook functions to clean up */ ospf_if_free (oi); -#ifdef HAVE_SNMP - ospf_snmp_if_update (c->ifp); -#endif /* HAVE_SNMP */ + hook_call(ospf_if_update, c->ifp); connected_free (c); |
