]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
ip6_tunnel - endianness annotations
authorAl Viro <viro@ftp.linux.org.uk>
Thu, 26 Jul 2007 16:33:29 +0000 (17:33 +0100)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 26 Jul 2007 18:11:56 +0000 (11:11 -0700)
commit704eae1f32274c0435f7f3924077afdb811edd1d
tree211d333d6f50ea078b6f4f29f0734eadcecdc37b
parenta34c45896a723ee7b13128ac8bf564ea42fcd1eb
ip6_tunnel - endianness annotations

Convert rel_info to host-endian before calling ip6_tnl_err().
The things become much more straightforward that way.
The key observation (and the reason why that code actually
worked) is that after ip6_tnl_err() we either immediately
bailed out or had rel_info set to 0 or had it set to host-endian
and guaranteed to hit
(rel_type == ICMP_DEST_UNREACH && rel_code == ICMP_FRAG_NEEDED)
case.  So inconsistent endianness didn't really lead to bugs,
but it had been subtle and prone to breakage.  New variant is
saner and obviously safe.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
net/ipv6/ip6_tunnel.c