Skip to content

Commit

Permalink
tipc: Fix bug in connection setup via native API
Browse files Browse the repository at this point in the history
This patch fixes a bug that prevented TIPC from receiving a
connection setup request message on a native TIPC port.
The revised connection setup logic ensures that validation
of the source of a connection-based message is skipped if
the port is not yet connected to a peer.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Allan Stephens authored and David S. Miller committed Jun 5, 2008
1 parent e83728c commit 84b07c1
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions net/tipc/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -842,13 +842,10 @@ static void port_dispatcher_sigh(void *dummy)

tipc_port_unlock(p_ptr);
if (unlikely(!connected)) {
if (unlikely(published))
if (tipc_connect2port(dref, &orig))
goto reject;
tipc_connect2port(dref,&orig);
}
if (unlikely(msg_origport(msg) != peer_port))
goto reject;
if (unlikely(msg_orignode(msg) != peer_node))
} else if ((msg_origport(msg) != peer_port) ||
(msg_orignode(msg) != peer_node))
goto reject;
if (unlikely(!cb))
goto reject;
Expand Down

0 comments on commit 84b07c1

Please sign in to comment.