From: Hannes Frederic Sowa Date: Sat, 23 Nov 2013 06:22:33 +0000 (+0100) Subject: ipv6: fix leaking uninitialized port number of offender sockaddr X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1fa4c710b6fe7b0aac9907240291b6fe6aafc3b8;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Signed-off-by: David S. Miller --- 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) if (serr->ee.ee_origin != SO_EE_ORIGIN_LOCAL) { sin->sin6_family = AF_INET6; sin->sin6_flowinfo = 0; + sin->sin6_port = 0; if (skb->protocol == htons(ETH_P_IPV6)) { sin->sin6_addr = ipv6_hdr(skb)->saddr; if (np->rxopt.all)