netdev
[Top] [All Lists]

skb_linearize needs fixing?

To: netdev@xxxxxxxxxxx
Subject: skb_linearize needs fixing?
From: Rusty Russell <rusty@xxxxxxxxxxxxxxxx>
Date: Tue, 19 Dec 2000 10:35:19 +1100
Cc: davem@xxxxxxxxxx, anton@xxxxxxxxxxxxx, kuznet@xxxxxxxxxxxxx, ak@xxxxxx
Sender: owner-netdev@xxxxxxxxxxx
At the moment netfilter does a skb_linearize(), and the ip_queue_xmit2
dereferences skb->sk.  Boom (thanks Anton).

skb_linearize is different from skb_copy: it should copy the sk, list
and the destructor(?) (ie. be an identical copy).  I'd also prefer it to
return an int, and not free the old skb on failure (ie. int
skb_linearize(struct sk_buff **pskb)).

Oh, and inlining it seems, um, questionable.

Want a patch?
Rusty.
--
Hacking time.

<Prev in Thread] Current Thread [Next in Thread>