mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-09 15:19:11 +00:00
lib, pbrd: Do not allow v6 LL nexthops to be specified without an interface.
Prevent the creation of a v6 LL nexthop that does not include an interface for proper resolution. Ticket: CM-20276 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
170f8b90ba
commit
cafec8da4f
@ -280,9 +280,15 @@ DEFPY(ecmp_nexthops, ecmp_nexthops_cmd,
|
|||||||
intf, vrf->name);
|
intf, vrf->name);
|
||||||
return CMD_WARNING;
|
return CMD_WARNING;
|
||||||
}
|
}
|
||||||
} else
|
} else {
|
||||||
|
if (IN6_IS_ADDR_LINKLOCAL(&nhop.gate.ipv6)) {
|
||||||
|
vty_out(vty,
|
||||||
|
"Specified a v6 LL with no interface, rejecting\n");
|
||||||
|
return CMD_WARNING_CONFIG_FAILED;
|
||||||
|
}
|
||||||
nhop.type = NEXTHOP_TYPE_IPV6;
|
nhop.type = NEXTHOP_TYPE_IPV6;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
nh = nexthop_exists(&nhgc->nhg, &nhop);
|
nh = nexthop_exists(&nhgc->nhg, &nhop);
|
||||||
|
|
||||||
|
@ -251,9 +251,15 @@ DEFPY(pbr_map_nexthop, pbr_map_nexthop_cmd,
|
|||||||
intf, vrf->name);
|
intf, vrf->name);
|
||||||
return CMD_WARNING_CONFIG_FAILED;
|
return CMD_WARNING_CONFIG_FAILED;
|
||||||
}
|
}
|
||||||
} else
|
} else {
|
||||||
|
if (IN6_IS_ADDR_LINKLOCAL(&nhop.gate.ipv6)) {
|
||||||
|
vty_out(vty,
|
||||||
|
"Specified a v6 LL with no interface, rejecting\n");
|
||||||
|
return CMD_WARNING_CONFIG_FAILED;
|
||||||
|
}
|
||||||
nhop.type = NEXTHOP_TYPE_IPV6;
|
nhop.type = NEXTHOP_TYPE_IPV6;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (pbrms->nhg)
|
if (pbrms->nhg)
|
||||||
nh = nexthop_exists(pbrms->nhg, &nhop);
|
nh = nexthop_exists(pbrms->nhg, &nhop);
|
||||||
|
Loading…
Reference in New Issue
Block a user