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
Unknown Object (File)
Sun, Nov 3, 11:21 AM
Unknown Object (File)
Sat, Nov 2, 7:08 PM
Unknown Object (File)
Thu, Oct 31, 11:48 AM
Unknown Object (File)
Sat, Oct 26, 7:11 AM
Unknown Object (File)
Mon, Oct 21, 7:36 PM
Unknown Object (File)
Oct 7 2024, 1:52 PM
Unknown Object (File)
Sep 27 2024, 8:54 PM
Unknown Object (File)
Sep 26 2024, 5:11 PM

Details

Summary

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

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

zlei added a subscriber: zlei.

The test code looks good to me.

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

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
2

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.