diff options
author | paul <paul> | 2006-01-17 19:03:04 +0100 |
---|---|---|
committer | paul <paul> | 2006-01-17 19:03:04 +0100 |
commit | d34b8991b4c156ff3281558dd8252d3787ae8d8b (patch) | |
tree | f198a545a4363d91c40b6303a03d2c7e323cc5be /zebra/kernel_socket.c | |
parent | [zebra] Defensive if_getaddrs bug fix. (diff) | |
download | frr-d34b8991b4c156ff3281558dd8252d3787ae8d8b.tar.xz frr-d34b8991b4c156ff3281558dd8252d3787ae8d8b.zip |
[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.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c index c4c1f2c62..ae19ef8fe 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, |