summaryrefslogtreecommitdiff
path: root/zebra/kernel_socket.c
diff options
context:
space:
mode:
authorpaul <paul>2006-01-17 18:03:04 +0000
committerpaul <paul>2006-01-17 18:03:04 +0000
commitd34b8991b4c156ff3281558dd8252d3787ae8d8b (patch)
treef198a545a4363d91c40b6303a03d2c7e323cc5be /zebra/kernel_socket.c
parent61f42aed5e1cee1a853f92110d794a286995d203 (diff)
[zebra] Record NEWADDR metric on PF_ROUTE, print CACHEINFO debug on netlink
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.
Diffstat (limited to 'zebra/kernel_socket.c')
-rw-r--r--zebra/kernel_socket.c8
1 files changed, 6 insertions, 2 deletions
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,