mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-12 18:59:22 +00:00
ospfd: Add a function to return the name of the vrf we are in.
Add a helper function to return the name of the vrf we are in so it can be used as part of debug strings. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
f573ec607c
commit
88b6b28ef3
@ -2173,3 +2173,11 @@ const char *ospf_vrf_id_to_name(vrf_id_t vrf_id)
|
||||
|
||||
return vrf ? vrf->name : "NIL";
|
||||
}
|
||||
|
||||
const char *ospf_get_name(const struct ospf *ospf)
|
||||
{
|
||||
if (ospf->name)
|
||||
return ospf->name;
|
||||
else
|
||||
return VRF_DEFAULT_NAME;
|
||||
}
|
||||
|
@ -572,4 +572,5 @@ extern void ospf_vrf_unlink(struct ospf *ospf, struct vrf *vrf);
|
||||
const char *ospf_vrf_id_to_name(vrf_id_t vrf_id);
|
||||
int ospf_area_nssa_no_summary_set(struct ospf *, struct in_addr);
|
||||
|
||||
const char *ospf_get_name(const struct ospf *ospf);
|
||||
#endif /* _ZEBRA_OSPFD_H */
|
||||
|
Loading…
Reference in New Issue
Block a user