Subject: Re: tunnel xmit and h.raw

From: "David S. Miller" <[email-masked]>
Date: Tue, 7 Oct 2003 08:32:37 -0700

On Fri, 3 Oct 2003 03:00:27 +0300 (EEST)
Julian Anastasov <[email-masked]> wrote:

> # --------------------------------------------
> # 03/10/03	[email-masked]	1.1357
> # [IPV4/IPV6]: tunnel xmit must load skb->h.raw after all reallocations
> # --------------------------------------------

I've applied this, it is absolutely correct.

While studying this I've discovered some deeper problems.
The skb_shared() checks in these tunnel drivers is bogus,
on transmit skb->users should never ever be anything but 1.

Besides the tunnel drivers, the loopback driver and ipmr.c
do similar things in their ->hard_start_xmit() handlers.
In particular, the ipmr.c case is really in bad shape.

I've put fixing this onto the todo list...