NF_ARP_OUT skb has NULL link layer header

From: phill whelan
Date: Wed Jun 23 2004 - 12:43:43 EST


Hello,

I've been working lately on a netfilter hook extension which rewrites outgoing ARP packets to spoof a host's MAC address.

I've succesfully spoofed ARP replies, but have seen that several OS's tend to update their arp cache based on information in ARP requests.
After several panic()'s, I noticed that the link layer header (skb->mac)
is NULL. My intention was to rewrite the ethernet mac address to the spoofed MAC address.

Is there a way to rewrite the link layer header besides modifying skb->mac (skb->mac.ethernet to be precise), or could I possibly just tag on a kmalloc()'ed pointer to the skb->mac?

If it makes any difference, I only noticed this when porting the code to linux 2.6 (2.6.7).

Thanks a lot, in advance

Phillip Whelan
EXIS (http://www.exis.cl)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/