]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: process information about new addresses (BZ#486)
authorChristian Franke <chris@opensourcerouting.org>
Thu, 24 Jan 2013 14:04:43 +0000 (14:04 +0000)
committerDavid Lamparter <equinox@opensourcerouting.org>
Thu, 19 Sep 2013 15:51:00 +0000 (17:51 +0200)
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>
zebra/rt_netlink.c

index bab170371f58f0c61bf295263c6c3995ff9fe342..86e02efb88fa9739cde51129a7c83133f897c008 100644 (file)
@@ -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",