From f92f6a31e3f1fc43bdd791344acf8123b7c775ce Mon Sep 17 00:00:00 2001 From: jhb Date: Fri, 28 Sep 2007 19:45:18 +0000 Subject: [PATCH] Fix another nit in an earlier MFC so that we properly warn if we can't read the multicast routing stats from a live kernel via sysctl(8). --- usr.bin/netstat/mroute.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/netstat/mroute.c b/usr.bin/netstat/mroute.c index cf172fbe2f66..3c834faf2076 100644 --- a/usr.bin/netstat/mroute.c +++ b/usr.bin/netstat/mroute.c @@ -85,7 +85,7 @@ mroutepr(u_long mfcaddr, u_long vifaddr) len = sizeof(mfctable); if (!live || sysctlbyname("net.inet.ip.mfctable", mfctable, &len, NULL, 0) < 0) { - if (!live) { + if (live) { warn("sysctl: net.inet.ip.mfctable"); /* Compatability with older kernels - candidate for removal */ if (mfcaddr == 0) { @@ -100,7 +100,7 @@ mroutepr(u_long mfcaddr, u_long vifaddr) len = sizeof(viftable); if (!live || sysctlbyname("net.inet.ip.viftable", viftable, &len, NULL, 0) < 0) { - if (!live) { + if (live) { warn("sysctl: net.inet.ip.viftable"); /* Compatability with older kernels - candidate for removal */ if (vifaddr == 0) { @@ -273,7 +273,7 @@ mrt_stats(u_long mstaddr) if (!live || sysctlbyname("net.inet.ip.mrtstat", &mrtstat, &len, NULL, 0) < 0) { - if (!live) { + if (live) { warn("sysctl: net.inet.ip.mrtstat"); /* Compatability with older kernels - candidate for removal */ if (mstaddr == 0) {