Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122098
b: refs/heads/master
c: 04f258c
h: refs/heads/master
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Nov 23, 2008
1 parent 23c8474 commit a9bf2c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 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: c46920dadba65856eb1a1f1ffa1b350875db1228
refs/heads/master: 04f258ce7f085dd69422fa01d41c8f0194a0e270
9 changes: 4 additions & 5 deletions trunk/net/ipv4/af_inet.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ static inline int inet_netns_ok(struct net *net, int protocol)
int hash;
struct net_protocol *ipprot;

if (net == &init_net)
if (net_eq(net, &init_net))
return 1;

hash = protocol & (MAX_INET_PROTOS - 1);
Expand All @@ -272,10 +272,9 @@ static int inet_create(struct net *net, struct socket *sock, int protocol)
int try_loading_module = 0;
int err;

if (sock->type != SOCK_RAW &&
sock->type != SOCK_DGRAM &&
!inet_ehash_secret)
build_ehash_secret();
if (unlikely(!inet_ehash_secret))
if (sock->type != SOCK_RAW && sock->type != SOCK_DGRAM)
build_ehash_secret();

sock->state = SS_UNCONNECTED;

Expand Down

0 comments on commit a9bf2c0

Please sign in to comment.