Merge pull request #10446 from anlancs/staticd-cleanup

staticd: small cleanup
This commit is contained in:
Igor Ryzhov 2022-02-01 13:33:13 +03:00 committed by GitHub
commit 4adbab9b23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 12 deletions

View File

@ -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;
}

View File

@ -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)