Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Feb 2019 09:06:40 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r343648 - stable/12/sys/netinet6
Message-ID:  <201902010906.x1196elg011322@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Fri Feb  1 09:06:40 2019
New Revision: 343648
URL: https://svnweb.freebsd.org/changeset/base/343648

Log:
  MFC r343393:
  Add debugging sysctl to disable incoming MLD v2 messages similar to the
  existing sysctl for MLD v1 messages.
  
  PR:			233535
  Differential Revision:	https://reviews.freebsd.org/D18887
  Reviewed by:		bz (net)
  Tested by:		ae
  Sponsored by:		Mellanox Technologies

Modified:
  stable/12/sys/netinet6/mld6.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/netinet6/mld6.c
==============================================================================
--- stable/12/sys/netinet6/mld6.c	Fri Feb  1 09:05:41 2019	(r343647)
+++ stable/12/sys/netinet6/mld6.c	Fri Feb  1 09:06:40 2019	(r343648)
@@ -243,6 +243,10 @@ static int	mld_v1enable = 1;
 SYSCTL_INT(_net_inet6_mld, OID_AUTO, v1enable, CTLFLAG_RWTUN,
     &mld_v1enable, 0, "Enable fallback to MLDv1");
 
+static int	mld_v2enable = 1;
+SYSCTL_INT(_net_inet6_mld, OID_AUTO, v2enable, CTLFLAG_RWTUN,
+    &mld_v2enable, 0, "Enable MLDv2");
+
 static int	mld_use_allow = 1;
 SYSCTL_INT(_net_inet6_mld, OID_AUTO, use_allow, CTLFLAG_RWTUN,
     &mld_use_allow, 0, "Use ALLOW/BLOCK for RFC 4604 SSM joins/leaves");
@@ -816,7 +820,12 @@ mld_v2_input_query(struct ifnet *ifp, const struct ip6
 	char			 ip6tbuf[INET6_ADDRSTRLEN];
 #endif
 
-	is_general_query = 0;
+	if (!mld_v2enable) {
+		CTR3(KTR_MLD, "ignore v2 query src %s on ifp %p(%s)",
+		    ip6_sprintf(ip6tbuf, &ip6->ip6_src),
+		    ifp, if_name(ifp));
+		return (0);
+	}
 
 	/*
 	 * RFC3810 Section 6.2: MLD queries must originate from
@@ -828,6 +837,8 @@ mld_v2_input_query(struct ifnet *ifp, const struct ip6
 		    ifp, if_name(ifp));
 		return (0);
 	}
+
+	is_general_query = 0;
 
 	CTR2(KTR_MLD, "input v2 query on ifp %p(%s)", ifp, if_name(ifp));
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902010906.x1196elg011322>