summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/in6_mcast.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet6/in6_mcast.c')
-rw-r--r--sys/netinet6/in6_mcast.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/netinet6/in6_mcast.c b/sys/netinet6/in6_mcast.c
index bba34ec..9fc3c48 100644
--- a/sys/netinet6/in6_mcast.c
+++ b/sys/netinet6/in6_mcast.c
@@ -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 ||
OpenPOWER on IntegriCloud