]> err.no Git - linux-2.6/commitdiff
[PATCH] missing ntohs() in ip6_tunnel
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 18 Feb 2006 21:02:18 +0000 (16:02 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 18 Feb 2006 21:02:18 +0000 (16:02 -0500)
->payload_len is net-endian

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

index 92ead3cf956b1d27817f98a084cdd43d3cc7fb20..faea8a120ee253a3e3797bf8da633e5d52d8d21c 100644 (file)
@@ -458,7 +458,7 @@ ip6ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
                        mtu = IPV6_MIN_MTU;
                t->dev->mtu = mtu;
 
-               if ((len = sizeof (*ipv6h) + ipv6h->payload_len) > mtu) {
+               if ((len = sizeof (*ipv6h) + ntohs(ipv6h->payload_len)) > mtu) {
                        rel_type = ICMPV6_PKT_TOOBIG;
                        rel_code = 0;
                        rel_info = mtu;