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 /zebra/zebra_rib.c | |
| parent | b394fc99bc4b555aa3c78521439b28f1ff8886ef (diff) | |
| parent | b3cfe637a66a5de00c72125f5fa051155ccb4a29 (diff) | |
Merge branch 'master'
Diffstat (limited to 'zebra/zebra_rib.c')
| -rw-r--r-- | zebra/zebra_rib.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index f5b54a2c04..b3e70e46fa 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -48,11 +48,12 @@ #include "zebra/redistribute.h" #include "zebra/zebra_routemap.h" #include "zebra/debug.h" -#include "zebra/zebra_fpm.h" #include "zebra/zebra_rnh.h" #include "zebra/interface.h" #include "zebra/connected.h" +DEFINE_HOOK(rib_update, (struct route_node *rn, const char *reason), (rn, reason)) + /* Should we allow non Quagga processes to delete our routes */ extern int allow_delete; @@ -1110,7 +1111,7 @@ rib_install_kernel (struct route_node *rn, struct rib *rib, struct rib *old) * Make sure we update the FPM any time we send new information to * the kernel. */ - zfpm_trigger_update (rn, "installing in kernel"); + hook_call(rib_update, rn, "installing in kernel"); ret = kernel_route_rib (p, src_p, old, rib); /* If install succeeds, update FIB flag for nexthops. */ @@ -1154,7 +1155,7 @@ rib_uninstall_kernel (struct route_node *rn, struct rib *rib) * Make sure we update the FPM any time we send new information to * the kernel. */ - zfpm_trigger_update (rn, "uninstalling from kernel"); + hook_call(rib_update, rn, "uninstalling from kernel"); ret = kernel_route_rib (p, src_p, rib, NULL); for (ALL_NEXTHOPS_RO(rib->nexthop, nexthop, tnexthop, recursing)) @@ -1172,7 +1173,7 @@ rib_uninstall (struct route_node *rn, struct rib *rib) if (CHECK_FLAG (rib->status, RIB_ENTRY_SELECTED_FIB)) { if (info->safi == SAFI_UNICAST) - zfpm_trigger_update (rn, "rib_uninstall"); + hook_call(rib_update, rn, "rib_uninstall"); if (! RIB_SYSTEM_ROUTE (rib)) rib_uninstall_kernel (rn, rib); @@ -1253,7 +1254,7 @@ static void rib_process_add_fib(struct zebra_vrf *zvrf, struct route_node *rn, struct rib *new) { - zfpm_trigger_update (rn, "new route selected"); + hook_call(rib_update, rn, "new route selected"); /* Update real nexthop. This may actually determine if nexthop is active or not. */ if (!nexthop_active_update (rn, new, 1)) @@ -1289,7 +1290,7 @@ static void rib_process_del_fib(struct zebra_vrf *zvrf, struct route_node *rn, struct rib *old) { - zfpm_trigger_update (rn, "removing existing route"); + hook_call(rib_update, rn, "removing existing route"); /* Uninstall from kernel. */ if (IS_ZEBRA_DEBUG_RIB) @@ -1326,7 +1327,7 @@ rib_process_update_fib (struct zebra_vrf *zvrf, struct route_node *rn, if (new != old || CHECK_FLAG (new->status, RIB_ENTRY_CHANGED)) { - zfpm_trigger_update (rn, "updating existing route"); + hook_call(rib_update, rn, "updating existing route"); /* Update the nexthop; we could determine here that nexthop is inactive. */ if (nexthop_active_update (rn, new, 1)) @@ -2874,7 +2875,7 @@ rib_close_table (struct route_table *table) continue; if (info->safi == SAFI_UNICAST) - zfpm_trigger_update (rn, NULL); + hook_call(rib_update, rn, NULL); if (! RIB_SYSTEM_ROUTE (rib)) rib_uninstall_kernel (rn, rib); |
