summaryrefslogtreecommitdiffstats
path: root/pbrd
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2021-01-05 19:54:06 +0100
committerGitHub <noreply@github.com>2021-01-05 19:54:06 +0100
commit6b669132759d9ce501e2ab2621f4347f70226e40 (patch)
tree3a604e7e51915b1286425c7a0f928b29b8e33421 /pbrd
parentMerge pull request #7772 from LabNConsulting/ziemba/tests-lutil-timestamp (diff)
parentzebra: derive rule family from src->dst->ipv4 (diff)
downloadfrr-6b669132759d9ce501e2ab2621f4347f70226e40.tar.xz
frr-6b669132759d9ce501e2ab2621f4347f70226e40.zip
Merge pull request #7762 from sworleys/PBR-Ipv4/Ipv6-Match-Fixes
pbrd: pbr ipv4/ipv6 match fixes
Diffstat (limited to 'pbrd')
-rw-r--r--pbrd/pbr_vty.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/pbrd/pbr_vty.c b/pbrd/pbr_vty.c
index 26163dcc5..216834fe0 100644
--- a/pbrd/pbr_vty.c
+++ b/pbrd/pbr_vty.c
@@ -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) {