Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-updates-src > by-pkgid > 2bc3b1ff4b29f57c81042f4506516a50 > files > 6

quagga-0.99.22.4-4.2.mga5.src.rpm

--- quagga-0.99.11/zebra/rt_netlink.c.netlink	2008-09-05 16:27:26.000000000 +0200
+++ quagga-0.99.11/zebra/rt_netlink.c	2009-04-03 16:58:16.000000000 +0200
@@ -314,6 +314,13 @@
       for (h = (struct nlmsghdr *) buf; NLMSG_OK (h, (unsigned int) status);
            h = NLMSG_NEXT (h, status))
         {
+	  /* JF: Ignore messages that aren't from the kernel */
+	  if ( snl.nl_pid != 0 )
+	    {
+	      zlog ( NULL, LOG_ERR, "Ignoring message from pid %u", snl.nl_pid );
+	      continue;
+	    }
+
           /* Finish of reading. */
           if (h->nlmsg_type == NLMSG_DONE)
             return ret;