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>
/* Interface metric */
uint32_t metric;
- /* Interface Speed */
+ /* Interface Speed in Mb/s */
uint32_t speed;
/* Interface MTU. */
/* Get the current link state for the interface */
rc = ioctl(sd, SIOCETHTOOL, (char *)&ifdata);
if(rc < 0) {
- zlog_debug ("IOCTL failure to read interface %s speed: %d %s",
- ifname, errno, safe_strerror(errno));
+ zlog_debug("IOCTL failure to read interface %s speed: %d %s",
+ ifname, errno, safe_strerror(errno));
+ ecmd.speed_hi = 0;
+ ecmd.speed = 0;
}
close(sd);