Hi,

For me it looks like tp is not accessed between the two assingments.
intotcpcb() is a define without side effects.  So it should be safe
to use the same code for inet and inet6.

ok?

bluhm

Index: netinet/tcp_usrreq.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sys/netinet/tcp_usrreq.c,v
retrieving revision 1.112
diff -u -p -r1.112 tcp_usrreq.c
--- netinet/tcp_usrreq.c        17 May 2013 09:04:30 -0000      1.112
+++ netinet/tcp_usrreq.c        4 Aug 2013 20:46:17 -0000
@@ -498,9 +498,6 @@ tcp_ctloutput(op, so, level, optname, mp
                        (void) m_free(*mp);
                return (ECONNRESET);
        }
-#ifdef INET6
-       tp = intotcpcb(inp);
-#endif /* INET6 */
        if (level != IPPROTO_TCP) {
                switch (so->so_proto->pr_domain->dom_family) {
 #ifdef INET6
@@ -518,9 +515,7 @@ tcp_ctloutput(op, so, level, optname, mp
                splx(s);
                return (error);
        }
-#ifndef INET6
        tp = intotcpcb(inp);
-#endif /* !INET6 */
 
        switch (op) {
 

Reply via email to