mirror of
https://github.com/lgcosta/pf-linux-port.git
synced 2026-11-15 11:44:44 -03:00
divert: consume PF_TAG_DIVERTED after passthrough (BSD ip_input role); divert layer owns its own skb ref; gate uses pfput path
This commit is contained in:
1 parent
da1f678125
commit
4728648a0c
3 files changed
+24
-6
No files matched your search
@@ -166,13 +166,19 @@ divert_packet(struct mbuf *m, int dir, u_int16_t divert_port)
|
||||
{
|
||||
struct pf_divert *dv = pf_find_divert(m);
|
||||
|
||||
if (dv)
|
||||
if (dv) {
|
||||
type = dv->type;
|
||||
if (divert_port == 0)
|
||||
divert_port = dv->port;
|
||||
}
|
||||
}
|
||||
skb = m_to_skb(m);
|
||||
m->skb = NULL; /* ownership moves into the divert layer */
|
||||
if (skb)
|
||||
skb_get(skb); /* divert layer's own reference */
|
||||
m->skb = NULL;
|
||||
m_freem(m);
|
||||
pfk_divert_queue(skb, dir, type, divert_port);
|
||||
if (skb)
|
||||
pfk_divert_queue(skb, dir, type, divert_port);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in new issue
Block a user