Skip to contentSkip to conversation

Hardware Address

DISCUSSION Ryan Hagelstrom 2 participants 2 messages Sep 27, 2004 netfilter

lore
Share & tools
lore
#0 lore raw

I'm building my one netfilter kernel module.

When filtering outgoing packets using the netfilter rules, the packets that I get do not have the hardware header on the packet on them. It seems that the hardware header is placed on the packet after the packet has gone though netfilter. Can anyone suggest any way to get the hardware header for an outgoing packet? I'm looking for a good workaround approach.

Thanks

Ryan Hagelstrom

#1 lore raw
Quoted 4 lines · Ryan Hagelstrom

When filtering outgoing packets using the netfilter rules, the packets that I get do not have the hardware header on the packet on them. It seems that the hardware header is placed on the packet after the packet has gone though netfilter.

Correct.

Quoted 2 lines

Can anyone suggest any way to get the hardware header for an outgoing packet? I'm looking for a good workaround approach.

Tricky.. but in theory you should be able to guess this by looking at the destination device and querying it for it's MAC address provided it is an Ethernet interface.

Regards
Henrik