--- svn-freebsd/sys/netinet/in_mcast.c 2009-09-07 18:57:29.000000000 +0300 +++ temp/sys/netinet/in_mcast.c 2009-09-08 14:41:18.000000000 +0300 @@ -1966,6 +1966,10 @@ idx = imo_match_group(imo, ifp, &gsa->sa); if (idx == -1) { is_new = 1; + } else if (sopt->sopt_name == IP_ADD_MEMBERSHIP) { + /* Trying to join the same Any-source group again. */ + error = EADDRINUSE; + goto out_inp_locked; } else { inm = imo->imo_membership[idx]; imf = &imo->imo_mfilters[idx];