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).
This commit is contained in:
jhb 2007-09-28 19:45:18 +00:00
parent f435e446f6
commit f92f6a31e3

View File

@ -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) {