summaryrefslogtreecommitdiff
path: root/zebra/zebra_routemap.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2022-04-28 11:06:20 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2022-04-28 11:09:26 +0200
commit0cbed9511acbf4adbf9209a022b48e1fc0d0e2a3 (patch)
treeaaf3ad8885757cc3cb234333d89093bf40bd4144 /zebra/zebra_routemap.c
parent633a50d11c7dc14e543e849cc4ec135ca0416f17 (diff)
lib, zebra, pimd: clean up/fix VRF DECLVAR macros
There's a common pattern of "get VRF context for CLI node" here, which first got a helper macro in zebra that then permeated into pimd. Unfortunately the pimd copy wasn't quite adjusted correctly and thus caused two coverity warnings (CID 1517453, CID 1517454). Fix the PIM one, and clean up by providing a common base macro in `lib/vty.h`. Also rename the macros (add `_VRF`) to make more clear what they do. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'zebra/zebra_routemap.c')
-rw-r--r--zebra/zebra_routemap.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c
index e99cb76119..2cc84a1f7f 100644
--- a/zebra/zebra_routemap.c
+++ b/zebra/zebra_routemap.c
@@ -638,7 +638,7 @@ DEFPY_YANG (ip_protocol,
assert(proto);
assert(rmap);
- ZEBRA_DECLVAR_CONTEXT(vrf, zvrf);
+ ZEBRA_DECLVAR_CONTEXT_VRF(vrf, zvrf);
if (!zvrf)
return CMD_WARNING;
@@ -672,7 +672,7 @@ DEFPY_YANG (no_ip_protocol,
assert(proto);
- ZEBRA_DECLVAR_CONTEXT(vrf, zvrf);
+ ZEBRA_DECLVAR_CONTEXT_VRF(vrf, zvrf);
if (!zvrf)
return CMD_WARNING;
@@ -719,7 +719,7 @@ DEFPY_YANG (ipv6_protocol,
assert(rmap);
assert(proto);
- ZEBRA_DECLVAR_CONTEXT(vrf, zvrf);
+ ZEBRA_DECLVAR_CONTEXT_VRF(vrf, zvrf);
if (!zvrf)
return CMD_WARNING;
@@ -753,7 +753,7 @@ DEFPY_YANG (no_ipv6_protocol,
assert(proto);
- ZEBRA_DECLVAR_CONTEXT(vrf, zvrf);
+ ZEBRA_DECLVAR_CONTEXT_VRF(vrf, zvrf);
if (!zvrf)
return CMD_WARNING;
@@ -801,7 +801,7 @@ DEFPY_YANG (ip_protocol_nht_rmap,
assert(proto);
assert(rmap);
- ZEBRA_DECLVAR_CONTEXT(vrf, zvrf);
+ ZEBRA_DECLVAR_CONTEXT_VRF(vrf, zvrf);
if (!zvrf)
return CMD_WARNING;
@@ -835,7 +835,7 @@ DEFPY_YANG (no_ip_protocol_nht_rmap,
assert(proto);
- ZEBRA_DECLVAR_CONTEXT(vrf, zvrf);
+ ZEBRA_DECLVAR_CONTEXT_VRF(vrf, zvrf);
if (!zvrf)
return CMD_WARNING;
@@ -883,7 +883,7 @@ DEFPY_YANG (ipv6_protocol_nht_rmap,
assert(rmap);
assert(proto);
- ZEBRA_DECLVAR_CONTEXT(vrf, zvrf);
+ ZEBRA_DECLVAR_CONTEXT_VRF(vrf, zvrf);
if (!zvrf)
return CMD_WARNING;
@@ -917,7 +917,7 @@ DEFPY_YANG (no_ipv6_protocol_nht_rmap,
assert(proto);
- ZEBRA_DECLVAR_CONTEXT(vrf, zvrf);
+ ZEBRA_DECLVAR_CONTEXT_VRF(vrf, zvrf);
if (!zvrf)
return CMD_WARNING;