From: Al Viro Date: Sat, 18 Feb 2006 21:02:18 +0000 (-0500) Subject: [PATCH] missing ntohs() in ip6_tunnel X-Git-Tag: v2.6.16-rc5~70^2~2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=cc6cdac0cf11955dc81d6c50b6738d05e1dca12b;p=linux-2.6-omap-h63xx.git [PATCH] missing ntohs() in ip6_tunnel ->payload_len is net-endian Signed-off-by: Al Viro --- diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index 92ead3cf956..faea8a120ee 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c @@ -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;