Module Name:    src
Committed By:   martin
Date:           Fri Oct 24 07:28:14 UTC 2014

Modified Files:
        src/sys/netinet [netbsd-7]: tcp_output.c

Log Message:
Pull up following revision(s) (requested by hikaru in ticket #154):
        sys/netinet/tcp_output.c: revision 1.177
Fix wrong condition checking TSO capability.
ipsec_used is not necessary condition.
IPsec outbound policy will not be checked when ipsec_used is false.


To generate a diff of this commit:
cvs rdiff -u -r1.176 -r1.176.2.1 src/sys/netinet/tcp_output.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netinet/tcp_output.c
diff -u src/sys/netinet/tcp_output.c:1.176 src/sys/netinet/tcp_output.c:1.176.2.1
--- src/sys/netinet/tcp_output.c:1.176	Fri May 30 01:39:03 2014
+++ src/sys/netinet/tcp_output.c	Fri Oct 24 07:28:14 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_output.c,v 1.176 2014/05/30 01:39:03 christos Exp $	*/
+/*	$NetBSD: tcp_output.c,v 1.176.2.1 2014/10/24 07:28:14 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -135,7 +135,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_output.c,v 1.176 2014/05/30 01:39:03 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_output.c,v 1.176.2.1 2014/10/24 07:28:14 martin Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -630,8 +630,8 @@ tcp_output(struct tcpcb *tp)
 #if defined(INET)
 	has_tso4 = tp->t_inpcb != NULL &&
 #if defined(IPSEC)
-	    ipsec_used && IPSEC_PCB_SKIP_IPSEC(tp->t_inpcb->inp_sp,
-	    IPSEC_DIR_OUTBOUND) &&
+	    (!ipsec_used || IPSEC_PCB_SKIP_IPSEC(tp->t_inpcb->inp_sp,
+	    IPSEC_DIR_OUTBOUND)) &&
 #endif
 	    (rt = rtcache_validate(&tp->t_inpcb->inp_route)) != NULL &&
 	    (rt->rt_ifp->if_capenable & IFCAP_TSOv4) != 0;
@@ -639,8 +639,8 @@ tcp_output(struct tcpcb *tp)
 #if defined(INET6)
 	has_tso6 = tp->t_in6pcb != NULL &&
 #if defined(IPSEC)
-	    ipsec_used && IPSEC_PCB_SKIP_IPSEC(tp->t_in6pcb->in6p_sp,
-	    IPSEC_DIR_OUTBOUND) &&
+	    (!ipsec_used || IPSEC_PCB_SKIP_IPSEC(tp->t_in6pcb->in6p_sp,
+	    IPSEC_DIR_OUTBOUND)) &&
 #endif
 	    (rt = rtcache_validate(&tp->t_in6pcb->in6p_route)) != NULL &&
 	    (rt->rt_ifp->if_capenable & IFCAP_TSOv6) != 0;

Reply via email to