? netinet/o ? netinet/x ? netinet6/ktrace.out Index: netinet/in_pcb.c =================================================================== RCS file: /cvsroot/src/sys/netinet/in_pcb.c,v retrieving revision 1.143 diff -u -p -u -r1.143 in_pcb.c --- netinet/in_pcb.c 25 Jun 2012 15:28:39 -0000 1.143 +++ netinet/in_pcb.c 12 Apr 2013 21:09:05 -0000 @@ -470,6 +470,11 @@ in_pcbconnect(void *v, struct mbuf *nam, return (EAFNOSUPPORT); if (sin->sin_port == 0) return (EADDRNOTAVAIL); + + if (IN_MULTICAST(sin->sin_addr.s_addr) && + inp->inp_socket->so_type == SOCK_STREAM) + return EADDRNOTAVAIL; + if (TAILQ_FIRST(&in_ifaddrhead) != 0) { /* * If the destination address is INADDR_ANY, Index: netinet6/in6_pcb.c =================================================================== RCS file: /cvsroot/src/sys/netinet6/in6_pcb.c,v retrieving revision 1.121 diff -u -p -u -r1.121 in6_pcb.c --- netinet6/in6_pcb.c 24 Aug 2012 06:03:18 -0000 1.121 +++ netinet6/in6_pcb.c 12 Apr 2013 21:09:05 -0000 @@ -452,6 +452,10 @@ in6_pcbconnect(void *v, struct mbuf *nam if (sin6->sin6_port == 0) return (EADDRNOTAVAIL); + if (IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr) && + in6p->in6p_socket->so_type == SOCK_STREAM) + return EADDRNOTAVAIL; + if (sin6->sin6_scope_id == 0 && !ip6_use_defzone) scope_ambiguous = 1; if ((error = sa6_embedscope(sin6, ip6_use_defzone)) != 0)