mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 09:22:03 +00:00
lib, zebra: Fix CR comments
lib -> Add a bit of documentation about what units we are in. zebra -> Fix failure case to be a bit better. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
6f4c7f7476
commit
eb649b7ff3
2
lib/if.h
2
lib/if.h
@ -229,7 +229,7 @@ struct interface
|
|||||||
/* Interface metric */
|
/* Interface metric */
|
||||||
uint32_t metric;
|
uint32_t metric;
|
||||||
|
|
||||||
/* Interface Speed */
|
/* Interface Speed in Mb/s */
|
||||||
uint32_t speed;
|
uint32_t speed;
|
||||||
|
|
||||||
/* Interface MTU. */
|
/* Interface MTU. */
|
||||||
|
@ -330,8 +330,10 @@ get_iflink_speed (const char *ifname)
|
|||||||
/* Get the current link state for the interface */
|
/* Get the current link state for the interface */
|
||||||
rc = ioctl(sd, SIOCETHTOOL, (char *)&ifdata);
|
rc = ioctl(sd, SIOCETHTOOL, (char *)&ifdata);
|
||||||
if(rc < 0) {
|
if(rc < 0) {
|
||||||
zlog_debug ("IOCTL failure to read interface %s speed: %d %s",
|
zlog_debug("IOCTL failure to read interface %s speed: %d %s",
|
||||||
ifname, errno, safe_strerror(errno));
|
ifname, errno, safe_strerror(errno));
|
||||||
|
ecmd.speed_hi = 0;
|
||||||
|
ecmd.speed = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
close(sd);
|
close(sd);
|
||||||
|
Loading…
Reference in New Issue
Block a user