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:
parent
f435e446f6
commit
f92f6a31e3
@ -85,7 +85,7 @@ mroutepr(u_long mfcaddr, u_long vifaddr)
|
|||||||
len = sizeof(mfctable);
|
len = sizeof(mfctable);
|
||||||
if (!live ||
|
if (!live ||
|
||||||
sysctlbyname("net.inet.ip.mfctable", mfctable, &len, NULL, 0) < 0) {
|
sysctlbyname("net.inet.ip.mfctable", mfctable, &len, NULL, 0) < 0) {
|
||||||
if (!live) {
|
if (live) {
|
||||||
warn("sysctl: net.inet.ip.mfctable");
|
warn("sysctl: net.inet.ip.mfctable");
|
||||||
/* Compatability with older kernels - candidate for removal */
|
/* Compatability with older kernels - candidate for removal */
|
||||||
if (mfcaddr == 0) {
|
if (mfcaddr == 0) {
|
||||||
@ -100,7 +100,7 @@ mroutepr(u_long mfcaddr, u_long vifaddr)
|
|||||||
len = sizeof(viftable);
|
len = sizeof(viftable);
|
||||||
if (!live ||
|
if (!live ||
|
||||||
sysctlbyname("net.inet.ip.viftable", viftable, &len, NULL, 0) < 0) {
|
sysctlbyname("net.inet.ip.viftable", viftable, &len, NULL, 0) < 0) {
|
||||||
if (!live) {
|
if (live) {
|
||||||
warn("sysctl: net.inet.ip.viftable");
|
warn("sysctl: net.inet.ip.viftable");
|
||||||
/* Compatability with older kernels - candidate for removal */
|
/* Compatability with older kernels - candidate for removal */
|
||||||
if (vifaddr == 0) {
|
if (vifaddr == 0) {
|
||||||
@ -273,7 +273,7 @@ mrt_stats(u_long mstaddr)
|
|||||||
|
|
||||||
if (!live ||
|
if (!live ||
|
||||||
sysctlbyname("net.inet.ip.mrtstat", &mrtstat, &len, NULL, 0) < 0) {
|
sysctlbyname("net.inet.ip.mrtstat", &mrtstat, &len, NULL, 0) < 0) {
|
||||||
if (!live) {
|
if (live) {
|
||||||
warn("sysctl: net.inet.ip.mrtstat");
|
warn("sysctl: net.inet.ip.mrtstat");
|
||||||
/* Compatability with older kernels - candidate for removal */
|
/* Compatability with older kernels - candidate for removal */
|
||||||
if (mstaddr == 0) {
|
if (mstaddr == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user