tcp: Make sure that netmsg's so is same as inp->inp_socket
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Tue, 12 Apr 2011 06:16:19 +0000 (14:16 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Tue, 12 Apr 2011 06:16:19 +0000 (14:16 +0800)
sys/netinet/tcp_usrreq.c

index a50f88c..ca07f26 100644 (file)
@@ -1063,8 +1063,6 @@ tcp_connect(netmsg_t msg)
                if (error)
                        goto out;
        }
-       so = inp->inp_socket;
-       KKASSERT(so);
 
        /*
         * Calculate the correct protocol processing thread.  The connect
@@ -1075,6 +1073,8 @@ tcp_connect(netmsg_t msg)
        if (error)
                goto out;
 
+       KKASSERT(inp->inp_socket == so);
+
 #ifdef SMP
        port = tcp_addrport(sin->sin_addr.s_addr, sin->sin_port,
                            (inp->inp_laddr.s_addr ?