diff options
author | 1997-11-30 06:10:43 +0000 | |
---|---|---|
committer | 1997-11-30 06:10:43 +0000 | |
commit | 738156a0c1ca18e693049854cbf9c455e3332c1b (patch) | |
tree | 5b08eb94cf5626940ceca52d6c535a62171ade70 | |
parent | Add multiple inclusion protection, clean up comments, and wrap with _KERNEL (diff) | |
download | wireguard-openbsd-738156a0c1ca18e693049854cbf9c455e3332c1b.tar.xz wireguard-openbsd-738156a0c1ca18e693049854cbf9c455e3332c1b.zip |
hmm. If out of ports, return EADDRNOTAVAIL
-rw-r--r-- | sys/netinet/in_pcb.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 1df701a0dd3..5d0ae6a97b6 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in_pcb.c,v 1.18 1997/08/09 23:36:26 millert Exp $ */ +/* $OpenBSD: in_pcb.c,v 1.19 1997/11/30 06:10:43 deraadt Exp $ */ /* $NetBSD: in_pcb.c,v 1.25 1996/02/13 23:41:53 christos Exp $ */ /* @@ -410,8 +410,9 @@ in_pcbconnect(v, nam) inp->inp_lport) != 0) return (EADDRINUSE); if (inp->inp_laddr.s_addr == INADDR_ANY) { - if (inp->inp_lport == 0) - (void)in_pcbbind(inp, (struct mbuf *)0); + if (inp->inp_lport == 0 && + in_pcbbind(inp, (struct mbuf *)0) == EADDRNOTAVAIL) + return (EADDRNOTAVAIL); inp->inp_laddr = ifaddr->sin_addr; } inp->inp_faddr = sin->sin_addr; |