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)
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
Unknown Object (File)
Thu, Nov 21, 3:19 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 59503
Build 56390: arc lint + arc unit

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.