summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_vrf.h
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 /zebra/zebra_vrf.h
parentMerge pull request #6181 from volta-networks/fix_isisd_no_metric_style (diff)
downloadfrr-bd47f3a3b45849dcc459c4df6f2556c96bf5f600.tar.xz
frr-bd47f3a3b45849dcc459c4df6f2556c96bf5f600.zip
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 'zebra/zebra_vrf.h')
-rw-r--r--zebra/zebra_vrf.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/zebra/zebra_vrf.h b/zebra/zebra_vrf.h
index 5448e1707..268ee12a6 100644
--- a/zebra/zebra_vrf.h
+++ b/zebra/zebra_vrf.h
@@ -193,7 +193,7 @@ struct zebra_vrf {
static inline vrf_id_t zvrf_id(struct zebra_vrf *zvrf)
{
if (!zvrf || !zvrf->vrf)
- return VRF_UNKNOWN;
+ return VRF_DEFAULT;
return zvrf->vrf->vrf_id;
}
@@ -206,6 +206,8 @@ static inline const char *zvrf_ns_name(struct zebra_vrf *zvrf)
static inline const char *zvrf_name(struct zebra_vrf *zvrf)
{
+ if (!zvrf || !zvrf->vrf)
+ return "Unknown";
return zvrf->vrf->name;
}