summaryrefslogtreecommitdiff
path: root/zebra
diff options
context:
space:
mode:
authorChristian Franke <chris@opensourcerouting.org>2013-01-24 14:04:43 +0000
committerDavid Lamparter <equinox@opensourcerouting.org>2013-09-19 17:51:00 +0200
commit599da95527ec8e09cd3d890dc3addc6f2e791a0c (patch)
tree8d1ba2663b01be4c2be0a05aceef927181f64eb8 /zebra
parent23cd8fb7133befdb84b3a918f7b2f6147161ac6e (diff)
zebra: process information about new addresses (BZ#486)
Because of a change of semantics in the Linux kernel, information about changes made by zebra itself was not considered for updates. This change should fix this by accounting for the new semantics. It is based on a patch by lich posted to the bugzilla #486 Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'zebra')
-rw-r--r--zebra/rt_netlink.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index bab17037..86e02efb 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -381,8 +381,11 @@ netlink_parse_info (int (*filter) (struct sockaddr_nl *, struct nlmsghdr *),
lookup (nlmsg_str, h->nlmsg_type), h->nlmsg_type,
h->nlmsg_seq, h->nlmsg_pid);
- /* skip unsolicited messages originating from command socket */
- if (nl != &netlink_cmd && h->nlmsg_pid == netlink_cmd.snl.nl_pid)
+ /* skip unsolicited messages originating from command socket
+ * linux sets the originators port-id for {NEW|DEL}ADDR messages,
+ * so this has to be checked here. */
+ if (nl != &netlink_cmd && h->nlmsg_pid == netlink_cmd.snl.nl_pid
+ && (h->nlmsg_type != RTM_NEWADDR && h->nlmsg_type != RTM_DELADDR))
{
if (IS_ZEBRA_DEBUG_KERNEL)
zlog_debug ("netlink_parse_info: %s packet comes from %s",