Page MenuHomeFreeBSD

D41997.diff
No OneTemporary

D41997.diff

diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c
--- a/sys/netinet/ip_mroute.c
+++ b/sys/netinet/ip_mroute.c
@@ -172,7 +172,9 @@
((g).s_addr >> 20) ^ ((g).s_addr >> 10) ^ (g).s_addr) & V_mfchash)
#define MFCHASHSIZE 256
-static u_long mfchashsize; /* Hash size */
+static u_long mfchashsize = MFCHASHSIZE; /* Hash size */
+SYSCTL_ULONG(_net_inet_ip, OID_AUTO, mfchashsize, CTLFLAG_RDTUN,
+ &mfchashsize, 0, "IPv4 Multicast Forwarding Table hash size");
VNET_DEFINE_STATIC(u_char *, nexpire); /* 0..mfchashsize-1 */
#define V_nexpire VNET(nexpire)
VNET_DEFINE_STATIC(LIST_HEAD(mfchashhdr, mfc)*, mfchashtbl);
@@ -226,7 +228,7 @@
pimstat, "PIM Statistics (struct pimstat, netinet/pim_var.h)");
static u_long pim_squelch_wholepkt = 0;
-SYSCTL_ULONG(_net_inet_pim, OID_AUTO, squelch_wholepkt, CTLFLAG_RW,
+SYSCTL_ULONG(_net_inet_pim, OID_AUTO, squelch_wholepkt, CTLFLAG_RWTUN,
&pim_squelch_wholepkt, 0,
"Disable IGMP_WHOLEPKT notifications if rendezvous point is unspecified");
@@ -2817,18 +2819,12 @@
return (EINVAL);
}
- mfchashsize = MFCHASHSIZE;
- if (TUNABLE_ULONG_FETCH("net.inet.ip.mfchashsize", &mfchashsize) &&
- !powerof2(mfchashsize)) {
+ if (!powerof2(mfchashsize)) {
printf("WARNING: %s not a power of 2; using default\n",
"net.inet.ip.mfchashsize");
mfchashsize = MFCHASHSIZE;
}
- pim_squelch_wholepkt = 0;
- TUNABLE_ULONG_FETCH("net.inet.pim.squelch_wholepkt",
- &pim_squelch_wholepkt);
-
pim_encap_cookie = ip_encap_attach(&ipv4_encap_cfg, NULL, M_WAITOK);
ip_mcast_src = X_ip_mcast_src;

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 9, 6:51 AM (20 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14552355
Default Alt Text
D41997.diff (1 KB)

Event Timeline