summaryrefslogtreecommitdiff
path: root/lib/libradius/radius_eapmsk.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2021-02-03 07:41:13 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2021-02-03 07:41:13 +0000
commit5270eb1d260cad03eb153836a9edc4ec0caf953d (patch)
tree922892219cd516e9bd451dad08aa9174d52b3008 /lib/libradius/radius_eapmsk.c
parentc0a6d2e0bbdc6ce945d0e650dc2bd230cc56f7fb (diff)
change pf_route so pf only runs when packets enter and leave the stack.
before this change pf_route operated on the semantic that pf runs when packets go over an interface, so when pf_route changed which interface the packet was on it would run pf_test again. this change changes (restores) the semantic that pf is only supposed to run when packets go in or out of the network stack, even if route-to is responsibly for short circuiting past the network stack. just to be clear, for normal packets (ie, those not touched by route-to/reply-to/dup-to), there isn't a difference between running pf when packets enter or leave the stack, or having pf run when a packet goes over an interface. the main reason for this change is that running the same packet through pf multiple times creates confusion for the state table. by default, pf states are floating, meaning that packets are matched to states regardless of which interface they're going over. if a packet leaving on em0 is rerouted out em1, both traversals will end up using the same state, which at best will make the accounting look weird, or at worst fail some checks in the state and get dropped. another reason for this commit is is to make handling of the changes that route-to makes consistent with other changes that are made to packet. eg, when nat is applied to a packet, we don't run pf_test again with the new addresses. the main caveat with this diff is you can't have one rule that pushes a packet out a different interface, and then have a rule on that second interface that NATs the packet. i'm not convinced this ever worked reliably or was used much anyway, so we don't think it's a big concern. discussed with many, with special thanks to bluhm@, sashan@ and sthen@ for weathering most of that pain. ok claudio@ sashan@ jmatthew@
Diffstat (limited to 'lib/libradius/radius_eapmsk.c')
0 files changed, 0 insertions, 0 deletions