diff options
author | Christopher Zimmermann <chrisz@cvs.openbsd.org> | 2014-04-06 16:49:41 +0000 |
---|---|---|
committer | Christopher Zimmermann <chrisz@cvs.openbsd.org> | 2014-04-06 16:49:41 +0000 |
commit | eaf0b040e78e4a37272256631157db668381a70f (patch) | |
tree | 2d8b9edff4942f31a6a0ebb65c4b5daf3f5ec8c5 /sys/netinet6 | |
parent | 11c8fcc2dada5d887e442858ef39883ebeb72b35 (diff) |
Remove redundant call to in{,6}_pcbbind() from tcp PRU_CONNECT.
Make sure that in_pcbbind() is called from in_pcbconnect() by KASSERTing that
local port == 0 implies an unspecified local address.
OK claudio@
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/in6_pcb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index bbd3c50abab..cc06181a166 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6_pcb.c,v 1.59 2014/01/08 22:38:29 bluhm Exp $ */ +/* $OpenBSD: in6_pcb.c,v 1.60 2014/04/06 16:49:40 chrisz Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -448,6 +448,7 @@ in6_pcbconnect(struct inpcb *inp, struct mbuf *nam) inp->inp_lport, INPLOOKUP_IPV6, inp->inp_rtableid)) { return (EADDRINUSE); } + KASSERT(IN6_IS_ADDR_UNSPECIFIED(&inp->inp_laddr6) || inp->inp_lport != 0); if (IN6_IS_ADDR_UNSPECIFIED(&inp->inp_laddr6)) { if (inp->inp_lport == 0) (void)in6_pcbbind(inp, NULL, curproc); |