diff options
Diffstat (limited to 'staticd/static_zebra.c')
| -rw-r--r-- | staticd/static_zebra.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/staticd/static_zebra.c b/staticd/static_zebra.c index fd4201e562..3f31177524 100644 --- a/staticd/static_zebra.c +++ b/staticd/static_zebra.c @@ -122,11 +122,17 @@ static int interface_state_up(int command, struct zclient *zclient, ifp = zebra_interface_if_lookup(zclient->ibuf); - if (ifp && if_is_vrf(ifp)) { - struct static_vrf *svrf = static_vrf_lookup_by_id(vrf_id); + if (ifp) { + if (if_is_vrf(ifp)) { + struct static_vrf *svrf = + static_vrf_lookup_by_id(vrf_id); - static_fixup_vrf_ids(svrf); - static_config_install_delayed_routes(svrf); + static_fixup_vrf_ids(svrf); + static_config_install_delayed_routes(svrf); + } + + /* Install any static reliant on this interface coming up */ + static_install_intf_nh(ifp); } return 0; @@ -148,11 +154,11 @@ static int route_notify_owner(int command, struct zclient *zclient, uint32_t table_id; char buf[PREFIX_STRLEN]; - prefix2str(&p, buf, sizeof(buf)); - if (!zapi_route_notify_decode(zclient->ibuf, &p, &table_id, ¬e)) return -1; + prefix2str(&p, buf, sizeof(buf)); + switch (note) { case ZAPI_ROUTE_FAIL_INSTALL: zlog_warn("%s: Route %s failed to install for table: %u", @@ -364,8 +370,6 @@ extern void static_zebra_route_add(struct route_node *rn, memcpy(&api.src_prefix, src_pp, sizeof(api.src_prefix)); } SET_FLAG(api.flags, ZEBRA_FLAG_RR_USE_DISTANCE); - if (si_changed->onlink) - SET_FLAG(api.flags, ZEBRA_FLAG_ONLINK); SET_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP); if (si_changed->distance) { SET_FLAG(api.message, ZAPI_MESSAGE_DISTANCE); @@ -391,6 +395,8 @@ extern void static_zebra_route_add(struct route_node *rn, continue; api_nh->vrf_id = si->nh_vrf_id; + api_nh->onlink = si->onlink; + switch (si->type) { case STATIC_IFNAME: if (si->ifindex == IFINDEX_INTERNAL) |
