From owner-svn-src-head@FreeBSD.ORG Thu Nov 19 12:21:20 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A2A81065670; Thu, 19 Nov 2009 12:21:20 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 885188FC12; Thu, 19 Nov 2009 12:21:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJCLKdn006383; Thu, 19 Nov 2009 12:21:20 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJCLKox006381; Thu, 19 Nov 2009 12:21:20 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <200911191221.nAJCLKox006381@svn.freebsd.org> From: Bruce M Simpson Date: Thu, 19 Nov 2009 12:21:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199523 - head/sys/netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 12:21:20 -0000 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 ||