diff options
author | Philippe Guibert <philippe.guibert@6wind.com> | 2021-01-08 16:17:28 +0100 |
---|---|---|
committer | Philippe Guibert <philippe.guibert@6wind.com> | 2021-01-09 14:29:45 +0100 |
commit | 99950bc559cd2b466e4d02447fa6c1ecc5395270 (patch) | |
tree | ace2bd4502eeece08299201fe4a054abd20b9a5d /bfdd | |
parent | bfdd: update vrf of received packet (diff) | |
download | frr-99950bc559cd2b466e4d02447fa6c1ecc5395270.tar.xz frr-99950bc559cd2b466e4d02447fa6c1ecc5395270.zip |
bfdd: improve some debug messages related to zebra notifications
when receiving interface and address notifications, one may be puzzled
by the information since for example, the presence of an interface is
not enough to use it in a bfd session, simply because the interface is
in the wrong vrf. add VRF information on those traces.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'bfdd')
-rw-r--r-- | bfdd/bfd.c | 6 | ||||
-rw-r--r-- | bfdd/ptm_adapter.c | 11 |
2 files changed, 10 insertions, 7 deletions
diff --git a/bfdd/bfd.c b/bfdd/bfd.c index 622b6ef39..ca4bf9495 100644 --- a/bfdd/bfd.c +++ b/bfdd/bfd.c @@ -327,14 +327,16 @@ int bfd_session_enable(struct bfd_session *bs) ifp = if_lookup_by_name_all_vrf(bs->key.ifname); if (ifp == NULL) { zlog_err( - "session-enable: specified interface doesn't exists."); + "session-enable: specified interface %s (VRF %s) doesn't exist.", + bs->key.ifname, vrf ? vrf->name : "<all>"); return 0; } if (bs->key.ifname[0] && !vrf) { vrf = vrf_lookup_by_id(ifp->vrf_id); if (vrf == NULL) { zlog_err( - "session-enable: specified VRF doesn't exists."); + "session-enable: specified VRF %u doesn't exist.", + ifp->vrf_id); return 0; } } diff --git a/bfdd/ptm_adapter.c b/bfdd/ptm_adapter.c index 26ff7bd18..57fb81aa2 100644 --- a/bfdd/ptm_adapter.c +++ b/bfdd/ptm_adapter.c @@ -766,7 +766,8 @@ void bfdd_sessions_disable_vrf(struct vrf *vrf) static int bfd_ifp_destroy(struct interface *ifp) { if (bglobal.debug_zebra) - zlog_debug("zclient: delete interface %s", ifp->name); + zlog_debug("zclient: delete interface %s (VRF %u)", ifp->name, + ifp->vrf_id); bfdd_sessions_disable_interface(ifp); @@ -819,10 +820,10 @@ static int bfdd_interface_address_update(ZAPI_CALLBACK_ARGS) return 0; if (bglobal.debug_zebra) - zlog_debug("zclient: %s local address %pFX", + zlog_debug("zclient: %s local address %pFX (VRF %u)", cmd == ZEBRA_INTERFACE_ADDRESS_ADD ? "add" : "delete", - ifc->address); + ifc->address, vrf_id); if (cmd == ZEBRA_INTERFACE_ADDRESS_ADD) bfdd_sessions_enable_address(ifc); @@ -835,8 +836,8 @@ static int bfdd_interface_address_update(ZAPI_CALLBACK_ARGS) static int bfd_ifp_create(struct interface *ifp) { if (bglobal.debug_zebra) - zlog_debug("zclient: add interface %s", ifp->name); - + zlog_debug("zclient: add interface %s (VRF %u)", ifp->name, + ifp->vrf_id); bfdd_sessions_enable_interface(ifp); return 0; |