]> git.puffer.fish Git - mirror/frr.git/commitdiff
Fixed bug #394 "RTF_DONE is ignored in rtm_read()"
authorDenis Ovsienko <linux@pilot.org.ua>
Fri, 17 Aug 2007 14:16:30 +0000 (14:16 +0000)
committerDenis Ovsienko <linux@pilot.org.ua>
Fri, 17 Aug 2007 14:16:30 +0000 (14:16 +0000)
zebra/ChangeLog
zebra/kernel_socket.c

index 7a23ace42df610e77ad706550322c4bec5d1cffc..02eede81ab2cbbe4256f27355ca21efe6aedc801 100644 (file)
@@ -1,3 +1,8 @@
+2007-08-17 Denis Ovsienko
+
+       * kernel_socket.c: (rtm_read) Ignore any routing socket messages
+         without RTF_DONE flag set, as they are just noise for us.
+
 2007-08-14 Denis Ovsienko
 
        * zebra_rib.c: (nexthop_active_update) Added a comment
index 9d33dd44dfe83f2a6ce0c38c3931bb0953a721aa..9d2310b9ffac47217462687bb224e6225969f46f 100644 (file)
@@ -741,6 +741,8 @@ rtm_read (struct rt_msghdr *rtm)
   /* Read destination and netmask and gateway from rtm message
      structure. */
   flags = rtm_read_mesg (rtm, &dest, &mask, &gate, ifname, &ifnlen);
+  if (!(flags & RTF_DONE))
+    return;
   if (IS_ZEBRA_DEBUG_KERNEL)
     zlog_debug ("%s: got rtm of type %d (%s)", __func__, rtm->rtm_type,
       LOOKUP (rtm_type_str, rtm->rtm_type));
@@ -794,8 +796,6 @@ rtm_read (struct rt_msghdr *rtm)
       {
         char buf[INET_ADDRSTRLEN], gate_buf[INET_ADDRSTRLEN];
         int ret;
-        if (!(flags & RTF_DONE))
-          return;
         if (! IS_ZEBRA_DEBUG_RIB)
           return;
         ret = rib_lookup_ipv4_route (&p, &gate);