diff options
Diffstat (limited to 'sys/netinet/udp_usrreq.c')
-rw-r--r-- | sys/netinet/udp_usrreq.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 6a86879..07b1166 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -827,15 +827,10 @@ udp_connect(struct socket *so, struct sockaddr *nam, struct proc *p) return EINVAL; if (inp->inp_faddr.s_addr != INADDR_ANY) return EISCONN; - error = 0; s = splnet(); - if (inp->inp_laddr.s_addr == INADDR_ANY && p->p_prison != NULL) - error = in_pcbbind(inp, NULL, p); - if (error == 0) { - sin = (struct sockaddr_in *)nam; - prison_remote_ip(p, 0, &sin->sin_addr.s_addr); - error = in_pcbconnect(inp, nam, p); - } + sin = (struct sockaddr_in *)nam; + prison_remote_ip(p, 0, &sin->sin_addr.s_addr); + error = in_pcbconnect(inp, nam, p); splx(s); if (error == 0) soisconnected(so); |