diff options
author | Mark Stapp <mjs@voltanet.io> | 2021-01-05 19:54:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-05 19:54:06 +0100 |
commit | 6b669132759d9ce501e2ab2621f4347f70226e40 (patch) | |
tree | 3a604e7e51915b1286425c7a0f928b29b8e33421 /pbrd | |
parent | Merge pull request #7772 from LabNConsulting/ziemba/tests-lutil-timestamp (diff) | |
parent | zebra: derive rule family from src->dst->ipv4 (diff) | |
download | frr-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.c | 10 |
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) { |