]> err.no Git - linux-2.6/blobdiff - net/ipv6/ip6_tunnel.c
[PATCH] missing ntohs() in ip6_tunnel
[linux-2.6] / net / ipv6 / ip6_tunnel.c
index c3c2bf699a67259a9e1608e54e6f29f614dc2487..faea8a120ee253a3e3797bf8da633e5d52d8d21c 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <linux/config.h>
 #include <linux/module.h>
+#include <linux/capability.h>
 #include <linux/errno.h>
 #include <linux/types.h>
 #include <linux/sockios.h>
@@ -457,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;