Re: small patches against pre2.0.32-5

Gordon Oliver (
Sun, 16 Nov 1997 09:47:38 -0300

>FILE: drivers/net/new_tunnel.c
>ISSUE: new_tunnel.c:270: warning: assignment from incompatible pointer
> type
>CHANGE: Use memcpy instead (I'm not at all sure this is the right thing
> to do).


1) It is _supposed_ to be a pointer assignment.
2) You are copying in overlapping regions. In this case it works
(as mac.raw should always be before skb->data), but it
toasts the ip packet (toasts = destroys completely).
you might want to test random shots in the dark before
posting them :-)

If you need to fix the incompatible pointer assignment in this case, use a

BTW. The original code is wrong as well, but in more subtle ways. It sets the
mac address pointer to point at garbage. This confuses tcpdump, and if
bridging is enabled, it might confuse the bridging code as well. I have a
fix to make tcpdump happy (in ipsec's version of this code), but I'm not at
all sure it is the "right thing to do". It costs a memcopy, and may cause the
bridging code to stutter out double packets, not that I've looked at the
bridging code...

Gordon Oliver ( Independent Consultant
... Available for consulting on Linux ...