]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - queue-3.18/ipv6-fix-endianness-error-in-icmpv6_err.patch
patches for 3.18
[thirdparty/kernel/stable-queue.git] / queue-3.18 / ipv6-fix-endianness-error-in-icmpv6_err.patch
CommitLineData
de78ab3b
SL
1From a2535c89d07766223b7f5f476552b2b75c146c65 Mon Sep 17 00:00:00 2001
2From: Hannes Frederic Sowa <hannes@stressinduktion.org>
3Date: Sat, 11 Jun 2016 20:32:06 +0200
4Subject: ipv6: fix endianness error in icmpv6_err
5
6[ Upstream commit dcb94b88c09ce82a80e188d49bcffdc83ba215a6 ]
7
8IPv6 ping socket error handler doesn't correctly convert the new 32 bit
9mtu to host endianness before using.
10
11Cc: Lorenzo Colitti <lorenzo@google.com>
12Fixes: 6d0bfe22611602f ("net: ipv6: Add IPv6 support to the ping socket.")
13Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
14Acked-by: Lorenzo Colitti <lorenzo@google.com>
15Signed-off-by: David S. Miller <davem@davemloft.net>
16Signed-off-by: Sasha Levin <sashal@kernel.org>
17---
18 net/ipv6/icmp.c | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
22index 97ae70077a4f..3b5c265dcb1d 100644
23--- a/net/ipv6/icmp.c
24+++ b/net/ipv6/icmp.c
25@@ -97,7 +97,7 @@ static void icmpv6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
26
27 if (!(type & ICMPV6_INFOMSG_MASK))
28 if (icmp6->icmp6_type == ICMPV6_ECHO_REQUEST)
29- ping_err(skb, offset, info);
30+ ping_err(skb, offset, ntohl(info));
31 }
32
33 static int icmpv6_rcv(struct sk_buff *skb);
34--
352.19.1
36