aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorHannes Frederic Sowa <hannes@stressinduktion.org>2013-11-23 01:22:33 -0500
committerDavid S. Miller <davem@davemloft.net>2013-11-23 17:46:23 -0500
commit1fa4c710b6fe7b0aac9907240291b6fe6aafc3b8 (patch)
treef24f22b0c3e0a07c84008f000e1b9d00da376961 /net/ipv6
parent85fbaa75037d0b6b786ff18658ddf0b4014ce2a4 (diff)
ipv6: fix leaking uninitialized port number of offender sockaddr
Offenders don't have port numbers, so set it to 0. Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/datagram.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c
index d690204a0275..8dfe1f4d3c1a 100644
--- a/net/ipv6/datagram.c
+++ b/net/ipv6/datagram.c
@@ -378,6 +378,7 @@ int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len)
378 if (serr->ee.ee_origin != SO_EE_ORIGIN_LOCAL) { 378 if (serr->ee.ee_origin != SO_EE_ORIGIN_LOCAL) {
379 sin->sin6_family = AF_INET6; 379 sin->sin6_family = AF_INET6;
380 sin->sin6_flowinfo = 0; 380 sin->sin6_flowinfo = 0;
381 sin->sin6_port = 0;
381 if (skb->protocol == htons(ETH_P_IPV6)) { 382 if (skb->protocol == htons(ETH_P_IPV6)) {
382 sin->sin6_addr = ipv6_hdr(skb)->saddr; 383 sin->sin6_addr = ipv6_hdr(skb)->saddr;
383 if (np->rxopt.all) 384 if (np->rxopt.all)