summaryrefslogtreecommitdiff
path: root/zebra/router-id.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/router-id.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/router-id.c')
-rw-r--r--zebra/router-id.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/zebra/router-id.c b/zebra/router-id.c
index ea438b4367..9f56cf0e6a 100644
--- a/zebra/router-id.c
+++ b/zebra/router-id.c
@@ -342,7 +342,7 @@ DEFUN (ip_router_id_in_vrf,
"Manually set the router-id\n"
"IP address to use for router-id\n")
{
- ZEBRA_DECLVAR_CONTEXT(vrf, zvrf);
+ ZEBRA_DECLVAR_CONTEXT_VRF(vrf, zvrf);
int idx = 0;
struct prefix rid;
@@ -372,7 +372,7 @@ DEFUN (ipv6_router_id_in_vrf,
"Manually set the IPv6 router-id\n"
"IPV6 address to use for router-id\n")
{
- ZEBRA_DECLVAR_CONTEXT(vrf, zvrf);
+ ZEBRA_DECLVAR_CONTEXT_VRF(vrf, zvrf);
int idx = 0;
struct prefix rid;
@@ -458,7 +458,7 @@ DEFUN (no_ip_router_id_in_vrf,
"Remove the manually configured router-id\n"
"IP address to use for router-id\n")
{
- ZEBRA_DECLVAR_CONTEXT(vrf, zvrf);
+ ZEBRA_DECLVAR_CONTEXT_VRF(vrf, zvrf);
struct prefix rid;
@@ -486,7 +486,7 @@ DEFUN (no_ipv6_router_id_in_vrf,
"Remove the manually configured IPv6 router-id\n"
"IPv6 address to use for router-id\n")
{
- ZEBRA_DECLVAR_CONTEXT(vrf, zvrf);
+ ZEBRA_DECLVAR_CONTEXT_VRF(vrf, zvrf);
struct prefix rid;