diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-03-22 18:25:20 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-04-06 19:22:43 +0200 |
commit | b8eb036fb289df03190f0a88dbee2431d21c0d55 (patch) | |
tree | f714efe17baae3ef18d80ce06afdb665b33676ab /pbrd | |
parent | pbrd: fix deletion of match or src of valid pbr-map (diff) | |
download | frr-b8eb036fb289df03190f0a88dbee2431d21c0d55.tar.xz frr-b8eb036fb289df03190f0a88dbee2431d21c0d55.zip |
pbrd: If we get the same prefix safely ignore
If the match src-ip or dst-ip command entered has already
been received and it's the same prefix, we are done and
do not need to do anything more.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pbrd')
-rw-r--r-- | pbrd/pbr_vty.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pbrd/pbr_vty.c b/pbrd/pbr_vty.c index 0e66c3970..c8c3ed330 100644 --- a/pbrd/pbr_vty.c +++ b/pbrd/pbr_vty.c @@ -96,6 +96,9 @@ DEFPY(pbr_map_match_src, pbr_map_match_src_cmd, struct pbr_map_sequence *pbrms = VTY_GET_CONTEXT(pbr_map_sequence); if (!no) { + if (prefix_same(pbrms->src, prefix)) + return CMD_SUCCESS; + if (!pbrms->src) pbrms->src = prefix_new(); prefix_copy(pbrms->src, prefix); @@ -120,6 +123,9 @@ DEFPY(pbr_map_match_dst, pbr_map_match_dst_cmd, struct pbr_map_sequence *pbrms = VTY_GET_CONTEXT(pbr_map_sequence); if (!no) { + if (prefix_same(pbrms->dst, prefix)) + return CMD_SUCCESS; + if (!pbrms->dst) pbrms->dst = prefix_new(); prefix_copy(pbrms->dst, prefix); |