mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-06-13 17:49:56 +00:00
pbrd: disallow ipv4/ipv6 mismatching in match src/dst
Disallow mismatching of ipv4/ipv6 matching in src/dst. Doesn't make a lot of sense to allow this based on how IP Headers work. The kernel does not allow it at all obviously. Signed-off-by: Stephen Worley <sworley@nvidia.com>
This commit is contained in:
parent
91653aefd4
commit
67765a232d
@ -137,6 +137,11 @@ DEFPY(pbr_map_match_src, pbr_map_match_src_cmd,
|
||||
{
|
||||
struct pbr_map_sequence *pbrms = VTY_GET_CONTEXT(pbr_map_sequence);
|
||||
|
||||
if (pbrms->dst && pbrms->family && prefix->family != pbrms->family) {
|
||||
vty_out(vty, "Cannot mismatch families within match src/dst\n");
|
||||
return CMD_WARNING_CONFIG_FAILED;
|
||||
}
|
||||
|
||||
pbrms->family = prefix->family;
|
||||
|
||||
if (!no) {
|
||||
@ -165,6 +170,11 @@ DEFPY(pbr_map_match_dst, pbr_map_match_dst_cmd,
|
||||
{
|
||||
struct pbr_map_sequence *pbrms = VTY_GET_CONTEXT(pbr_map_sequence);
|
||||
|
||||
if (pbrms->src && pbrms->family && prefix->family != pbrms->family) {
|
||||
vty_out(vty, "Cannot mismatch families within match src/dst\n");
|
||||
return CMD_WARNING_CONFIG_FAILED;
|
||||
}
|
||||
|
||||
pbrms->family = prefix->family;
|
||||
|
||||
if (!no) {
|
||||
|
Loading…
Reference in New Issue
Block a user