Source-Changes-HG archive

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

[src/trunk]: src/tests/net/if_ipsec Fix missing "-m tranport" options. Point...



details:   https://anonhg.NetBSD.org/src/rev/48d7c4bbdb8a
branches:  trunk
changeset: 936800:48d7c4bbdb8a
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Wed Aug 05 01:10:50 2020 +0000

description:
Fix missing "-m tranport" options.  Pointed out by k-goda@IIJ.

Using any mode SA causes unepected call path, that is,
ipsec4_common_input_cb() calls ip_input() directly instead of
ipsecif4_input().

diffstat:

 tests/net/if_ipsec/t_ipsec.sh      |  6 +++---
 tests/net/if_ipsec/t_ipsec_pfil.sh |  6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (40 lines):

diff -r 329a2702e846 -r 48d7c4bbdb8a tests/net/if_ipsec/t_ipsec.sh
--- a/tests/net/if_ipsec/t_ipsec.sh     Tue Aug 04 14:35:24 2020 +0000
+++ b/tests/net/if_ipsec/t_ipsec.sh     Wed Aug 05 01:10:50 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: t_ipsec.sh,v 1.10 2019/08/19 03:22:05 ozaki-r Exp $
+#      $NetBSD: t_ipsec.sh,v 1.11 2020/08/05 01:10:50 knakahara Exp $
 #
 # Copyright (c) 2017 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -300,8 +300,8 @@
        fi
 
        cat > $tmpfile <<-EOF
-       add $dst $src $proto $inid -u $inunique $algo_args;
-       add $src $dst $proto $outid -u $outunique $algo_args;
+       add $dst $src $proto $inid -u $inunique -m transport $algo_args;
+       add $src $dst $proto $outid -u $outunique -m transport $algo_args;
        EOF
        $DEBUG && cat $tmpfile
        export RUMP_SERVER=$sock
diff -r 329a2702e846 -r 48d7c4bbdb8a tests/net/if_ipsec/t_ipsec_pfil.sh
--- a/tests/net/if_ipsec/t_ipsec_pfil.sh        Tue Aug 04 14:35:24 2020 +0000
+++ b/tests/net/if_ipsec/t_ipsec_pfil.sh        Wed Aug 05 01:10:50 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: t_ipsec_pfil.sh,v 1.2 2019/08/19 03:22:05 ozaki-r Exp $
+#      $NetBSD: t_ipsec_pfil.sh,v 1.3 2020/08/05 01:10:50 knakahara Exp $
 #
 # Copyright (c) 2019 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -115,8 +115,8 @@
        atf_check -s exit:0 test "X$outunique" != "X"
 
        cat > $tmpfile <<-EOF
-       add $dst $src $proto $inid -u $inunique $algo_args;
-       add $src $dst $proto $outid -u $outunique $algo_args;
+       add $dst $src $proto $inid -u $inunique -m transport $algo_args;
+       add $src $dst $proto $outid -u $outunique -m transport $algo_args;
        EOF
        $DEBUG && cat $tmpfile
        atf_check -s exit:0 -o empty $HIJACKING setkey -c < $tmpfile



Home | Main Index | Thread Index | Old Index