mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-12 09:52:27 +00:00
pbrd: don't silently fail on atomic match MARK change attempts
Also don't silently fail when we attempt to atomically change a match MARK to a new one. We would overwrite the frist one but never actually install it. Change it to explicitly fail if a config is already present for now. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
This commit is contained in:
parent
0dcff6f463
commit
46b0382056
@ -189,8 +189,13 @@ DEFPY(pbr_map_match_mark, pbr_map_match_mark_cmd,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!no) {
|
if (!no) {
|
||||||
if (pbrms->mark == (uint32_t) mark)
|
if (pbrms->mark && pbrms->mark == (uint32_t)mark)
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
|
else if (pbrms->mark) {
|
||||||
|
vty_out(vty,
|
||||||
|
"A `match mark XX` command already exists, please remove that first\n");
|
||||||
|
return CMD_WARNING_CONFIG_FAILED;
|
||||||
|
} else
|
||||||
pbrms->mark = (uint32_t)mark;
|
pbrms->mark = (uint32_t)mark;
|
||||||
} else {
|
} else {
|
||||||
pbrms->mark = 0;
|
pbrms->mark = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user