If the rendezvous point for a group is not specified, do not send

IGMPMSG_WHOLEPKT notifications to the userland PIM routing daemon,
as an optimization to mitigate the effects of high multicast
forwarding load.

This is an experimental change, therefore it must be explicitly enabled by
setting the sysctl/tunable net.inet.pim.squelch_wholepkt to a non-zero value.
The tunable may be set from the loader or from within the kernel environment
when loading ip_mroute.ko as a module.

Submitted by:	edrt <edrt at citiz.net>
See also:	http://mailman.icsi.berkeley.edu/pipermail/xorp-users/2005-June/000639.html
This commit is contained in:
Bruce M Simpson 2007-02-10 14:48:42 +00:00
parent 0948f0a28f
commit 7a90229b61
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=166623

View File

@ -200,6 +200,11 @@ SYSCTL_STRUCT(_net_inet_pim, PIMCTL_STATS, stats, CTLFLAG_RD,
&pimstat, 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,
&pim_squelch_wholepkt, 0,
"Disable IGMP_WHOLEPKT notifications if rendezvous point is unspecified");
extern struct domain inetdomain;
struct protosw in_pim_protosw = {
.pr_type = SOCK_RAW,
@ -2522,6 +2527,14 @@ pim_register_send(struct ip *ip, struct vif *vifp,
if (mrtdebug & DEBUG_PIM)
log(LOG_DEBUG, "pim_register_send: ");
/*
* Do not send IGMP_WHOLEPKT notifications to userland, if the
* rendezvous point was unspecified, and we were told not to.
*/
if (pim_squelch_wholepkt != 0 && (mrt_api_config & MRT_MFC_RP) &&
(rt->mfc_rp.s_addr == INADDR_ANY))
return 0;
mb_copy = pim_register_prepare(ip, m);
if (mb_copy == NULL)
return ENOBUFS;
@ -2991,6 +3004,8 @@ ip_mroute_modevent(module_t mod, int type, void *unused)
MFC_LOCK_INIT();
VIF_LOCK_INIT();
ip_mrouter_reset();
TUNABLE_ULONG_FETCH("net.inet.pim.squelch_wholepkt",
&pim_squelch_wholepkt);
pim_encap_cookie = encap_attach_func(AF_INET, IPPROTO_PIM,
pim_encapcheck, &in_pim_protosw, NULL);
if (pim_encap_cookie == NULL) {