]>
Commit | Line | Data |
---|---|---|
de78ab3b SL |
1 | From a2535c89d07766223b7f5f476552b2b75c146c65 Mon Sep 17 00:00:00 2001 |
2 | From: Hannes Frederic Sowa <hannes@stressinduktion.org> | |
3 | Date: Sat, 11 Jun 2016 20:32:06 +0200 | |
4 | Subject: ipv6: fix endianness error in icmpv6_err | |
5 | ||
6 | [ Upstream commit dcb94b88c09ce82a80e188d49bcffdc83ba215a6 ] | |
7 | ||
8 | IPv6 ping socket error handler doesn't correctly convert the new 32 bit | |
9 | mtu to host endianness before using. | |
10 | ||
11 | Cc: Lorenzo Colitti <lorenzo@google.com> | |
12 | Fixes: 6d0bfe22611602f ("net: ipv6: Add IPv6 support to the ping socket.") | |
13 | Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org> | |
14 | Acked-by: Lorenzo Colitti <lorenzo@google.com> | |
15 | Signed-off-by: David S. Miller <davem@davemloft.net> | |
16 | Signed-off-by: Sasha Levin <sashal@kernel.org> | |
17 | --- | |
18 | net/ipv6/icmp.c | 2 +- | |
19 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
20 | ||
21 | diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c | |
22 | index 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 | -- | |
35 | 2.19.1 | |
36 |