Change wording of warnings when there is no ip_mroute.ko module
loaded into the system. Change wording of comments to reflect the fact we should unconditionally use KVM if the -M option is used to specify a core file. Add comments to document the fact that IPv6 multicast forwarding information display still relies on KVM for gathering information.
This commit is contained in:
parent
e0f499d1d4
commit
37b367b5c8
@ -86,24 +86,28 @@ mroutepr(u_long mfcaddr, u_long vifaddr)
|
||||
len = sizeof(mfctable);
|
||||
if (sysctlbyname("net.inet.ip.mfctable", mfctable, &len, NULL, 0) < 0) {
|
||||
warn("sysctl: net.inet.ip.mfctable");
|
||||
/* Compatability with older kernels - candidate for removal */
|
||||
if (mfcaddr == 0) {
|
||||
printf("No IPv4 multicast routing compiled into this system.\n");
|
||||
printf("No IPv4 multicast forwarding configured in "
|
||||
"the running system.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* XXX: Try KVM if the module is neither compiled nor loaded.
|
||||
* The correct behaviour would be to always use KVM if
|
||||
* the -M option is specified to netstat(1).
|
||||
*/
|
||||
kread(mfcaddr, (char *)mfctable, sizeof(mfctable));
|
||||
}
|
||||
|
||||
len = sizeof(viftable);
|
||||
if (sysctlbyname("net.inet.ip.viftable", viftable, &len, NULL, 0) < 0) {
|
||||
warn("sysctl: net.inet.ip.viftable");
|
||||
/* Compatability with older kernels - candidate for removal */
|
||||
if (vifaddr == 0) {
|
||||
printf("No IPv4 multicast routing compiled into this system.\n");
|
||||
printf("No IPv4 multicast forwarding configured in "
|
||||
"the running system.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* XXX KVM */
|
||||
kread(vifaddr, (char *)viftable, sizeof(viftable));
|
||||
}
|
||||
|
||||
@ -275,7 +279,8 @@ mrt_stats(u_long mstaddr)
|
||||
warn("sysctl: net.inet.ip.mrtstat");
|
||||
/* Compatability with older kernels - candidate for removal */
|
||||
if (mstaddr == 0) {
|
||||
printf("No IPv4 multicast routing compiled into this system.\n");
|
||||
printf("No IPv4 multicast forwarding configured in "
|
||||
"the running system.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -109,9 +109,10 @@ mroute6pr(u_long mfcaddr, u_long mifaddr)
|
||||
mifi_t maxmif = 0;
|
||||
long int waitings;
|
||||
|
||||
/* XXX: sysctl not yet implemented for mif6table. */
|
||||
if (mfcaddr == 0 || mifaddr == 0) {
|
||||
printf("No IPv6 multicast routing compiled into this"
|
||||
" system.\n");
|
||||
printf("No IPv6 multicast forwarding configured in the "
|
||||
"running system.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -147,6 +148,7 @@ mroute6pr(u_long mfcaddr, u_long mifaddr)
|
||||
if (!banner_printed)
|
||||
printf("\nIPv6 Multicast Interface Table is empty\n");
|
||||
|
||||
/* XXX: sysctl not yet implemented for mf6ctable. */
|
||||
kread(mfcaddr, (char *)&mf6ctable, sizeof(mf6ctable));
|
||||
banner_printed = 0;
|
||||
for (i = 0; i < MF6CTBLSIZ; ++i) {
|
||||
@ -200,9 +202,10 @@ mrt6_stats(u_long mstaddr)
|
||||
{
|
||||
struct mrt6stat mrtstat;
|
||||
|
||||
/* XXX: sysctl not yet implemented for mrt6stat. */
|
||||
if (mstaddr == 0) {
|
||||
printf("No IPv6 multicast routing compiled into this"
|
||||
" system.\n");
|
||||
printf("No IPv6 multicast forwarding configured in the "
|
||||
"running system.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user