]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/rtread_sysctl.c
zebra, lib/memtypes.c: the netlink sockets work per VRF
[mirror_frr.git] / zebra / rtread_sysctl.c
index 69d45950ae7261770f3ad514b155687fa220af93..2a9601a304cbfded1d3af451ad816c9b74baecf7 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "memory.h"
 #include "log.h"
+#include "vrf.h"
 
 #include "zebra/zserv.h"
 #include "zebra/rt.h"
@@ -31,7 +32,7 @@
 
 /* Kernel routing table read up by sysctl function. */
 void
-route_read (void)
+route_read (struct zebra_vrf *zvrf)
 {
   caddr_t buf, end, ref;
   size_t bufsiz;
@@ -47,7 +48,10 @@ route_read (void)
     NET_RT_DUMP,
     0
   };
-                     
+
+  if (zvrf->vrf_id != VRF_DEFAULT)
+    return;
+
   /* Get buffer size. */
   if (sysctl (mib, MIBSIZ, NULL, &bufsiz, NULL, 0) < 0) 
     {