FreeBSD Bugzilla – Attachment 194342 Details for
Bug 229092
[pf] [pfsync] States created by route-to rules pfsynced without interface
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Reconstruct rt_kif in pfsync_state_import
pfsync-routeto-1.diff (text/plain), 1.48 KB, created by
Kajetan Staszkiewicz
on 2018-06-17 21:40:24 UTC
(
hide
)
Description:
Reconstruct rt_kif in pfsync_state_import
Filename:
MIME Type:
Creator:
Kajetan Staszkiewicz
Created:
2018-06-17 21:40:24 UTC
Size:
1.48 KB
patch
obsolete
>diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c >index 24a95fcfc27..e61a261b74e 100644 >--- a/sys/netpfil/pf/if_pfsync.c >+++ b/sys/netpfil/pf/if_pfsync.c >@@ -504,34 +504,46 @@ pfsync_state_import(struct pfsync_state *sp, u_int8_t flags) > uint32_t timeout; > > timeout = r->timeout[sp->timeout]; > if (!timeout) > timeout = V_pf_default_rule.timeout[sp->timeout]; > > /* sp->expire may have been adaptively scaled by export. */ > st->expire -= timeout - ntohl(sp->expire); > } > >+ /* reconstruct rt_kif from rule for round-robin redirection */ >+ st->rt_kif = NULL; >+ if (r != &V_pf_default_rule && >+ (r->rpool.opts & PF_POOL_TYPEMASK ) == PF_POOL_ROUNDROBIN) { >+ struct pf_pooladdr *acur; >+ TAILQ_FOREACH(acur, &(r->rpool.list), entries) { >+ if (acur->addr.type == PF_ADDR_TABLE && >+ pfr_match_addr(acur->addr.p.tbl, &st->rt_addr, >+ skw->af)) >+ st->rt_kif = acur->kif; >+ }; >+ }; >+ > st->direction = sp->direction; > st->log = sp->log; > st->timeout = sp->timeout; > st->state_flags = sp->state_flags; > > st->id = sp->id; > st->creatorid = sp->creatorid; > pf_state_peer_ntoh(&sp->src, &st->src); > pf_state_peer_ntoh(&sp->dst, &st->dst); > > st->rule.ptr = r; > st->nat_rule.ptr = NULL; > st->anchor.ptr = NULL; >- st->rt_kif = NULL; > > st->pfsync_time = time_uptime; > st->sync_state = PFSYNC_S_NONE; > > if (!(flags & PFSYNC_SI_IOCTL)) > st->state_flags |= PFSTATE_NOSYNC; > > if ((error = pf_state_insert(kif, skw, sks, st)) != 0) > goto cleanup_state; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 229092
:
194342
|
201346