--- embedaddon/quagga/zebra/if_sysctl.c 2012/02/21 17:26:11 1.1.1.1 +++ embedaddon/quagga/zebra/if_sysctl.c 2016/11/02 10:09:10 1.1.1.2 @@ -29,9 +29,12 @@ #include "memory.h" #include "ioctl.h" #include "log.h" +#include "interface.h" +#include "vrf.h" #include "zebra/rt.h" #include "zebra/kernel_socket.h" +#include "zebra/rib.h" void ifstat_update_sysctl (void) @@ -89,7 +92,7 @@ ifstat_update_sysctl (void) /* Interface listing up function using sysctl(). */ void -interface_list () +interface_list (struct zebra_vrf *zvrf) { caddr_t ref, buf, end; size_t bufsiz; @@ -105,6 +108,12 @@ interface_list () NET_RT_IFLIST, 0 }; + + if (zvrf->vrf_id != VRF_DEFAULT) + { + zlog_warn ("interface_list: ignore VRF %u", zvrf->vrf_id); + return; + } /* Query buffer size. */ if (sysctl (mib, MIBSIZ, NULL, &bufsiz, NULL, 0) < 0)