diff --git a/lib/if.h b/lib/if.h index d7ec495636..e8e84ffc88 100644 --- a/lib/if.h +++ b/lib/if.h @@ -229,7 +229,7 @@ struct interface /* Interface metric */ uint32_t metric; - /* Interface Speed */ + /* Interface Speed in Mb/s */ uint32_t speed; /* Interface MTU. */ diff --git a/zebra/if_netlink.c b/zebra/if_netlink.c index b1d4dd81d9..28538fabdf 100644 --- a/zebra/if_netlink.c +++ b/zebra/if_netlink.c @@ -330,8 +330,10 @@ get_iflink_speed (const char *ifname) /* 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);