Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263933
b: refs/heads/master
c: 29c486d
h: refs/heads/master
i:
  263931: 0244a71
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Aug 30, 2011
1 parent 947f2cc commit 45bc9a6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 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: 785824165508a65478474f0c87f6b8c3ad048c62
refs/heads/master: 29c486df6a208432b370bd4be99ae1369ede28d8
7 changes: 6 additions & 1 deletion trunk/net/ipv4/af_inet.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,13 @@ int inet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
goto out;

if (addr->sin_family != AF_INET) {
/* Compatibility games : accept AF_UNSPEC (mapped to AF_INET)
* only if s_addr is INADDR_ANY.
*/
err = -EAFNOSUPPORT;
goto out;
if (addr->sin_family != AF_UNSPEC ||
addr->sin_addr.s_addr != htonl(INADDR_ANY))
goto out;
}

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

0 comments on commit 45bc9a6

Please sign in to comment.