mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 08:32:45 +00:00
zebra: Attempt to make ioctl.c have a bit more useful log messges
While examining the code, it was noticed that there was a chance to improve the log output in some cases to give a fuller understanding of what went wrong where. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
442321664b
commit
7c4910cead
@ -160,7 +160,8 @@ void if_get_mtu(struct interface *ifp)
|
|||||||
|
|
||||||
#if defined(SIOCGIFMTU)
|
#if defined(SIOCGIFMTU)
|
||||||
if (vrf_if_ioctl(SIOCGIFMTU, (caddr_t)&ifreq, ifp->vrf->vrf_id) < 0) {
|
if (vrf_if_ioctl(SIOCGIFMTU, (caddr_t)&ifreq, ifp->vrf->vrf_id) < 0) {
|
||||||
zlog_info("Can't lookup mtu by ioctl(SIOCGIFMTU)");
|
zlog_info("Can't lookup mtu by ioctl(SIOCGIFMTU) for %s(%u)",
|
||||||
|
ifp->name, ifp->vrf->vrf_id);
|
||||||
ifp->mtu6 = ifp->mtu = -1;
|
ifp->mtu6 = ifp->mtu = -1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -171,7 +172,8 @@ void if_get_mtu(struct interface *ifp)
|
|||||||
zebra_interface_up_update(ifp);
|
zebra_interface_up_update(ifp);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
zlog_info("Can't lookup mtu on this system");
|
zlog_info("Can't lookup mtu on this system for %s(%u)", ifp->name,
|
||||||
|
ifp->vrf->vrf_id);
|
||||||
ifp->mtu6 = ifp->mtu = -1;
|
ifp->mtu6 = ifp->mtu = -1;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -512,7 +514,8 @@ int if_set_flags(struct interface *ifp, uint64_t flags)
|
|||||||
ret = vrf_if_ioctl(SIOCSIFFLAGS, (caddr_t)&ifreq, ifp->vrf->vrf_id);
|
ret = vrf_if_ioctl(SIOCSIFFLAGS, (caddr_t)&ifreq, ifp->vrf->vrf_id);
|
||||||
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
zlog_info("can't set interface flags");
|
zlog_info("can't set interface %s(%u) flags %" PRIu64,
|
||||||
|
ifp->name, ifp->vrf->vrf_id, flags);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@ -533,7 +536,8 @@ int if_unset_flags(struct interface *ifp, uint64_t flags)
|
|||||||
ret = vrf_if_ioctl(SIOCSIFFLAGS, (caddr_t)&ifreq, ifp->vrf->vrf_id);
|
ret = vrf_if_ioctl(SIOCSIFFLAGS, (caddr_t)&ifreq, ifp->vrf->vrf_id);
|
||||||
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
zlog_info("can't unset interface flags");
|
zlog_warn("can't unset interface %s(%u) flags %" PRIu64,
|
||||||
|
ifp->name, ifp->vrf->vrf_id, flags);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user