projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
430f03c
)
ping: always initialize ->sin6_scope_id and ->sin6_flowinfo
author
Cong Wang
<
[email protected]
>
Sun, 2 Jun 2013 22:43:52 +0000
(22:43 +0000)
committer
David S. Miller
<
[email protected]
>
Tue, 4 Jun 2013 23:58:42 +0000
(16:58 -0700)
If we don't need scope id, we should initialize it to zero.
Same for ->sin6_flowinfo.
Cc: Lorenzo Colitti <
[email protected]
>
Cc: David S. Miller <
[email protected]
>
Signed-off-by: Cong Wang <
[email protected]
>
Acked-by: Lorenzo Colitti <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/ipv4/ping.c
patch
|
blob
|
history
diff --git
a/net/ipv4/ping.c
b/net/ipv4/ping.c
index 3552a45a6f86ec79c3d0379ec6bcb1c6fcb1ffc4..1f1b2dd90277a0a64907c4f564c1b42d65ea5af7 100644
(file)
--- a/
net/ipv4/ping.c
+++ b/
net/ipv4/ping.c
@@
-892,12
+892,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);