aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ndisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/ndisc.c')
-rw-r--r--net/ipv6/ndisc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 1342be8b4cdc..56ea92837307 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -1267,10 +1267,11 @@ skip_defrtr:
1267 } 1267 }
1268 1268
1269 if (ndopts.nd_opts_mtu) { 1269 if (ndopts.nd_opts_mtu) {
1270 __be32 n;
1270 u32 mtu; 1271 u32 mtu;
1271 1272
1272 memcpy(&mtu, ((u8*)(ndopts.nd_opts_mtu+1))+2, sizeof(mtu)); 1273 memcpy(&n, ((u8*)(ndopts.nd_opts_mtu+1))+2, sizeof(mtu));
1273 mtu = ntohl(mtu); 1274 mtu = ntohl(n);
1274 1275
1275 if (mtu < IPV6_MIN_MTU || mtu > skb->dev->mtu) { 1276 if (mtu < IPV6_MIN_MTU || mtu > skb->dev->mtu) {
1276 ND_PRINTK2(KERN_WARNING 1277 ND_PRINTK2(KERN_WARNING