diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-06-24 01:46:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-24 01:46:39 +0200 |
commit | a36898e7555036c786f7aa944b848966b45d5897 (patch) | |
tree | fb34f0ca1836e09a8e89e73ebd6696a08b89b631 /ripngd | |
parent | Merge pull request #3775 from pguibert6WIND/ospf_missing_interface_handling_2 (diff) | |
download | frr-a36898e7555036c786f7aa944b848966b45d5897.tar.xz frr-a36898e7555036c786f7aa944b848966b45d5897.zip |
Revert "Ospf missing interface handling 2"
Diffstat (limited to 'ripngd')
-rw-r--r-- | ripngd/ripng_interface.c | 16 | ||||
-rw-r--r-- | ripngd/ripng_routemap.c | 3 | ||||
-rw-r--r-- | ripngd/ripngd.c | 6 |
3 files changed, 9 insertions, 16 deletions
diff --git a/ripngd/ripng_interface.c b/ripngd/ripng_interface.c index 520e19a71..49ed13a2c 100644 --- a/ripngd/ripng_interface.c +++ b/ripngd/ripng_interface.c @@ -212,7 +212,7 @@ int ripng_interface_up(ZAPI_CALLBACK_ARGS) if (IS_RIPNG_DEBUG_ZEBRA) zlog_debug( "interface up %s vrf %u index %d flags %llx metric %d mtu %d", - ifp->name, ifp->vrf->vrf_id, ifp->ifindex, + ifp->name, ifp->vrf_id, ifp->ifindex, (unsigned long long)ifp->flags, ifp->metric, ifp->mtu6); ripng_interface_sync(ifp); @@ -249,7 +249,7 @@ int ripng_interface_down(ZAPI_CALLBACK_ARGS) if (IS_RIPNG_DEBUG_ZEBRA) zlog_debug( "interface down %s vrf %u index %d flags %#llx metric %d mtu %d", - ifp->name, ifp->vrf->vrf_id, ifp->ifindex, + ifp->name, ifp->vrf_id, ifp->ifindex, (unsigned long long)ifp->flags, ifp->metric, ifp->mtu6); return 0; @@ -266,7 +266,7 @@ int ripng_interface_add(ZAPI_CALLBACK_ARGS) if (IS_RIPNG_DEBUG_ZEBRA) zlog_debug( "RIPng interface add %s vrf %u index %d flags %#llx metric %d mtu %d", - ifp->name, ifp->vrf->vrf_id, ifp->ifindex, + ifp->name, ifp->vrf_id, ifp->ifindex, (unsigned long long)ifp->flags, ifp->metric, ifp->mtu6); /* Check is this interface is RIP enabled or not.*/ @@ -301,7 +301,7 @@ int ripng_interface_delete(ZAPI_CALLBACK_ARGS) zlog_info( "interface delete %s vrf %u index %d flags %#llx metric %d mtu %d", - ifp->name, ifp->vrf->vrf_id, ifp->ifindex, + ifp->name, ifp->vrf_id, ifp->ifindex, (unsigned long long)ifp->flags, ifp->metric, ifp->mtu6); /* To support pseudo interface do not free interface structure. */ @@ -316,21 +316,17 @@ int ripng_interface_vrf_update(ZAPI_CALLBACK_ARGS) { struct interface *ifp; vrf_id_t new_vrf_id; - struct vrf *new_vrf; ifp = zebra_interface_vrf_update_read(zclient->ibuf, vrf_id, &new_vrf_id); if (!ifp) return 0; - new_vrf = vrf_lookup_by_id(new_vrf_id); - if (IS_RIPNG_DEBUG_ZEBRA) zlog_debug("interface %s VRF change vrf_id %u new vrf id %u", ifp->name, vrf_id, new_vrf_id); - if_update_to_new_vrf(ifp, new_vrf); - + if_update_to_new_vrf(ifp, new_vrf_id); ripng_interface_sync(ifp); return 0; @@ -935,7 +931,7 @@ void ripng_interface_sync(struct interface *ifp) { struct vrf *vrf; - vrf = ifp->vrf; + vrf = vrf_lookup_by_id(ifp->vrf_id); if (vrf) { struct ripng_interface *ri; diff --git a/ripngd/ripng_routemap.c b/ripngd/ripng_routemap.c index 874d81516..0604e272c 100644 --- a/ripngd/ripng_routemap.c +++ b/ripngd/ripng_routemap.c @@ -97,8 +97,7 @@ static route_map_result_t route_match_interface(void *rule, if (type == RMAP_RIPNG) { ifname = rule; - ifp = if_lookup_by_name(ifname, - vrf_lookup_by_id(VRF_DEFAULT)); + ifp = if_lookup_by_name(ifname, VRF_DEFAULT); if (!ifp) return RMAP_NOMATCH; diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c index 34d8b3121..3314892e7 100644 --- a/ripngd/ripngd.c +++ b/ripngd/ripngd.c @@ -2459,7 +2459,7 @@ static void ripng_distribute_update(struct distribute_ctx *ctx, if (!ctx->vrf || !dist->ifname) return; - ifp = if_lookup_by_name(dist->ifname, ctx->vrf); + ifp = if_lookup_by_name(dist->ifname, ctx->vrf->vrf_id); if (ifp == NULL) return; @@ -2576,7 +2576,7 @@ static void ripng_if_rmap_update(struct if_rmap_ctx *ctx, if (ctx->name) vrf = vrf_lookup_by_name(ctx->name); if (vrf) - ifp = if_lookup_by_name(if_rmap->ifname, vrf); + ifp = if_lookup_by_name(if_rmap->ifname, vrf->vrf_id); if (ifp == NULL) return; @@ -2608,8 +2608,6 @@ void ripng_if_rmap_update_interface(struct interface *ifp) struct if_rmap *if_rmap; struct if_rmap_ctx *ctx; - if (ifp->vrf && ifp->vrf->vrf_id == VRF_UNKNOWN) - return; if (!ripng) return; ctx = ripng->if_rmap_ctx; |