mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 00:41:20 +00:00
ripngd: Add vrf name to debug output
The vrf id is insufficient of a discriminator in people's head Give them what they need. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
5434aac451
commit
24c4ee4a1f
@ -198,11 +198,14 @@ static int ripng_if_down(struct interface *ifp)
|
|||||||
/* Inteface link up message processing. */
|
/* Inteface link up message processing. */
|
||||||
static int ripng_ifp_up(struct interface *ifp)
|
static int ripng_ifp_up(struct interface *ifp)
|
||||||
{
|
{
|
||||||
if (IS_RIPNG_DEBUG_ZEBRA)
|
if (IS_RIPNG_DEBUG_ZEBRA) {
|
||||||
|
struct vrf *vrf = vrf_lookup_by_id(ifp->vrf_id);
|
||||||
|
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"interface up %s vrf %u index %d flags %llx metric %d mtu %d",
|
"interface up %s vrf %s(%u) index %d flags %llx metric %d mtu %d",
|
||||||
ifp->name, ifp->vrf_id, ifp->ifindex,
|
ifp->name, VRF_LOGNAME(vrf), ifp->vrf_id, ifp->ifindex,
|
||||||
(unsigned long long)ifp->flags, ifp->metric, ifp->mtu6);
|
(unsigned long long)ifp->flags, ifp->metric, ifp->mtu6);
|
||||||
|
}
|
||||||
|
|
||||||
ripng_interface_sync(ifp);
|
ripng_interface_sync(ifp);
|
||||||
|
|
||||||
@ -224,11 +227,14 @@ static int ripng_ifp_down(struct interface *ifp)
|
|||||||
ripng_interface_sync(ifp);
|
ripng_interface_sync(ifp);
|
||||||
ripng_if_down(ifp);
|
ripng_if_down(ifp);
|
||||||
|
|
||||||
if (IS_RIPNG_DEBUG_ZEBRA)
|
if (IS_RIPNG_DEBUG_ZEBRA) {
|
||||||
|
struct vrf *vrf = vrf_lookup_by_id(ifp->vrf_id);
|
||||||
|
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"interface down %s vrf %u index %d flags %#llx metric %d mtu %d",
|
"interface down %s vrf %s(%u) index %d flags %#llx metric %d mtu %d",
|
||||||
ifp->name, ifp->vrf_id, ifp->ifindex,
|
ifp->name, VRF_LOGNAME(vrf), ifp->vrf_id, ifp->ifindex,
|
||||||
(unsigned long long)ifp->flags, ifp->metric, ifp->mtu6);
|
(unsigned long long)ifp->flags, ifp->metric, ifp->mtu6);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -238,11 +244,14 @@ static int ripng_ifp_create(struct interface *ifp)
|
|||||||
{
|
{
|
||||||
ripng_interface_sync(ifp);
|
ripng_interface_sync(ifp);
|
||||||
|
|
||||||
if (IS_RIPNG_DEBUG_ZEBRA)
|
if (IS_RIPNG_DEBUG_ZEBRA) {
|
||||||
|
struct vrf *vrf = vrf_lookup_by_id(ifp->vrf_id);
|
||||||
|
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"RIPng interface add %s vrf %u index %d flags %#llx metric %d mtu %d",
|
"RIPng interface add %s vrf %s(%u) index %d flags %#llx metric %d mtu %d",
|
||||||
ifp->name, ifp->vrf_id, ifp->ifindex,
|
ifp->name, VRF_LOGNAME(vrf), ifp->vrf_id, ifp->ifindex,
|
||||||
(unsigned long long)ifp->flags, ifp->metric, ifp->mtu6);
|
(unsigned long long)ifp->flags, ifp->metric, ifp->mtu6);
|
||||||
|
}
|
||||||
|
|
||||||
/* Check is this interface is RIP enabled or not.*/
|
/* Check is this interface is RIP enabled or not.*/
|
||||||
ripng_enable_apply(ifp);
|
ripng_enable_apply(ifp);
|
||||||
@ -258,14 +267,16 @@ static int ripng_ifp_create(struct interface *ifp)
|
|||||||
|
|
||||||
static int ripng_ifp_destroy(struct interface *ifp)
|
static int ripng_ifp_destroy(struct interface *ifp)
|
||||||
{
|
{
|
||||||
|
struct vrf *vrf = vrf_lookup_by_id(ifp->vrf_id);
|
||||||
|
|
||||||
ripng_interface_sync(ifp);
|
ripng_interface_sync(ifp);
|
||||||
if (if_is_up(ifp)) {
|
if (if_is_up(ifp)) {
|
||||||
ripng_if_down(ifp);
|
ripng_if_down(ifp);
|
||||||
}
|
}
|
||||||
|
|
||||||
zlog_info(
|
zlog_info(
|
||||||
"interface delete %s vrf %u index %d flags %#llx metric %d mtu %d",
|
"interface delete %s vrf %s(%u) index %d flags %#llx metric %d mtu %d",
|
||||||
ifp->name, ifp->vrf_id, ifp->ifindex,
|
ifp->name, VRF_LOGNAME(vrf), ifp->vrf_id, ifp->ifindex,
|
||||||
(unsigned long long)ifp->flags, ifp->metric, ifp->mtu6);
|
(unsigned long long)ifp->flags, ifp->metric, ifp->mtu6);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -282,9 +293,14 @@ int ripng_interface_vrf_update(ZAPI_CALLBACK_ARGS)
|
|||||||
if (!ifp)
|
if (!ifp)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (IS_RIPNG_DEBUG_ZEBRA)
|
if (IS_RIPNG_DEBUG_ZEBRA) {
|
||||||
zlog_debug("interface %s VRF change vrf_id %u new vrf id %u",
|
struct vrf *vrf = vrf_lookup_by_id(ifp->vrf_id);
|
||||||
ifp->name, vrf_id, new_vrf_id);
|
struct vrf *nvrf = vrf_lookup_by_id(new_vrf_id);
|
||||||
|
|
||||||
|
zlog_debug("interface %s VRF change vrf %s(%u) new vrf %s(%u)",
|
||||||
|
ifp->name, VRF_LOGNAME(vrf), vrf_id,
|
||||||
|
VRF_LOGNAME(nvrf), new_vrf_id);
|
||||||
|
}
|
||||||
|
|
||||||
if_update_to_new_vrf(ifp, new_vrf_id);
|
if_update_to_new_vrf(ifp, new_vrf_id);
|
||||||
ripng_interface_sync(ifp);
|
ripng_interface_sync(ifp);
|
||||||
|
Loading…
Reference in New Issue
Block a user