icmp.sh (34063cb714602972b6d985ad747fc8f66a8daae1) | icmp.sh (89f6723288b0d27d3f14f93e6e83f672fa2b8aca) |
---|---|
1# 2# SPDX-License-Identifier: BSD-2-Clause 3# 4# Copyright (c) 2019 Kristof Provost <kp@FreeBSD.org> 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 94 unchanged lines hidden (view full) --- 103 104 vnet_mkjail cl ${epair_cl}a 105 jexec cl ifconfig ${epair_cl}a 198.51.100.1/24 up 106 jexec cl route add default 198.51.100.2 107 108 jexec nat pfctl -e 109 pft_set_rules nat \ 110 "nat on ${epair_int}b from 198.51.100.0/24 -> (${epair_int}b)" \ | 1# 2# SPDX-License-Identifier: BSD-2-Clause 3# 4# Copyright (c) 2019 Kristof Provost <kp@FreeBSD.org> 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 94 unchanged lines hidden (view full) --- 103 104 vnet_mkjail cl ${epair_cl}a 105 jexec cl ifconfig ${epair_cl}a 198.51.100.1/24 up 106 jexec cl route add default 198.51.100.2 107 108 jexec nat pfctl -e 109 pft_set_rules nat \ 110 "nat on ${epair_int}b from 198.51.100.0/24 -> (${epair_int}b)" \ |
111 "pass" | 111 "block" \ 112 "pass inet proto udp" \ 113 "pass inet proto icmp icmp-type { echoreq }" |
112 113 # Sanity checks 114 atf_check -s exit:0 -o ignore \ 115 jexec cl ping -c 1 198.51.100.2 116 atf_check -s exit:0 -o ignore \ 117 jexec cl ping -c 1 203.0.113.1 118 atf_check -s exit:0 -o ignore \ 119 jexec cl ping -c 1 203.0.113.2 --- 23 unchanged lines hidden --- | 114 115 # Sanity checks 116 atf_check -s exit:0 -o ignore \ 117 jexec cl ping -c 1 198.51.100.2 118 atf_check -s exit:0 -o ignore \ 119 jexec cl ping -c 1 203.0.113.1 120 atf_check -s exit:0 -o ignore \ 121 jexec cl ping -c 1 203.0.113.2 --- 23 unchanged lines hidden --- |