summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_vty.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_vty.c
parentMerge pull request #11031 from AbhishekNR/v6_multicast (diff)
downloadfrr-0cbed9511acbf4adbf9209a022b48e1fc0d0e2a3.tar.xz
frr-0cbed9511acbf4adbf9209a022b48e1fc0d0e2a3.zip
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 '')
-rw-r--r--zebra/zebra_vty.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index 22c65e3c0..709d6e0a5 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -1413,7 +1413,7 @@ DEFUN (ip_nht_default_route,
"Filter Next Hop tracking route resolution\n"
"Resolve via default route\n")
{
- ZEBRA_DECLVAR_CONTEXT(vrf, zvrf);
+ ZEBRA_DECLVAR_CONTEXT_VRF(vrf, zvrf);
if (!zvrf)
return CMD_WARNING;
@@ -1752,7 +1752,7 @@ DEFUN (no_ip_nht_default_route,
"Filter Next Hop tracking route resolution\n"
"Resolve via default route\n")
{
- ZEBRA_DECLVAR_CONTEXT(vrf, zvrf);
+ ZEBRA_DECLVAR_CONTEXT_VRF(vrf, zvrf);
if (!zvrf)
return CMD_WARNING;
@@ -1772,7 +1772,7 @@ DEFUN (ipv6_nht_default_route,
"Filter Next Hop tracking route resolution\n"
"Resolve via default route\n")
{
- ZEBRA_DECLVAR_CONTEXT(vrf, zvrf);
+ ZEBRA_DECLVAR_CONTEXT_VRF(vrf, zvrf);
if (!zvrf)
return CMD_WARNING;
@@ -1793,7 +1793,7 @@ DEFUN (no_ipv6_nht_default_route,
"Filter Next Hop tracking route resolution\n"
"Resolve via default route\n")
{
- ZEBRA_DECLVAR_CONTEXT(vrf, zvrf);
+ ZEBRA_DECLVAR_CONTEXT_VRF(vrf, zvrf);
if (!zvrf)
return CMD_WARNING;
@@ -2950,7 +2950,7 @@ DEFUN (vrf_vni_mapping,
{
int filter = 0;
- ZEBRA_DECLVAR_CONTEXT(vrf, zvrf);
+ ZEBRA_DECLVAR_CONTEXT_VRF(vrf, zvrf);
assert(vrf);
assert(zvrf);
@@ -2979,7 +2979,7 @@ DEFUN (no_vrf_vni_mapping,
{
int filter = 0;
- ZEBRA_DECLVAR_CONTEXT(vrf, zvrf);
+ ZEBRA_DECLVAR_CONTEXT_VRF(vrf, zvrf);
vni_t vni = strtoul(argv[2]->arg, NULL, 10);
assert(vrf);
@@ -4395,7 +4395,7 @@ DEFUN(ip_table_range, ip_table_range_cmd,
"Start Routing Table\n"
"End Routing Table\n")
{
- ZEBRA_DECLVAR_CONTEXT(vrf, zvrf);
+ ZEBRA_DECLVAR_CONTEXT_VRF(vrf, zvrf);
if (!zvrf)
return CMD_WARNING;