Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 209281
b: refs/heads/master
c: 415cf32
h: refs/heads/master
i:
  209279: 7029db1
v: v3
  • Loading branch information
Tristan Ye authored and Joel Becker committed Aug 7, 2010
1 parent 91596ae commit e97ae3b
Show file tree
Hide file tree
Showing 2 changed files with 13 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: b11f1f1ab73fd358b1b734a9427744802202ba68
refs/heads/master: 415cf32c9cdfcc60f34d0ac17f29634e941ba7d2
17 changes: 12 additions & 5 deletions trunk/fs/ocfs2/cluster/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1759,6 +1759,7 @@ static int o2net_accept_one(struct socket *sock)
struct sockaddr_in sin;
struct socket *new_sock = NULL;
struct o2nm_node *node = NULL;
struct o2nm_node *local_node = NULL;
struct o2net_sock_container *sc = NULL;
struct o2net_node *nn;

Expand Down Expand Up @@ -1796,11 +1797,15 @@ static int o2net_accept_one(struct socket *sock)
goto out;
}

if (o2nm_this_node() > node->nd_num) {
mlog(ML_NOTICE, "unexpected connect attempted from a lower "
"numbered node '%s' at " "%pI4:%d with num %u\n",
node->nd_name, &sin.sin_addr.s_addr,
ntohs(sin.sin_port), node->nd_num);
if (o2nm_this_node() >= node->nd_num) {
local_node = o2nm_get_node_by_num(o2nm_this_node());
mlog(ML_NOTICE, "unexpected connect attempt seen at node '%s' ("
"%u, %pI4:%d) from node '%s' (%u, %pI4:%d)\n",
local_node->nd_name, local_node->nd_num,
&(local_node->nd_ipv4_address),
ntohs(local_node->nd_ipv4_port),
node->nd_name, node->nd_num, &sin.sin_addr.s_addr,
ntohs(sin.sin_port));
ret = -EINVAL;
goto out;
}
Expand Down Expand Up @@ -1857,6 +1862,8 @@ static int o2net_accept_one(struct socket *sock)
sock_release(new_sock);
if (node)
o2nm_node_put(node);
if (local_node)
o2nm_node_put(local_node);
if (sc)
sc_put(sc);
return ret;
Expand Down

0 comments on commit e97ae3b

Please sign in to comment.