mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 19:39:28 +00:00
Merge pull request #10446 from anlancs/staticd-cleanup
staticd: small cleanup
This commit is contained in:
commit
4adbab9b23
@ -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;
|
||||
}
|
||||
|
||||
|
@ -140,8 +140,6 @@ static int static_route_leak(struct vty *vty, const char *svrf,
|
||||
/* Administrative distance. */
|
||||
if (distance_str)
|
||||
distance = atoi(distance_str);
|
||||
else
|
||||
distance = ZEBRA_STATIC_DISTANCE_DEFAULT;
|
||||
|
||||
/* tag */
|
||||
if (tag_str)
|
||||
|
Loading…
Reference in New Issue
Block a user