Page MenuHomeFreeBSD

pf tests: test the new received-on feature
ClosedPublic

Authored by kp on Sep 7 2024, 9:34 AM.
Tags
None
Referenced Files
F106170839: D46578.diff
Thu, Dec 26, 1:32 PM
Unknown Object (File)
Sat, Dec 7, 9:04 AM
Unknown Object (File)
Sat, Dec 7, 9:04 AM
Unknown Object (File)
Sat, Dec 7, 9:04 AM
Unknown Object (File)
Sat, Dec 7, 9:04 AM
Unknown Object (File)
Thu, Dec 5, 10:12 PM
Unknown Object (File)
Tue, Dec 3, 8:28 PM
Unknown Object (File)
Mon, Dec 2, 8:29 PM

Details

Summary

Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 59366
Build 56253: arc lint + arc unit

Event Timeline

zlei added a subscriber: zlei.

The test code looks good to me.

sbin/pfctl/tests/files/pf1022.ok
1

What purpose do those two files pf1022.in and pf1022.ok serve ?

This revision is now accepted and ready to land.Sep 14 2024, 7:41 AM

The document says received-on can work on interface group. Shall we add additional tests for that case ?

The document says received-on can work on interface group. Shall we add additional tests for that case ?

That is an excellent idea. I'll add a test case.
It should just work, because we use pf_match_rcvif() to do the matching, but tests are good anyway.

sbin/pfctl/tests/files/pf1022.ok
1

They're part of the pfctl parser tests. We feed the .in file to it, and check that it produces the expected output. Basically making sure it can parse things the way we expect them to be parsed.

Also test received-on <group>

This revision now requires review to proceed.Sep 16 2024, 10:07 AM
This revision was not accepted when it landed; it landed in state Needs Review.Sep 16 2024, 1:06 PM
This revision was automatically updated to reflect the committed changes.