aboutsummaryrefslogtreecommitdiff
path: root/net/ipv4
diff options
context:
space:
mode:
authorCong Wang <amwang@redhat.com>2014-03-10 18:59:25 -0600
committerSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>2014-05-06 09:29:35 -0600
commit1f14b621c8d46c29cef152aeec1fc54cfd8a99e2 (patch)
treeffd9fd51a964ee142b216a6394f10c3c970c812e /net/ipv4
parent328eb0ba86eb90ae54b2b7505d6b266088b345e8 (diff)
downloadqcom-msm-v3.10-1f14b621c8d46c29cef152aeec1fc54cfd8a99e2.tar.gz
ping: always initialize ->sin6_scope_id and ->sin6_flowinfo
If we don't need scope id, we should initialize it to zero. Same for ->sin6_flowinfo. CRs-Fixed: 619776 Change-Id: Ic19792cee3f5dc30237562cf48e6bdf49817c96e Cc: Lorenzo Colitti <lorenzo@google.com> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Cong Wang <amwang@redhat.com> Acked-by: Lorenzo Colitti <lorenzo@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Git-commit: c26d6b46da3ee86fa8a864347331e5513ca84c2b Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/ping.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
index e163c82fe1b..8f0836e2924 100644
--- a/net/ipv4/ping.c
+++ b/net/ipv4/ping.c
@@ -893,12 +893,12 @@ int ping_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
sin6->sin6_port = 0;
sin6->sin6_addr = ip6->saddr;
+ sin6->sin6_flowinfo = 0;
if (np->sndflow)
sin6->sin6_flowinfo = ip6_flowinfo(ip6);
- if (__ipv6_addr_needs_scope_id(
- ipv6_addr_type(&sin6->sin6_addr)))
- sin6->sin6_scope_id = IP6CB(skb)->iif;
+ sin6->sin6_scope_id = ipv6_iface_scope_id(&sin6->sin6_addr,
+ IP6CB(skb)->iif);
if (inet6_sk(sk)->rxopt.all)
pingv6_ops.ip6_datagram_recv_ctl(sk, msg, skb);