diff options
Diffstat (limited to 'net/ipv4/af_inet.c')
-rw-r--r-- | net/ipv4/af_inet.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index cc1463156cd0..9c1926027a26 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c | |||
@@ -465,6 +465,9 @@ int inet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) | |||
465 | if (addr_len < sizeof(struct sockaddr_in)) | 465 | if (addr_len < sizeof(struct sockaddr_in)) |
466 | goto out; | 466 | goto out; |
467 | 467 | ||
468 | if (addr->sin_family != AF_INET) | ||
469 | goto out; | ||
470 | |||
468 | chk_addr_ret = inet_addr_type(sock_net(sk), addr->sin_addr.s_addr); | 471 | chk_addr_ret = inet_addr_type(sock_net(sk), addr->sin_addr.s_addr); |
469 | 472 | ||
470 | /* Not specified by any standard per-se, however it breaks too | 473 | /* Not specified by any standard per-se, however it breaks too |