svn commit: r199523 - head/sys/netinet6

Bruce M Simpson bms at FreeBSD.org
Thu Nov 19 12:21:20 UTC 2009


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 ||


More information about the svn-src-head mailing list