Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Nov 2009 12:21:20 +0000 (UTC)
From:      Bruce M Simpson <bms@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r199523 - head/sys/netinet6
Message-ID:  <200911191221.nAJCLKox006381@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bms
Date: Thu Nov 19 12:21:20 2009
New Revision: 199523
URL: http://svn.freebsd.org/changeset/base/199523

Log:
  Adapt r197314 to IPv6 stack:
    Return ENOBUFS consistently if user attempts to exceed
    in_mcast_maxsocksrc resource limit.
  
  MFC after:	1 day

Modified:
  head/sys/netinet6/in6_mcast.c

Modified: head/sys/netinet6/in6_mcast.c
==============================================================================
--- head/sys/netinet6/in6_mcast.c	Thu Nov 19 12:18:30 2009	(r199522)
+++ head/sys/netinet6/in6_mcast.c	Thu Nov 19 12:21:20 2009	(r199523)
@@ -2342,9 +2342,11 @@ in6p_set_source_filters(struct inpcb *in
 	if (error)
 		return (error);
 
-	if (msfr.msfr_nsrcs > in6_mcast_maxsocksrc ||
-	    (msfr.msfr_fmode != MCAST_EXCLUDE &&
-	     msfr.msfr_fmode != MCAST_INCLUDE))
+	if (msfr.msfr_nsrcs > in6_mcast_maxsocksrc)
+		return (ENOBUFS);
+
+	if (msfr.msfr_fmode != MCAST_EXCLUDE &&
+	    msfr.msfr_fmode != MCAST_INCLUDE)
 		return (EINVAL);
 
 	if (msfr.msfr_group.ss_family != AF_INET6 ||



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