Template
1
0
mirror of https://github.com/bol-van/zapret2.git synced 2026-03-14 06:13:09 +00:00

nfqws2,zapret-lib.lua,zapret-auto.lua: restructure conntrack record

This commit is contained in:
bol-van
2025-12-10 19:36:31 +03:00
parent 33ac18ea6b
commit 2dd8533fb5
16 changed files with 293 additions and 239 deletions

View File

@@ -26,7 +26,7 @@ void rawpacket_queue_destroy(struct rawpacket_tailhead *q)
while((rp = rawpacket_dequeue(q))) rawpacket_free(rp);
}
struct rawpacket *rawpacket_queue(struct rawpacket_tailhead *q,const struct sockaddr_storage* dst,uint32_t fwmark_orig,uint32_t fwmark,const char *ifin,const char *ifout,const void *data,size_t len,size_t len_payload,const t_ctrack_position *pos)
struct rawpacket *rawpacket_queue(struct rawpacket_tailhead *q,const struct sockaddr_storage* dst,uint32_t fwmark_orig,uint32_t fwmark,const char *ifin,const char *ifout,const void *data,size_t len,size_t len_payload,const t_ctrack_positions *tpos)
{
struct rawpacket *rp = malloc(sizeof(struct rawpacket));
if (!rp) return NULL;
@@ -54,13 +54,13 @@ struct rawpacket *rawpacket_queue(struct rawpacket_tailhead *q,const struct sock
rp->len_payload=len_payload;
// make a copy for replay
if (pos)
if (tpos)
{
rp->pos = *pos;
rp->pos_present = true;
rp->tpos = *tpos;
rp->tpos_present = true;
}
else
rp->pos_present = false;
rp->tpos_present = false;
TAILQ_INSERT_TAIL(q, rp, next);