Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 254681
b: refs/heads/master
c: c349a52
h: refs/heads/master
i:
  254679: 121852a
v: v3
  • Loading branch information
Marcus Meissner authored and David S. Miller committed Jul 5, 2011
1 parent 5deec82 commit 81a8e21
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2fb83cd618be34546fb526a9051eceaa95517026
refs/heads/master: c349a528cd47e2272ded0ea358363855e86180da
4 changes: 3 additions & 1 deletion trunk/net/ipv4/af_inet.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,10 @@ int inet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
if (addr_len < sizeof(struct sockaddr_in))
goto out;

if (addr->sin_family != AF_INET)
if (addr->sin_family != AF_INET) {
err = -EAFNOSUPPORT;
goto out;
}

chk_addr_ret = inet_addr_type(sock_net(sk), addr->sin_addr.s_addr);

Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv6/af_inet6.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
return -EINVAL;

if (addr->sin6_family != AF_INET6)
return -EINVAL;
return -EAFNOSUPPORT;

addr_type = ipv6_addr_type(&addr->sin6_addr);
if ((addr_type & IPV6_ADDR_MULTICAST) && sock->type == SOCK_STREAM)
Expand Down

0 comments on commit 81a8e21

Please sign in to comment.