Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netipsec Don't clear calculated Tx tos value for IPv[46]...



details:   https://anonhg.NetBSD.org/src/rev/cc17e94fc9f2
branches:  trunk
changeset: 456582:cc17e94fc9f2
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Fri May 17 05:27:24 2019 +0000

description:
Don't clear calculated Tx tos value for IPv[46] over IPv6.

diffstat:

 sys/netipsec/ipsecif.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (35 lines):

diff -r 0b14414779de -r cc17e94fc9f2 sys/netipsec/ipsecif.c
--- a/sys/netipsec/ipsecif.c    Fri May 17 04:08:54 2019 +0000
+++ b/sys/netipsec/ipsecif.c    Fri May 17 05:27:24 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ipsecif.c,v 1.15 2019/04/12 07:12:12 knakahara Exp $  */
+/*     $NetBSD: ipsecif.c,v 1.16 2019/05/17 05:27:24 knakahara Exp $  */
 
 /*
  * Copyright (c) 2017 Internet Initiative Japan Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipsecif.c,v 1.15 2019/04/12 07:12:12 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsecif.c,v 1.16 2019/05/17 05:27:24 knakahara Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -583,13 +583,13 @@
                return ENETUNREACH;
        }
 #ifndef IPSEC_TX_TOS_CLEAR
+       if (!ip6_ipsec_copy_tos)
+               otos = 0;
+
        if (ifp->if_flags & IFF_ECN)
                ip_ecn_ingress(ECN_ALLOWED, &otos, &itos);
        else
                ip_ecn_ingress(ECN_NOCARE, &otos, &itos);
-
-       if (!ip6_ipsec_copy_tos)
-               otos = 0;
 #else
        if (ip6_ipsec_copy_tos)
                otos = itos;



Home | Main Index | Thread Index | Old Index