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
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
Unknown Object (File)
Sep 23 2024, 8:51 AM

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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/netpfil/pf/pf.c
6871

Can we assert network epoch here?

7427

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
6871

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.

7427

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.