Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F140805894
D49552.id152906.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
D49552.id152906.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
@@ -5491,6 +5491,7 @@
int asd = 0;
int match = 0;
int state_icmp = 0, icmp_dir;
+ int action = PF_PASS;
u_int16_t virtual_type, virtual_id;
u_int16_t bproto_sum = 0, bip_sum = 0;
u_int8_t icmptype = 0, icmpcode = 0;
@@ -5963,7 +5964,6 @@
if (pd->virtual_proto != PF_VPROTO_FRAGMENT &&
(!state_icmp && (r->keep_state || nr != NULL ||
(pd->flags & PFDESC_TCP_NORM)))) {
- int action;
bool nat64;
action = pf_create_state(r, nr, a, pd, nk, sk,
@@ -6005,6 +6005,9 @@
goto cleanup;
rewrite += ret;
+
+ if (rewrite && sk->af != nk->af)
+ action = PF_AFRT;
}
} else {
while ((ri = SLIST_FIRST(&match_rules))) {
@@ -6032,10 +6035,7 @@
*/
return (PF_DEFER);
- if (rewrite && sk != NULL && nk != NULL && sk->af != nk->af) {
- return (PF_AFRT);
- } else
- return (PF_PASS);
+ return (action);
cleanup:
while ((ri = SLIST_FIRST(&match_rules))) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 29, 6:52 AM (3 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27354018
Default Alt Text
D49552.id152906.diff (1 KB)
Attached To
Mode
D49552: pf: simplify action resolution in pf_test_rule()
Attached
Detach File
Event Timeline
Log In to Comment