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)
Wed, Apr 24, 3:47 AM
Unknown Object (File)
Jan 4 2024, 5:21 PM
Unknown Object (File)
Dec 25 2023, 7:19 PM
Unknown Object (File)
Dec 20 2023, 4:38 AM
Unknown Object (File)
Dec 20 2023, 3:01 AM
Unknown Object (File)
Nov 2 2023, 2:48 AM
Unknown Object (File)
Oct 29 2023, 4:25 AM
Unknown Object (File)
Sep 28 2023, 5:11 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
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.