[IPV4]: ipip and ip_gre encapsulation bugs
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 19 Sep 2006 20:23:19 +0000 (13:23 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Fri, 22 Sep 2006 22:19:43 +0000 (15:19 -0700)
commitc55e2f4997a104d66b59bdf1aa8ab125d09ae00a
tree51c92b1085e5a3067a14386c0b449ac33036bb7a
parent593f16aa627d61da447c76ee5a159450174627f6
[IPV4]: ipip and ip_gre encapsulation bugs

Handling of ipip and ip_gre ICMP error relaying is b0rken; it accesses
8bit field + 3 reserved octets as host-endian 32bit, does comparison,
subtraction and stuffs the result back.  That breaks on big-endian.

Fixed, made endian-clean.

[ Note that this effected code is permanently commented out with
  and ifdef, so this error couldn't actually cause problems for
  anyone. -DaveM ]

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_gre.c
net/ipv4/ipip.c