Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-updates-src > by-pkgid > 8b7eb0953e52bd5d7a877b4559114c52 > files > 4

quagga-0.99.18-1.3.mga1.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;