Adapt r197314 to IPv6 stack:

Return ENOBUFS consistently if user attempts to exceed
  in_mcast_maxsocksrc resource limit.

MFC after:	1 day
This commit is contained in:
Bruce M Simpson 2009-11-19 12:21:20 +00:00
parent 57a9feeaad
commit 0dc5893ef3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=199523

View File

@ -2342,9 +2342,11 @@ in6p_set_source_filters(struct inpcb *inp, struct sockopt *sopt)
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 ||