diff options
author | anlan_cs <vic.lan@pica8.com> | 2022-01-31 07:16:07 +0100 |
---|---|---|
committer | anlan_cs <vic.lan@pica8.com> | 2022-01-31 11:44:17 +0100 |
commit | 32c0a2dd2cfab840ed7663d500b9bc4457ed93ce (patch) | |
tree | b53e9d497731f4dd15b0f04a2e9afc2ed2c63c4f /staticd/static_routes.c | |
parent | Merge pull request #10398 from patrasar/pim_debug_fix (diff) | |
download | frr-32c0a2dd2cfab840ed7663d500b9bc4457ed93ce.tar.xz frr-32c0a2dd2cfab840ed7663d500b9bc4457ed93ce.zip |
staticd: small cleanup
Two small cleanups, just remove duplication.
Signed-off-by: anlan_cs <vic.lan@pica8.com>
Diffstat (limited to 'staticd/static_routes.c')
-rw-r--r-- | staticd/static_routes.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/staticd/static_routes.c b/staticd/static_routes.c index 1d52dd30e..589d509a5 100644 --- a/staticd/static_routes.c +++ b/staticd/static_routes.c @@ -335,6 +335,7 @@ struct static_nexthop *static_add_nexthop(struct static_path *pn, break; case STATIC_IPV4_GATEWAY_IFNAME: case STATIC_IPV6_GATEWAY_IFNAME: + case STATIC_IFNAME: ifp = if_lookup_by_name(ifname, nh->nh_vrf_id); if (ifp && ifp->ifindex != IFINDEX_INTERNAL) nh->ifindex = ifp->ifindex; @@ -342,16 +343,6 @@ struct static_nexthop *static_add_nexthop(struct static_path *pn, zlog_warn( "Static Route using %s interface not installed because the interface does not exist in specified vrf", ifname); - - break; - case STATIC_IFNAME: - ifp = if_lookup_by_name(ifname, nh->nh_vrf_id); - if (ifp && ifp->ifindex != IFINDEX_INTERNAL) { - nh->ifindex = ifp->ifindex; - } else - zlog_warn( - "Static Route using %s interface not installed because the interface does not exist in specified vrf", - ifname); break; } |