diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-11-30 06:10:44 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-11-30 06:10:44 +0000 |
commit | 9e65d69d88fc84d29b4d23a4607b0a3291e32c32 (patch) | |
tree | cc41de1268984eee884953063af36e6f147e7e69 | |
parent | 8ea4507ab737632dbe77c8e6f4eeba486c3fa974 (diff) |
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; |