diff options
Diffstat (limited to 'staticd')
-rw-r--r-- | staticd/static_routes.c | 8 | ||||
-rw-r--r-- | staticd/static_zebra.c | 8 |
2 files changed, 6 insertions, 10 deletions
diff --git a/staticd/static_routes.c b/staticd/static_routes.c index 60f384e51..45c42ddce 100644 --- a/staticd/static_routes.c +++ b/staticd/static_routes.c @@ -199,14 +199,14 @@ bool static_add_nexthop_validate(const char *nh_vrf_name, switch (type) { case STATIC_IPV4_GATEWAY: case STATIC_IPV4_GATEWAY_IFNAME: - if (if_lookup_exact_address(&ipaddr->ipaddr_v4, AF_INET, - vrf->vrf_id)) + if (if_address_is_local(&ipaddr->ipaddr_v4, AF_INET, + vrf->vrf_id)) return false; break; case STATIC_IPV6_GATEWAY: case STATIC_IPV6_GATEWAY_IFNAME: - if (if_lookup_exact_address(&ipaddr->ipaddr_v6, AF_INET6, - vrf->vrf_id)) + if (if_address_is_local(&ipaddr->ipaddr_v6, AF_INET6, + vrf->vrf_id)) return false; break; default: diff --git a/staticd/static_zebra.c b/staticd/static_zebra.c index 538fae28a..38b3c93d7 100644 --- a/staticd/static_zebra.c +++ b/staticd/static_zebra.c @@ -162,14 +162,10 @@ static bool static_nexthop_is_local(vrf_id_t vrfid, struct prefix *addr, int family) { if (family == AF_INET) { - if (if_lookup_exact_address(&addr->u.prefix4, - AF_INET, - vrfid)) + if (if_address_is_local(&addr->u.prefix4, AF_INET, vrfid)) return true; } else if (family == AF_INET6) { - if (if_lookup_exact_address(&addr->u.prefix6, - AF_INET6, - vrfid)) + if (if_address_is_local(&addr->u.prefix6, AF_INET6, vrfid)) return true; } return false; |