Re: libnetfilter_queue: Access conntrack info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Duncan,

I actually need connmark and other conntrack fields like secmark etc.
I think attr[NFQA_CT] is the correct way to access it but it's empty
in my case.
The libnetfilter_queue example sets connmark but doesn't show a way to
get connmark from the packet.

Thanks!

On Mon, Jun 28, 2021 at 8:20 PM Duncan Roe <duncan_roe@xxxxxxxxxxxxxxx> wrote:
>
> On Sun, Jun 27, 2021 at 10:07:18PM -0600, Psyspy 22 wrote:
> > Hello,
> >
> > Good morning! I am using the nf-queue.c example from
> > libnetfilter_queue repo. In the queue_cb() function, I am trying to
> > get the conntrack info but this condition is always false.
> >
> > if(attr[NFQA_CT])
> >
> > I can see the flow in conntrack -L output. Anyone know what I am
> > missing? Appreciate your help!
> >
> > Kind regards.
>
> attr[NFQA_CT] is for a connmark. Please try attr[NFQA_CT_INFO].
>
> Tell the list how that went,
>
> Cheers ... Duncan.



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux