Greetings fellow packet filterers! Ranges in pf seem to be broken. After some digging, it looks like this patch was missed: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/net/pf.c.diff?r1=1.696&r2=1.696.2.1 Cheers! - mjc
Adding the two most recent committers to pf.c into the Cc: list for comment.
A commit references this bug: Author: kp Date: Mon Aug 15 12:13:14 UTC 2016 New revision: 304152 URL: https://svnweb.freebsd.org/changeset/base/304152 Log: pf: Add missing byte-order swap to pf_match_addr_range Without this, rules using address ranges (e.g. "10.1.1.1 - 10.1.1.5") did not match addresses correctly on little-endian systems. PR: 211796 Obtained from: OpenBSD (sthen) MFC after: 3 days Changes: head/sys/netpfil/pf/pf.c
A commit references this bug: Author: kp Date: Fri Aug 19 11:31:30 UTC 2016 New revision: 304462 URL: https://svnweb.freebsd.org/changeset/base/304462 Log: MFC r304152: pf: Add missing byte-order swap to pf_match_addr_range Without this, rules using address ranges (e.g. "10.1.1.1 - 10.1.1.5") did not match addresses correctly on little-endian systems. PR: 211796 Obtained from: OpenBSD (sthen) Changes: _U stable/11/ stable/11/sys/netpfil/pf/pf.c
A commit references this bug: Author: kp Date: Fri Aug 19 11:36:00 UTC 2016 New revision: 304463 URL: https://svnweb.freebsd.org/changeset/base/304463 Log: MFC r304152: pf: Add missing byte-order swap to pf_match_addr_range Without this, rules using address ranges (e.g. "10.1.1.1 - 10.1.1.5") did not match addresses correctly on little-endian systems. PR: 211796 Obtained from: OpenBSD (sthen) Changes: _U stable/10/ stable/10/sys/netpfil/pf/pf.c
A commit references this bug: Author: kp Date: Fri Aug 19 13:39:37 UTC 2016 New revision: 304466 URL: https://svnweb.freebsd.org/changeset/base/304466 Log: MFC r304152: pf: Add missing byte-order swap to pf_match_addr_range Without this, rules using address ranges (e.g. "10.1.1.1 - 10.1.1.5") did not match addresses correctly on little-endian systems. PR: 211796 Obtained from: OpenBSD (sthen) Changes: stable/9/sys/contrib/pf/net/pf.c
There is a commit referencing this PR, but it's still not closed and has been inactive for some time. Closing the PR as fixed but feel free to re-open it if the issue hasn't been completely resolved. Thanks