Page MenuHomeFreeBSD

pf: tag dummynet'd route-to packets with their real destination
ClosedPublic

Authored by kp on May 10 2022, 8:53 AM.
Tags
None
Referenced Files
F109862573: D35159.diff
Mon, Feb 10, 11:48 AM
Unknown Object (File)
Oct 22 2024, 1:05 PM
Unknown Object (File)
Oct 3 2024, 9:56 PM
Unknown Object (File)
Oct 3 2024, 2:15 PM
Unknown Object (File)
Oct 2 2024, 5:11 AM
Unknown Object (File)
Oct 1 2024, 8:33 AM
Unknown Object (File)
Sep 27 2024, 8:05 PM
Unknown Object (File)
Sep 26 2024, 9:22 PM

Details

Summary

If we delay route-to/dup-to/reply-to through dummynet we are eventually
returned to pf_test(). At that point we no longer have the context for
the route-to destination. We'd just skip the pf_test() and continue
processing. This means that route-to did not work as expected.

Extend pf_mtag to carry the route-to destination so we can apply it when
we re-enter pf_test().

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

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 45508
Build 42396: arc lint + arc unit

Event Timeline

sys/netpfil/pf/pf.c
6869

Can we assert network epoch here?

7425

What do you think about changing ifnet_byindexgen() to never return IFF_DYING interfaces?

P.S. I desire the need for this flag to be eliminated.

sys/netpfil/pf/pf.c
6869

Yeah, that makes sense.

Pretty much all of pf runs under net_epoch, but an assert will make it more obvious that it's safe to access these fields here.

7425

That would make sense to me, yes.

  • add NET_EPOCH_ASSERT
  • return 'int' for errors rather than 'bool'
This revision was not accepted when it landed; it landed in state Needs Review.May 12 2022, 7:58 PM
This revision was automatically updated to reflect the committed changes.