Module Name: src Committed By: hikaru Date: Tue Oct 21 13:44:47 UTC 2014
Modified Files: src/sys/netinet: tcp_output.c Log Message: 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.177 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.177 --- src/sys/netinet/tcp_output.c:1.176 Fri May 30 01:39:03 2014 +++ src/sys/netinet/tcp_output.c Tue Oct 21 13:44:47 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.177 2014/10/21 13:44:47 hikaru 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.177 2014/10/21 13:44:47 hikaru 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;