[zebra] Fix interface metric bug on BSD
2007-03-06 Paul Jakma <paul.jakma@sun.com>
* kernel_socket.c: (ifam_read) Do not update interface metric on
receipt of NEW/DEL ADDR messages, bogus as: a) some systems
dont include iface metric for address events b) we didn't
update clients either. Initial diagnosis by Eugene Grosbein.
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c
index ac06566..5281236 100644
--- a/zebra/kernel_socket.c
+++ b/zebra/kernel_socket.c
@@ -585,8 +585,15 @@
if (ifnlen && strncmp (ifp->name, ifname, INTERFACE_NAMSIZ))
isalias = 1;
+#if 0
+ /* it might seem cute to grab the interface metric here, however
+ * we're processing an address update message, and so some systems
+ * (e.g. FBSD) dont bother to fill in ifam_metric. Disabled, but left
+ * in deliberately, as comment.
+ */
ifp->metric = ifam->ifam_metric;
-
+#endif
+
/* Add connected address. */
switch (sockunion_family (&addr))
{