mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 09:10:28 +00:00
pf: handle dummynet for non-IP packets
Do not panic if we try to dummynet an Ethernet packet that's not IPv4 or IPv6. Simply give it to dummynet. Sponsored by: Rubicon Communications, LLC ("Netgate")
This commit is contained in:
parent
42db2dbbc5
commit
ba3b6b938d
|
@ -4094,8 +4094,6 @@ pf_test_eth_rule(int dir, struct pfi_kkif *kif, struct mbuf **m0)
|
|||
dnflow.f_id.src_ip6 = src->v6;
|
||||
dnflow.f_id.dst_ip6 = dst->v6;
|
||||
break;
|
||||
default:
|
||||
panic("Unknown address family");
|
||||
}
|
||||
|
||||
mtag->flags |= PF_TAG_DUMMYNET;
|
||||
|
|
|
@ -419,6 +419,9 @@ dummynet_body()
|
|||
pft_set_rules alcatraz \
|
||||
"ether pass in dnpipe 1"
|
||||
|
||||
# Ensure things don't break if non-IP(v4/v6) traffic hits dummynet
|
||||
arp -d 192.0.2.2
|
||||
|
||||
# single ping succeeds just fine
|
||||
atf_check -s exit:0 -o ignore ping -c 1 192.0.2.2
|
||||
|
||||
|
|
Loading…
Reference in a new issue