diff options
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r-- | net/ipv4/udp.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index de86e5bc4462..5944d7d668dd 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -1235,12 +1235,6 @@ int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
1235 | int is_udplite = IS_UDPLITE(sk); | 1235 | int is_udplite = IS_UDPLITE(sk); |
1236 | bool slow; | 1236 | bool slow; |
1237 | 1237 | ||
1238 | /* | ||
1239 | * Check any passed addresses | ||
1240 | */ | ||
1241 | if (addr_len) | ||
1242 | *addr_len = sizeof(*sin); | ||
1243 | |||
1244 | if (flags & MSG_ERRQUEUE) | 1238 | if (flags & MSG_ERRQUEUE) |
1245 | return ip_recv_error(sk, msg, len); | 1239 | return ip_recv_error(sk, msg, len); |
1246 | 1240 | ||
@@ -1302,6 +1296,7 @@ try_again: | |||
1302 | sin->sin_port = udp_hdr(skb)->source; | 1296 | sin->sin_port = udp_hdr(skb)->source; |
1303 | sin->sin_addr.s_addr = ip_hdr(skb)->saddr; | 1297 | sin->sin_addr.s_addr = ip_hdr(skb)->saddr; |
1304 | memset(sin->sin_zero, 0, sizeof(sin->sin_zero)); | 1298 | memset(sin->sin_zero, 0, sizeof(sin->sin_zero)); |
1299 | *addr_len = sizeof(*sin); | ||
1305 | } | 1300 | } |
1306 | if (inet->cmsg_flags) | 1301 | if (inet->cmsg_flags) |
1307 | ip_cmsg_recv(msg, skb); | 1302 | ip_cmsg_recv(msg, skb); |