Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107108664
D43741.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D43741.diff
View Options
diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -413,25 +413,22 @@
} while (0)
static struct pfi_kkif *
-BOUND_IFACE(struct pf_krule *r, struct pfi_kkif *k, struct pf_pdesc *pd)
+BOUND_IFACE(struct pf_kstate *st, struct pfi_kkif *k)
{
/* Floating unless otherwise specified. */
- if (! (r->rule_flag & PFRULE_IFBOUND))
+ if (! (st->rule.ptr->rule_flag & PFRULE_IFBOUND))
return (V_pfi_all);
/* Don't overrule the interface for states created on incoming packets. */
- if (pd->dir == PF_IN)
- return (k);
-
- /* No route-to, so don't overrrule. */
- if (r->rt != PF_ROUTETO)
+ if (st->direction == PF_IN)
return (k);
- if (r->rpool.cur == NULL)
+ /* No route-to, so don't overrule. */
+ if (st->rt != PF_ROUTETO)
return (k);
/* Bind to the route-to interface. */
- return (r->rpool.cur->kif);
+ return (st->rt_kif);
}
#define STATE_INC_COUNTERS(s) \
@@ -5018,7 +5015,7 @@
__func__, nr, sk, nk));
/* Swap sk/nk for PF_OUT. */
- if (pf_state_insert(BOUND_IFACE(r, kif, pd), kif,
+ if (pf_state_insert(BOUND_IFACE(s, kif), kif,
(pd->dir == PF_IN) ? sk : nk,
(pd->dir == PF_IN) ? nk : sk, s)) {
REASON_SET(&reason, PFRES_STATEINS);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 11, 6:00 AM (18 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15750467
Default Alt Text
D43741.diff (1 KB)
Attached To
Mode
D43741: pf: Ensure that st->kif is obtained in a way which respects the r->rpool->mtx mutex
Attached
Detach File
Event Timeline
Log In to Comment