patch-2.4.26 linux-2.4.26/net/ipv6/mcast.c

Next file: linux-2.4.26/net/ipv6/ndisc.c
Previous file: linux-2.4.26/net/ipv6/ipv6_syms.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.25/net/ipv6/mcast.c linux-2.4.26/net/ipv6/mcast.c
@@ -163,6 +163,10 @@
 #define MLDV2_QQIC(value) MLDV2_EXP(0x80, 4, 3, value)
 #define MLDV2_MRC(value) MLDV2_EXP(0x8000, 12, 3, value)
 
+#define IPV6_MLD_MAX_MSF	10
+
+int sysctl_mld_max_msf = IPV6_MLD_MAX_MSF;
+
 /*
  *	socket join on multicast group
  */
@@ -401,6 +405,10 @@
 	}
 	/* else, add a new source to the filter */
 
+	if (psl && psl->sl_count >= sysctl_mld_max_msf) {
+		err = -ENOBUFS;
+		goto done;
+	}
 	if (!psl || psl->sl_count == psl->sl_max) {
 		struct ip6_sf_socklist *newpsl;
 		int count = IP6_SFBLOCK;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)