Re: [IPSEC] Move hardware headers for decaped packets

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

 



On Wed, 20 Aug 2003 22:42:17 +1000
Herbert Xu <herbert@gondor.apana.org.au> wrote:

> It seems that packet socket is the only thing that requires the
> mac header to sit next to the network header.  So what if we
> introduced a maclen field to the skb to indicate where the the
> mac header ended? That way we can move all the relocations down
> into af_packet.  What do you think?

And the idea is to replace all of the:

	skb_push(skb, skb->data - skb->mac.raw);

with:

	skb_push(skb, skb->maclen);

Right?

Sounds interesting.  There are a few issues.

1) packet socket will still need to do the memmove()
2) getting ->maclen set correctly in all cases might
   get tricky

For #2 it might be simpler to only use skb->maclen when
skb->dev is NULL.

What do you think?
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux