mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-12 22:27:47 +00:00
Merge pull request #5120 from sworleys/PBR-LL-FIX
pbrd: Don't track ipv6 link locals
This commit is contained in:
commit
6eb3b18a09
@ -267,7 +267,9 @@ void pbr_nhgroup_add_nexthop_cb(const struct nexthop_group_cmd *nhgc,
|
|||||||
pbr_nht_install_nexthop_group(pnhgc, nhgc->nhg);
|
pbr_nht_install_nexthop_group(pnhgc, nhgc->nhg);
|
||||||
pbr_map_check_nh_group_change(nhgc->name);
|
pbr_map_check_nh_group_change(nhgc->name);
|
||||||
|
|
||||||
if (nhop->type == NEXTHOP_TYPE_IFINDEX) {
|
if (nhop->type == NEXTHOP_TYPE_IFINDEX
|
||||||
|
|| (nhop->type == NEXTHOP_TYPE_IPV6_IFINDEX
|
||||||
|
&& IN6_IS_ADDR_LINKLOCAL(&nhop->gate.ipv6))) {
|
||||||
struct interface *ifp;
|
struct interface *ifp;
|
||||||
|
|
||||||
ifp = if_lookup_by_index(nhop->ifindex, nhop->vrf_id);
|
ifp = if_lookup_by_index(nhop->ifindex, nhop->vrf_id);
|
||||||
@ -772,10 +774,15 @@ pbr_nht_individual_nexthop_update(struct pbr_nexthop_cache *pnhc,
|
|||||||
case NEXTHOP_TYPE_IFINDEX:
|
case NEXTHOP_TYPE_IFINDEX:
|
||||||
pbr_nht_individual_nexthop_interface_update(pnhc, pnhi);
|
pbr_nht_individual_nexthop_interface_update(pnhc, pnhi);
|
||||||
break;
|
break;
|
||||||
|
case NEXTHOP_TYPE_IPV6_IFINDEX:
|
||||||
|
if (IN6_IS_ADDR_LINKLOCAL(&pnhc->nexthop->gate.ipv6)) {
|
||||||
|
pbr_nht_individual_nexthop_interface_update(pnhc, pnhi);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
/* Intentional fall thru */
|
||||||
|
case NEXTHOP_TYPE_IPV4_IFINDEX:
|
||||||
case NEXTHOP_TYPE_IPV4:
|
case NEXTHOP_TYPE_IPV4:
|
||||||
case NEXTHOP_TYPE_IPV6:
|
case NEXTHOP_TYPE_IPV6:
|
||||||
case NEXTHOP_TYPE_IPV4_IFINDEX:
|
|
||||||
case NEXTHOP_TYPE_IPV6_IFINDEX:
|
|
||||||
pbr_nht_individual_nexthop_gw_update(pnhc, pnhi);
|
pbr_nht_individual_nexthop_gw_update(pnhc, pnhi);
|
||||||
break;
|
break;
|
||||||
case NEXTHOP_TYPE_BLACKHOLE:
|
case NEXTHOP_TYPE_BLACKHOLE:
|
||||||
|
@ -363,7 +363,9 @@ DEFPY(pbr_map_nexthop, pbr_map_nexthop_cmd,
|
|||||||
pbr_map_check(pbrms);
|
pbr_map_check(pbrms);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nhop.type == NEXTHOP_TYPE_IFINDEX) {
|
if (nhop.type == NEXTHOP_TYPE_IFINDEX
|
||||||
|
|| (nhop.type == NEXTHOP_TYPE_IPV6_IFINDEX
|
||||||
|
&& IN6_IS_ADDR_LINKLOCAL(&nhop.gate.ipv6))) {
|
||||||
struct interface *ifp;
|
struct interface *ifp;
|
||||||
|
|
||||||
ifp = if_lookup_by_index(nhop.ifindex, nhop.vrf_id);
|
ifp = if_lookup_by_index(nhop.ifindex, nhop.vrf_id);
|
||||||
|
@ -450,6 +450,12 @@ void pbr_send_rnh(struct nexthop *nhop, bool reg)
|
|||||||
p.family = AF_INET6;
|
p.family = AF_INET6;
|
||||||
memcpy(&p.u.prefix6, &nhop->gate.ipv6, 16);
|
memcpy(&p.u.prefix6, &nhop->gate.ipv6, 16);
|
||||||
p.prefixlen = 128;
|
p.prefixlen = 128;
|
||||||
|
if (IN6_IS_ADDR_LINKLOCAL(&nhop->gate.ipv6))
|
||||||
|
/*
|
||||||
|
* Don't bother tracking link locals, just track their
|
||||||
|
* interface state.
|
||||||
|
*/
|
||||||
|
return;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user