Source-Changes-HG archive

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

[src/netbsd-8]: src/tests/net/net Pull up following revision(s) (requested by...



details:   https://anonhg.NetBSD.org/src/rev/4465286363c0
branches:  netbsd-8
changeset: 434667:4465286363c0
user:      snj <snj%NetBSD.org@localhost>
date:      Mon Feb 26 00:35:56 2018 +0000

description:
Pull up following revision(s) (requested by ozaki-r in ticket #571):
        tests/net/net/t_ping_opts.sh: 1.2-1.3
Now that we don't allow source-routed packets by default, set allowsrcrt=1
and forwsrcrt=1. Should fix the ATF failure.
--
Fix ping_opts_gateway and ping_opts_recordroute
We need to enable the options of source routing on all rump kernels.

diffstat:

 tests/net/net/t_ping_opts.sh |  28 +++++++++++++++++++++++++++-
 1 files changed, 27 insertions(+), 1 deletions(-)

diffs (49 lines):

diff -r b3720f05c0fd -r 4465286363c0 tests/net/net/t_ping_opts.sh
--- a/tests/net/net/t_ping_opts.sh      Mon Feb 26 00:33:08 2018 +0000
+++ b/tests/net/net/t_ping_opts.sh      Mon Feb 26 00:35:56 2018 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: t_ping_opts.sh,v 1.1 2017/03/31 06:41:40 ozaki-r Exp $
+#      $NetBSD: t_ping_opts.sh,v 1.1.8.1 2018/02/26 00:35:56 snj Exp $
 #
 # Copyright (c) 2017 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -222,6 +222,22 @@
        check_echo_request_pkt_with_macaddr \
            $my_macaddr $gw_shmif0_macaddr $IPSRC $IPDST
 
+       export RUMP_SERVER=$SOCKSRC
+       # ping -g <gateway>
+       # By default source-routed packets are prohibited
+       atf_check -s not-exit:0 -o match:'Net prohibited access' \
+           rump.ping $PING_OPTS -g $IPSRCGW $IPDST
+
+       # Enable the options of source routing
+       export RUMP_SERVER=$SOCKSRC
+       atf_check -s exit:0 rump.sysctl -q -w net.inet.ip.allowsrcrt=1
+       export RUMP_SERVER=$SOCKDST
+       atf_check -s exit:0 rump.sysctl -q -w net.inet.ip.allowsrcrt=1
+       export RUMP_SERVER=$SOCKFWD
+       atf_check -s exit:0 rump.sysctl -q -w net.inet.ip.allowsrcrt=1
+       atf_check -s exit:0 rump.sysctl -q -w net.inet.ip.forwsrcrt=1
+
+       export RUMP_SERVER=$SOCKSRC
        # ping -g <gateway>
        atf_check -s exit:0 -o ignore rump.ping $PING_OPTS \
            -g $IPSRCGW $IPDST
@@ -302,6 +318,16 @@
            $my_macaddr $gw_shmif0_macaddr $IPSRC $IPDST
        check_recorded_routes $out
 
+       # Enable the options of source routing
+       export RUMP_SERVER=$SOCKSRC
+       atf_check -s exit:0 rump.sysctl -q -w net.inet.ip.allowsrcrt=1
+       export RUMP_SERVER=$SOCKDST
+       atf_check -s exit:0 rump.sysctl -q -w net.inet.ip.allowsrcrt=1
+       export RUMP_SERVER=$SOCKFWD
+       atf_check -s exit:0 rump.sysctl -q -w net.inet.ip.allowsrcrt=1
+       atf_check -s exit:0 rump.sysctl -q -w net.inet.ip.forwsrcrt=1
+
+       export RUMP_SERVER=$SOCKSRC
        # ping -R -g <gateway>
        atf_check -s exit:0 -o save:$out rump.ping $PING_OPTS \
            -R -g $IPSRCGW $IPDST



Home | Main Index | Thread Index | Old Index