]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib, zebra: Fix CR comments
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 3 Apr 2017 22:28:26 +0000 (18:28 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 3 Apr 2017 22:28:26 +0000 (18:28 -0400)
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>
lib/if.h
zebra/if_netlink.c

index d7ec4956366f58a28c673eb00c9d805b6a3c34d3..e8e84ffc8886f0cc214d63f4be33263200c5ced2 100644 (file)
--- 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. */
index b1d4dd81d9141c18b3d63cff19c4dd6f98427168..28538fabdf6770748190e8d2947e72dbba5ea812 100644 (file)
@@ -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);