svn commit: r234279 - stable/9/sys/netinet6
Gleb Smirnoff
glebius at FreeBSD.org
Sat Apr 14 10:36:44 UTC 2012
Author: glebius
Date: Sat Apr 14 10:36:43 2012
New Revision: 234279
URL: http://svn.freebsd.org/changeset/base/234279
Log:
Merge 233272:
in6_pcblookup_local() still can return a pcb with NULL
inp_socket. To avoid panic, do not dereference inp_socket,
but obtain reuse port option from inp_flags2, like this
is done after next call to in_pcblookup_local() a few lines
down below.
Submitted by: rwatson
Modified:
stable/9/sys/netinet6/in6_pcb.c
Directory Properties:
stable/9/sys/ (props changed)
Modified: stable/9/sys/netinet6/in6_pcb.c
==============================================================================
--- stable/9/sys/netinet6/in6_pcb.c Sat Apr 14 10:20:34 2012 (r234278)
+++ stable/9/sys/netinet6/in6_pcb.c Sat Apr 14 10:36:43 2012 (r234279)
@@ -245,8 +245,8 @@ in6_pcbbind(register struct inpcb *inp,
if (tw == NULL ||
(reuseport & tw->tw_so_options) == 0)
return (EADDRINUSE);
- } else if (t && (reuseport & t->inp_socket->so_options)
- == 0) {
+ } else if (t && (reuseport == 0 ||
+ (t->inp_flags2 & INP_REUSEPORT) == 0)) {
return (EADDRINUSE);
}
#ifdef INET
More information about the svn-src-stable-9
mailing list