Skip to contentSkip to conversation

Conntrack modification

DISCUSSION Piotr Duszynski 1 participant 1 message Nov 9, 2008 netfilter

lore
Share & tools
lore
#0 lore raw

Hi everyone,

I am working on a project, that needs source MAC information for each active connection tracked by conntrack. In the beginning I was thinking
about using the nf_conntrack_tuple.src for this purpose, but then I saw
that the hash function is taking into account this struct as well. I guess that if I modified it, packets wouldn't be properly identified anymore as part of existing connection. After diving again into the source code I have come across nf_conntrack_extend , which seems to a good place to put the MAC related information.

I am really not sure which path should I take. In the simplest case I could just add __u32 src_mac to the nf_conntrack_tuple, but this doesn't seem to be a very elegant solution .

Best regards
Piotrek