/freebsd/contrib/netbsd-tests/net/route/ |
H A D | t_flags.sh | 1 # $NetBSD: t_flags.sh,v 1.15 2016/12/21 02:46:08 ozaki-r Exp $ 34 DEBUG=${DEBUG:-false} 43 atf_check -s exit:0 -o ignore rump.ifconfig shmif0 10.0.0.2/24 44 atf_check -s exit:0 -o ignore rump.ifconfig shmif0 up 45 atf_check -s exit:0 -o ignore rump.ifconfig -w 10 48 $DEBUG && rump.netstat -rn -f inet 58 atf_check -s exit:0 -o ignore rump.ifconfig shmif0 10.0.0.1/24 59 atf_check -s exit:0 -o ignore rump.ifconfig shmif0 up 60 atf_check -s exit:0 -o ignore rump.ifconfig -w 10 63 $DEBUG && rump.netstat -rn -f inet [all …]
|
H A D | t_flags6.sh | 1 # $NetBSD: t_flags6.sh,v 1.12 2016/12/21 02:46:08 ozaki-r Exp $ 37 DEBUG=${DEBUG:-false} 46 atf_check -s exit:0 -o ignore rump.ifconfig shmif0 inet6 $IP6_LOCAL 47 atf_check -s exit:0 -o ignore rump.ifconfig shmif0 up 48 atf_check -s exit:0 -o ignore rump.ifconfig -w 10 51 $DEBUG && rump.netstat -rn -f inet6 61 atf_check -s exit:0 -o ignore rump.ifconfig shmif0 inet6 $IP6_PEER 62 atf_check -s exit:0 -o ignore rump.ifconfig shmif0 up 63 atf_check -s exit:0 -o ignore rump.ifconfig -w 10 66 $DEBUG && rump.netstat -rn -f inet6 [all …]
|
H A D | t_change.sh | 1 # $NetBSD: t_change.sh,v 1.9 2016/11/07 05:25:37 ozaki-r Exp $ 29 "rump_server -lrumpdev -lrumpnet -lrumpnet_net \ 30 -lrumpnet_netinet -lrumpnet_shmif" 33 DEBUG=${DEBUG:-false} 39 atf_set "descr" "Change a reject route to blackhole" 46 atf_check -s exit:0 ${netserver} ${RUMP_SERVER} 48 atf_check -s exit:0 -o ignore \ 49 rump.route add 207.46.197.32 127.0.0.1 -reject 50 atf_check -s exit:0 -o match:UGHR -x \ 51 "rump.route -n show -inet | grep ^207.46" [all …]
|
H A D | t_route.sh | 1 # $NetBSD: t_route.sh,v 1.10 2016/12/21 02:46:08 ozaki-r Exp $ 49 DEBUG=${DEBUG:-false} 51 PING_OPTS="-n -c 1 -w $TIMEOUT" 69 atf_check -s exit:0 rump.ifconfig shmif0 192.168.0.1 70 atf_check -s exit:0 rump.ifconfig shmif0 up 73 atf_check -s exit:0 -o match:'add net 10.0.0.1: gateway shmif0' \ 74 rump.route add -net 10.0.0.1/32 -link -cloning -iface shmif0 76 $DEBUG && rump.netstat -nr -f inet 80 atf_check -s exit:0 rump.ifconfig shmif0 10.0.0.1/32 81 atf_check -s exit:0 rump.ifconfig shmif0 up [all …]
|
/freebsd/tests/sys/netpfil/pf/ |
H A D | route_to.sh | 2 # SPDX-License-Identifier: BSD-2-Clause 34 atf_set descr 'Basic route-to test' 43 ifconfig ${epair_send}a 192.0.2.1/24 up 45 ifconfig ${epair_route}a 203.0.113.1/24 up 48 jexec alcatraz ifconfig ${epair_send}b 192.0.2.2/24 up 49 jexec alcatraz ifconfig ${epair_route}b 203.0.113.2/24 up 50 jexec alcatraz route add -net 198.51.100.0/24 192.0.2.1 51 jexec alcatraz pfctl -e 55 "pass out route-to (${epair_route}b 203.0.113.1) from 192.0.2.2 to 198.51.100.1 no state" 56 jexec alcatraz nc -w 3 -s 192.0.2.2 198.51.100.1 22 [all …]
|
H A D | icmp.sh | 2 # SPDX-License-Identifier: BSD-2-Clause 34 atf_set descr 'Test CVE-2019-5598' 45 ifconfig ${epair_in}a 192.0.2.1/24 up 46 ifconfig ${epair_out}a up 49 jexec alcatraz ifconfig ${epair_in}b 192.0.2.2/24 up 50 jexec alcatraz ifconfig ${epair_out}b 198.51.100.2/24 up 52 jexec alcatraz arp -s 198.51.100.3 00:01:02:03:04:05 53 jexec alcatraz route add default 198.51.100.3 54 route add -net 198.51.100.0/24 192.0.2.2 56 jexec alcatraz pfctl -e [all …]
|
H A D | fragmentation_pass.sh | 2 # SPDX-License-Identifier: BSD-2-Clause 46 ifconfig ${epair}b inet 192.0.2.1/24 up 47 jexec alcatraz ifconfig ${epair}a 192.0.2.2/24 up 52 jexec alcatraz pfctl -e 61 atf_check -s exit:0 -o ignore ping -c 1 192.0.2.2 64 atf_check -s exit:0 -o ignore ping -c 1 -s 800 192.0.2.2 67 atf_check -s exit:2 -o ignore ping -c 1 -s 20000 192.0.2.2 93 ifconfig ${epair_send}a inet6 2001:db8:42::1/64 no_dad up 95 jexec alcatraz ifconfig ${epair_send}b inet6 2001:db8:42::2/64 no_dad up 96 jexec alcatraz ifconfig ${epair_link}a inet6 2001:db8:43::2/64 no_dad up [all …]
|
H A D | pfsync.sh | 2 # SPDX-License-Identifier: BSD-2-Clause 56 jexec one ifconfig ${epair_sync}a 192.0.2.1/24 up 57 jexec one ifconfig ${epair_one}a 198.51.100.1/24 up 62 up 63 jexec two ifconfig ${epair_two}a 198.51.100.2/24 up 64 jexec two ifconfig ${epair_sync}b 192.0.2.2/24 up 69 up 72 jexec one pfctl -e 76 jexec two pfctl -e 81 hostid_one=$(jexec one pfctl -si -v | awk '/Hostid:/ { gsub(/0x/, "", $2); printf($2); }') [all …]
|
/freebsd/sbin/route/tests/ |
H A D | basic.sh | 1 #- 2 # SPDX-License-Identifier: BSD-2-Clause 34 atf_set descr 'add/change/delete route test for v4' 42 ifconfig ${epair}a 192.0.2.2/24 up 44 jexec alcatraz ifconfig ${epair}b 192.0.2.1/24 up 46 # add a new route in the jail 47 jexec alcatraz route add 192.0.2.3 192.0.2.2 51 atf_fail "Failed to add new route." 54 # change the added route 55 jexec alcatraz route change 192.0.2.3 192.0.2.4 [all …]
|
/freebsd/tests/sys/netipsec/tunnel/ |
H A D | utils.subr | 10 if ! sysctl -q kern.features.ipsec >/dev/null ; then 20 ifconfig ${epair_LAN_A}a up 22 ifconfig ${epair_PUB_A}a up 24 ifconfig ${epair_LAN_B}a up 26 ifconfig ${epair_PUB_B}a up 37 jexec hostA ifconfig ${epair_LAN_A}a 192.0.2.1/30 up 38 jexec ipsecA ifconfig ${epair_LAN_A}b 192.0.2.2/30 up 39 jexec ipsecA ifconfig ${epair_PUB_A}a 198.51.100.2/30 up 40 jexec router ifconfig ${epair_PUB_A}b 198.51.100.1/30 up 41 jexec router ifconfig ${epair_PUB_B}b 198.51.100.5/30 up [all …]
|
/freebsd/contrib/netbsd-tests/net/icmp/ |
H A D | t_icmp6_redirect.sh | 1 # $NetBSD: t_icmp6_redirect.sh,v 1.7 2016/11/25 08:51:16 ozaki-r Exp $ 45 DEBUG=${DEBUG:-true} 53 atf_set "require.progs" "rump_server rump.route rump.ping rump.ifconfig" 75 atf_check -s exit:0 rump.ifconfig shmif0 inet6 ${IP6IF0_GW1} 76 atf_check -s exit:0 rump.ifconfig shmif0 up 77 atf_check -s exit:0 rump.ifconfig shmif1 inet6 ${IP6IF1_GW1} 78 atf_check -s exit:0 rump.ifconfig shmif1 up 80 atf_check -s exit:0 -o match:'0.->.1' rump.sysctl -w \ 90 atf_check -s exit:0 rump.ifconfig shmif0 inet6 ${IP6IF0_PEER} 91 atf_check -s exit:0 rump.ifconfig shmif0 up [all …]
|
H A D | t_icmp_redirect.sh | 1 # $NetBSD: t_icmp_redirect.sh,v 1.6 2016/11/25 08:51:16 ozaki-r Exp $ 28 # Most codes are derived from tests/net/route/t_flags.sh 37 DEBUG=${DEBUG:-false} 55 atf_check -s exit:0 -o ignore rump.ifconfig shmif0 10.0.0.2/24 56 atf_check -s exit:0 -o ignore rump.ifconfig shmif0 up 58 atf_check -s exit:0 -o ignore rump.sysctl -w \ 62 $DEBUG && rump.netstat -rn -f inet 72 atf_check -s exit:0 -o ignore rump.ifconfig shmif0 10.0.0.1/24 73 atf_check -s exit:0 -o ignore rump.ifconfig shmif0 up 76 $DEBUG && rump.netstat -rn -f inet [all …]
|
/freebsd/tests/sys/net/ |
H A D | if_stf.sh | 2 # SPDX-License-Identifier: BSD-2-Clause 39 if ! kldstat -q -m if_stf; then 42 if ! kldstat -q -m if_gif; then 49 jexec relay ifconfig lo0 inet6 2001:db8::1/64 up 50 jexec relay ifconfig ${epair}a 192.0.2.1/24 up 53 jexec relay ifconfig $gif inet6 2002:c000:0201::1/64 up 55 jexec relay route -6 add default -interface $gif 58 jexec client ifconfig lo0 up 59 jexec client ifconfig ${epair}b 192.0.2.2/24 up 61 jexec client ifconfig $stf inet6 2002:c000:0202::1/32 up [all …]
|
/freebsd/usr.sbin/bsdconfig/share/media/ |
H A D | network.subr | 3 # Copyright (c) 2012-2013 Devin Teske 60 # If not running as init (and setting up RTSOL connections for 64 # If not running as init (and setting up a static connection for 68 # default route but not everyone). 79 f_dprintf "Not running as init -- calling the deed done." 84 if [ ! -e "$RESOLV_CONF" ]; then 95 # If this interface isn't a DHCP one, bring it up. 96 # If it is, then it's already up. 100 f_dprintf "A DHCP interface. Should already be up." 118 # show up in the route add below. [all …]
|
/freebsd/sys/contrib/device-tree/Bindings/net/ |
H A D | snps,dwmac.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Alexandre Torgue <alexandre.torgue@foss.st.com> 11 - Giuseppe Cavallaro <peppe.cavallaro@st.com> 12 - Jos [all...] |
/freebsd/contrib/netbsd-tests/net/net/ |
H A D | t_ipv6address.sh | 1 # $NetBSD: t_ipv6address.sh,v 1.12 2016/12/14 02:50:42 ozaki-r Exp $ 27 SERVER="rump_server -lrumpnet -lrumpnet_net -lrumpnet_netinet" 28 SERVER="${SERVER} -lrumpnet_shmif -lrumpdev" 29 SERVER6="${SERVER} -lrumpnet_netinet6" 44 DEBUG=${DEBUG:-true} 52 atf_check -s exit:0 ${SERVER6} ${SOCKSRC} 53 atf_check -s exit:0 ${SERVER6} ${SOCKFWD} 54 atf_check -s exit:0 ${SERVER6} ${SOCKDST} 57 atf_check -s exit:0 rump.ifconfig shmif0 create 58 atf_check -s exit:0 rump.ifconfig shmif1 create [all …]
|
/freebsd/contrib/netbsd-tests/net/mpls/ |
H A D | t_ldp_regen.sh | 1 # $NetBSD: t_ldp_regen.sh,v 1.7 2016/08/10 07:50:37 ozaki-r Exp $ 29 # Create 4 routers connected like this: R1--R2--R3--R4-- 33 # Start ldpd and wait for adjancencies to come up 34 # Add an alias on shmif1 on R4 for which we already have a route on R3 44 RUMP_LIBS="-lrumpnet -lrumpnet_net -lrumpnet_netinet -lrumpnet_netinet6 \ 45 -lrumpdev -lrumpnet_netmpls -lrumpnet_shmif" 59 RUMP_SERVER=${RUMP_SERVER4} atf_check -s exit:0 \ 61 RUMP_SERVER=${RUMP_SERVER4} atf_check -s exit:0 \ 62 rump.ifconfig -w 60 64 # Now ldpd on R5 should take notice of the new route and announce it [all …]
|
H A D | t_rfc4182.sh | 1 # $NetBSD: t_rfc4182.sh,v 1.4 2016/08/10 07:50:37 ozaki-r Exp $ 29 # Setup four routers connected like this: R1---R2---R3---R4-- 32 # Add route on R1 in order to encapsulate into MPLS the IP packets with 35 # Add a double tagged MPLS route on R2 in order to forward frames belonging to 37 # Add MPLS "POP" route on R3 for that FEC, pointing to R4 47 RUMP_FLAGS="-lrumpnet -lrumpnet_net -lrumpnet_netinet \ 48 -lrumpdev -lrumpnet_netmpls -lrumpnet_shmif" 61 ulimit -r 300 62 atf_check -s exit:0 rump_server ${RUMP_FLAGS} ${RUMP_SERVER1} 63 atf_check -s exit:0 rump_server ${RUMP_FLAGS} ${RUMP_SERVER2} [all …]
|
H A D | t_mpls_fw.sh | 1 # $NetBSD: t_mpls_fw.sh,v 1.5 2016/08/10 07:50:37 ozaki-r Exp $ 29 # Setup four routers connected like this: R1---R2---R3---R4-- 32 # Add route on R1 in order to encapsulate into MPLS the IP packets with 35 # Add MPLS "POP" route on R3 for that FEC, pointing to R4 45 RUMP_FLAGS="-lrumpnet -lrumpnet_net -lrumpnet_netinet \ 46 -lrumpdev -lrumpnet_netmpls -lrumpnet_shmif" 59 ulimit -r 300 60 atf_check -s exit:0 rump_server ${RUMP_FLAGS} ${RUMP_SERVER1} 61 atf_check -s exit:0 rump_server ${RUMP_FLAGS} ${RUMP_SERVER2} 62 atf_check -s exit:0 rump_server ${RUMP_FLAGS} ${RUMP_SERVER3} [all …]
|
/freebsd/tests/sys/netinet6/ |
H A D | forward6.sh | 1 #!/usr/bin/env atf-sh 2 #- 3 # SPDX-License-Identifier: BSD-2-Clause 35 atf_set descr 'Test valid IPv6 global unicast fast-forwarding to interface' 44 if [ $$ -gt 65535 ]; then 45 xl=`printf "%x" $(($$ - 65535))` 63 ifconfig ${epair}a up 66 jname="v6t-${id}-${yl}-${xl}" 68 jexec ${jname} ifconfig ${epair}b up 76 while [ `jexec ${jname} ifconfig ${epair}b inet6 | grep -c tentative` != "0" ]; do [all …]
|
H A D | fibs6.sh | 1 #!/usr/bin/env atf-sh 2 #- 3 # SPDX-License-Identifier: BSD-2-Clause 46 jname="v6t-fibs6_ifroutes1_success" 55 jexec ${jname}a ifconfig ${epair}a up 59 while [ `jexec ${jname}a ifconfig | grep inet6 | grep -c tentative` != "0" ]; do 62 # wait for lo0 to come up 63 while [ `jexec ${jname}a ifconfig -l | grep -c lo0` = "0" ]; do 66 jexec ${jname}a setfib 1 netstat -rn 71 jexec ${jname}a setfib 1 route -6n get ${net_dst}/64 [all …]
|
/freebsd/tests/sys/netpfil/common/ |
H A D | nat.sh | 1 #- 2 # SPDX-License-Identifier: BSD-2-Clause 52 ifconfig ${epair_host_nat}a 198.51.100.2/24 up 53 jexec nat ifconfig ${epair_host_nat}b 198.51.100.1/24 up 55 jexec nat ifconfig ${epair_client1_nat}a 192.0.2.1/24 up 56 jexec client1 ifconfig ${epair_client1_nat}b 192.0.2.2/24 up 58 jexec nat ifconfig ${epair_client2_nat}a 192.0.3.1/24 up 59 jexec client2 ifconfig ${epair_client2_nat}b 192.0.3.2/24 up 63 jexec client1 route add -net 198.51.100.0/24 192.0.2.1 64 jexec client2 route add -net 198.51.100.0/24 192.0.3.1 [all …]
|
/freebsd/tests/sys/netinet/ |
H A D | output.sh | 1 #!/usr/bin/env atf-sh 2 #- 3 # SPDX-License-Identifier: BSD-2-Clause 55 jname="v4t-output_tcp_setup_success" 60 jexec ${jname}a ifconfig ${epair}a up 64 jexec ${jname}b ifconfig ${epair}b up 69 args="--family inet --ports ${port} --match_str ${text}" 71 jexec ${jname}b ${script_name} --test_name "test_listen_tcp" ${args} & 76 while [ `jexec ${jname}b sockstat -4qlp ${port} | wc -l` != "1" ]; do 79 if [ ${counter} -ge 50 ]; then break; fi [all …]
|
H A D | forward.sh | 1 #!/usr/bin/env atf-sh 2 #- 3 # SPDX-License-Identifier: BSD-2-Clause 35 atf_set descr 'Test valid IPv4 on-stick fastforwarding to iface' 52 ifconfig ${epair}a up 55 jname="v4t-fwd_ip_icmp_iface_fast_success" 57 jexec ${jname} ifconfig ${epair}b up 67 # As we're doing router-on-the-stick, turn sending IP redirects off: 73 atf_check -s exit:0 $(atf_get_srcdir)/${script_name} \ 74 --test_name fwd_ip_icmp_fast \ [all …]
|
/freebsd/sys/netinet/ |
H A D | in_fib.c | 1 /*- 48 #include <net/route.h> 49 #include <net/route/route_ctl.h> 50 #include <net/route/route_var.h> 51 #include <net/route/fib_algo.h> 52 #include <net/route/nhop.h> 62 /* Verify struct route compatibility */ 63 /* Assert 'struct route_in' is compatible with 'struct route' */ 104 * Looks up path in fib @fibnum specified by @dst. 119 nh = dp->f(dp->arg, key, scopeid); in fib4_lookup() [all …]
|