diff options
author | Hannes Frederic Sowa <hannes@stressinduktion.org> | 2013-11-23 07:22:33 +0100 |
---|---|---|
committer | Willy Tarreau <w@1wt.eu> | 2014-05-19 07:54:02 +0200 |
commit | e01013c7f968aa72d3981d3ab835dcde7451bef2 (patch) | |
tree | f519612a52da437d6959dd9a94a3e521836c531e | |
parent | 2b232c68061e496e02f1fee12420f5b4c14b4860 (diff) |
ipv6: fix leaking uninitialized port number of offender sockaddr
[ Upstream commit 1fa4c710b6fe7b0aac9907240291b6fe6aafc3b8 ]
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>
Signed-off-by: Willy Tarreau <w@1wt.eu>
-rw-r--r-- | net/ipv6/datagram.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c index ef6436d93d1..5da306b115a 100644 --- a/net/ipv6/datagram.c +++ b/net/ipv6/datagram.c @@ -342,6 +342,7 @@ int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len) if (serr->ee.ee_origin != SO_EE_ORIGIN_LOCAL) { sin->sin6_family = AF_INET6; sin->sin6_flowinfo = 0; + sin->sin6_port = 0; sin->sin6_scope_id = 0; if (serr->ee.ee_origin == SO_EE_ORIGIN_ICMP6) { ipv6_addr_copy(&sin->sin6_addr, &ipv6_hdr(skb)->saddr); |