"Ian FREISLICH" <[email protected]> wrote in <[email protected]>:
ia> Hi ia> ia> While recieving my routing table I used to be able to check how far ia> it got by counting the output netstat -rn. It takes about 2 seconds ia> to recieve the routes from my route-server, but over a minute to ia> update the kernel routing table. ia> ia> I'm now getting this error until zebra completes route insertion. ia> ia> [firewall1.jnb1] ~ $ netstat -rn |wc -l ia> netstat: sysctl: net.route.0.0.dump.0: Cannot allocate memory ia> 1 ia> [firewall1.jnb1] ~ $ netstat -rn |wc -l ia> 480446 Perhaps does the attached patch fix this? -- Hiroki
Index: usr.bin/netstat/route.c
===================================================================
--- usr.bin/netstat/route.c (revision 262283)
+++ usr.bin/netstat/route.c (working copy)
@@ -614,7 +614,7 @@
if ((buf = malloc(needed)) == 0) {
errx(2, "malloc(%lu)", (unsigned long)needed);
}
- if (sysctl(mib, 6, buf, &needed, NULL, 0) < 0) {
+ if (sysctl(mib, 7, buf, &needed, NULL, 0) < 0) {
err(1, "sysctl: net.route.0.%d.dump.%d", af, fibnum);
}
lim = buf + needed;
pgpO9F0H0qp6s.pgp
Description: PGP signature
