summaryrefslogtreecommitdiff
path: root/zebra
diff options
context:
space:
mode:
Diffstat (limited to 'zebra')
-rw-r--r--zebra/ChangeLog9
-rw-r--r--zebra/kernel_socket.c8
-rw-r--r--zebra/rt_netlink.c7
3 files changed, 22 insertions, 2 deletions
diff --git a/zebra/ChangeLog b/zebra/ChangeLog
index 169f0a63..a40d3e93 100644
--- a/zebra/ChangeLog
+++ b/zebra/ChangeLog
@@ -1,3 +1,12 @@
+2006-01-17 Paul Jakma <paul.jakma@sun.com>
+
+ * kernel_socket.c: (ifam_read) Read metric from RTM_NEWADDR.
+ If interface is an alias, pass the alias as a label for
+ connected_add_ipv{4,6}.
+ * rt_netlink.c: (netlink_interface_addr) print out
+ IFA_CACHEINFO info, if present, when debugging kernel
+ messages.
+
2006-01-17 Gunnar Stigen <gunnar.stigen@axxessit.no>
* connected.c: (connected_up_ipv{4,6}) Include interface metric on
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c
index c4c1f2c6..ae19ef8f 100644
--- a/zebra/kernel_socket.c
+++ b/zebra/kernel_socket.c
@@ -544,6 +544,8 @@ ifam_read (struct ifa_msghdr *ifam)
if (ifnlen && strncmp (ifp->name, ifname, INTERFACE_NAMSIZ))
isalias = 1;
+ ifp->metric = ifam->ifam_metric;
+
/* Check interface flag for implicit up of the interface. */
if_refresh (ifp);
@@ -554,7 +556,8 @@ ifam_read (struct ifa_msghdr *ifam)
if (ifam->ifam_type == RTM_NEWADDR)
connected_add_ipv4 (ifp, 0, &addr.sin.sin_addr,
ip_masklen (mask.sin.sin_addr),
- &brd.sin.sin_addr, NULL);
+ &brd.sin.sin_addr,
+ (isalias ? ifname : NULL));
else
connected_delete_ipv4 (ifp, 0, &addr.sin.sin_addr,
ip_masklen (mask.sin.sin_addr),
@@ -571,7 +574,8 @@ ifam_read (struct ifa_msghdr *ifam)
connected_add_ipv6 (ifp,
&addr.sin6.sin6_addr,
ip6_masklen (mask.sin6.sin6_addr),
- &brd.sin6.sin6_addr, NULL);
+ &brd.sin6.sin6_addr,
+ (isalias ? ifname : NULL));
else
connected_delete_ipv6 (ifp,
&addr.sin6.sin6_addr,
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index 6e914087..f1c1a300 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -628,6 +628,13 @@ netlink_interface_addr (struct sockaddr_nl *snl, struct nlmsghdr *h)
buf, BUFSIZ), ifa->ifa_prefixlen);
if (tb[IFA_LABEL] && strcmp (ifp->name, RTA_DATA (tb[IFA_LABEL])))
zlog_debug (" IFA_LABEL %s", (char *)RTA_DATA (tb[IFA_LABEL]));
+
+ if (tb[IFA_CACHEINFO])
+ {
+ struct ifa_cacheinfo *ci = RTA_DATA (tb[IFA_CACHEINFO]);
+ zlog_debug (" IFA_CACHEINFO pref %d, valid %d",
+ ci->ifa_prefered, ci->ifa_valid);
+ }
}
if (tb[IFA_ADDRESS] == NULL)