Re: Problems with corruption sending packets from a module

Alexey Kuznetsov (kuznet@ms2.inr.ac.ru)
Tue, 21 Aug 2001 02:57:08 +0400 (MSD)


Hello!

> In case someone is reading the archives and has a similar problem, this
> appears to be the cause of the trouble. If I do
> skb->data += sizeof(struct ethhdr);
> then it's fine.

It is not fine at all... You are not allowed to change skb->data,
skb->len etc.

> I guess I ought to be using skb_reserve really

You guess right: skb_reserve(), skb_put() and other functions
provided by skbuff.h. But not to touch pointers directly,
they have dependancies, which are known only to skbuff.[hc].

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