summaryrefslogtreecommitdiff
path: root/lib/vrf.c
diff options
context:
space:
mode:
authorJakub Urbańczyk <xthaid@gmail.com>2020-03-15 19:42:30 +0100
committerJakub Urbańczyk <xthaid@gmail.com>2020-04-12 21:03:29 +0200
commitbd47f3a3b45849dcc459c4df6f2556c96bf5f600 (patch)
tree32819513ac29f9f01132b477050ae1831fac1af7 /lib/vrf.c
parent66c79a36ea7e10d523bf070f2ee299e9eae805c7 (diff)
zebra: Add vrf name and id to debugs
In some places we log the interface but not the vfr the interface is in. In others we only output the vrf id, which can be difficult for human to read. This commit makes zebra debugs more vrf aware. Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
Diffstat (limited to 'lib/vrf.c')
-rw-r--r--lib/vrf.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/vrf.c b/lib/vrf.c
index 31ea2d6c4c..9bc0db0b58 100644
--- a/lib/vrf.c
+++ b/lib/vrf.c
@@ -324,10 +324,7 @@ const char *vrf_id_to_name(vrf_id_t vrf_id)
struct vrf *vrf;
vrf = vrf_lookup_by_id(vrf_id);
- if (vrf)
- return vrf->name;
-
- return "n/a";
+ return VRF_LOGNAME(vrf);
}
vrf_id_t vrf_name_to_id(const char *name)