Merge pull request #13043 from FRRouting/mergify/bp/stable/8.5/pr-13026

pbrd:fix mismatching in match src-dst (backport #13026)
This commit is contained in:
Donatas Abraitis 2023-03-19 22:58:04 +02:00 committed by GitHub
commit d96b1906b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,7 +138,7 @@ DEFPY(pbr_map_match_src, pbr_map_match_src_cmd,
if (!pbrms) if (!pbrms)
return CMD_WARNING_CONFIG_FAILED; return CMD_WARNING_CONFIG_FAILED;
if (pbrms->dst && pbrms->family && prefix->family != pbrms->family) { if (pbrms->dst && prefix->family != pbrms->dst->family) {
vty_out(vty, "Cannot mismatch families within match src/dst\n"); vty_out(vty, "Cannot mismatch families within match src/dst\n");
return CMD_WARNING_CONFIG_FAILED; return CMD_WARNING_CONFIG_FAILED;
} }
@ -174,7 +174,7 @@ DEFPY(pbr_map_match_dst, pbr_map_match_dst_cmd,
if (!pbrms) if (!pbrms)
return CMD_WARNING_CONFIG_FAILED; return CMD_WARNING_CONFIG_FAILED;
if (pbrms->src && pbrms->family && prefix->family != pbrms->family) { if (pbrms->src && prefix->family != pbrms->src->family) {
vty_out(vty, "Cannot mismatch families within match src/dst\n"); vty_out(vty, "Cannot mismatch families within match src/dst\n");
return CMD_WARNING_CONFIG_FAILED; return CMD_WARNING_CONFIG_FAILED;
} }