diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -1266,28 +1266,18 @@ { struct msghdr msg; struct iovec aiov; - struct socket *so; - struct file *fp; - int error; if (linux_check_hdrincl(td, args->s) == 0) /* IP_HDRINCL set, tweak the packet before sending */ return (linux_sendto_hdrincl(td, args)); - bzero(&msg, sizeof(msg)); - error = getsock(td, args->s, &cap_send_connect_rights, &fp); - if (error != 0) - return (error); - so = fp->f_data; - if ((so->so_state & (SS_ISCONNECTED|SS_ISCONNECTING)) == 0) { - msg.msg_name = PTRIN(args->to); - msg.msg_namelen = args->tolen; - } + msg.msg_name = PTRIN(args->to); + msg.msg_namelen = args->tolen; msg.msg_iov = &aiov; msg.msg_iovlen = 1; + msg.msg_control = NULL; aiov.iov_base = PTRIN(args->msg); aiov.iov_len = args->len; - fdrop(fp, td); return (linux_sendit(td, args->s, &msg, args->flags, NULL, UIO_USERSPACE)); } diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1235,10 +1235,6 @@ */ if (sin != NULL) { INP_LOCK_ASSERT(inp); - if (inp->inp_faddr.s_addr != INADDR_ANY) { - error = EISCONN; - goto release; - } /* * Jail may rewrite the destination address, so let it do diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -791,12 +791,6 @@ goto release; } - if (!IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr)) { - /* how about ::ffff:0.0.0.0 case? */ - error = EISCONN; - goto release; - } - /* * Given we handle the v4mapped case in the INET block above * assert here that it must not happen anymore.