diff options
Diffstat (limited to 'staticd/static_nht.c')
| -rw-r--r-- | staticd/static_nht.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/staticd/static_nht.c b/staticd/static_nht.c index feb6e0f993..e1d6ba15d1 100644 --- a/staticd/static_nht.c +++ b/staticd/static_nht.c @@ -30,10 +30,9 @@ #include "static_zebra.h" #include "static_nht.h" -static void static_nht_update_path(struct route_node *rn, - struct static_path *pn, struct prefix *nhp, +static void static_nht_update_path(struct static_path *pn, struct prefix *nhp, uint32_t nh_num, vrf_id_t nh_vrf_id, - struct vrf *vrf, safi_t safi) + struct vrf *vrf) { struct static_nexthop *nh; @@ -52,11 +51,12 @@ static void static_nht_update_path(struct route_node *rn, nh->nh_valid = !!nh_num; if (nhp->family == AF_INET6 - && memcmp(&nhp->u.prefix6, &nh->addr.ipv6, 16) == 0) + && memcmp(&nhp->u.prefix6, &nh->addr.ipv6, IPV6_MAX_BYTELEN) + == 0) nh->nh_valid = !!nh_num; if (nh->state == STATIC_START) - static_zebra_route_add(rn, pn, safi, true); + static_zebra_route_add(pn, true); } } @@ -83,8 +83,8 @@ static void static_nht_update_safi(struct prefix *sp, struct prefix *nhp, if (rn && rn->info) { si = static_route_info_from_rnode(rn); frr_each(static_path_list, &si->path_list, pn) { - static_nht_update_path(rn, pn, nhp, nh_num, - nh_vrf_id, vrf, safi); + static_nht_update_path(pn, nhp, nh_num, + nh_vrf_id, vrf); } route_unlock_node(rn); } @@ -96,8 +96,7 @@ static void static_nht_update_safi(struct prefix *sp, struct prefix *nhp, if (!si) continue; frr_each(static_path_list, &si->path_list, pn) { - static_nht_update_path(rn, pn, nhp, nh_num, nh_vrf_id, - vrf, safi); + static_nht_update_path(pn, nhp, nh_num, nh_vrf_id, vrf); } } } |
