Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet Fix wrong condition checking TSO capability.
details: https://anonhg.NetBSD.org/src/rev/ff2172c50c30
branches: trunk
changeset: 333166:ff2172c50c30
user: hikaru <hikaru%NetBSD.org@localhost>
date: Tue Oct 21 13:44:47 2014 +0000
description:
Fix wrong condition checking TSO capability.
ipsec_used is not necessary condition.
IPsec outbound policy will not be checked when ipsec_used is false.
diffstat:
sys/netinet/tcp_output.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (40 lines):
diff -r fa5122f75e78 -r ff2172c50c30 sys/netinet/tcp_output.c
--- a/sys/netinet/tcp_output.c Tue Oct 21 10:39:26 2014 +0000
+++ b/sys/netinet/tcp_output.c Tue Oct 21 13:44:47 2014 +0000
@@ -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 @@
#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 @@
#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;
Home |
Main Index |
Thread Index |
Old Index