diff options
author | Allan Stephens <allan.stephens@windriver.com> | 2008-06-05 02:28:21 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-06-05 02:28:21 +0200 |
commit | 84b07c1638c36ae937d4930b467001a0d22904e5 (patch) | |
tree | ec3d3cdb8ac7a8ba797aa05b163c7b328b7efd2f /net/tipc/port.c | |
parent | ns8320: use netdev_alloc_skb (diff) | |
download | linux-84b07c1638c36ae937d4930b467001a0d22904e5.tar.xz linux-84b07c1638c36ae937d4930b467001a0d22904e5.zip |
tipc: Fix bug in connection setup via native API
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>
Diffstat (limited to 'net/tipc/port.c')
-rw-r--r-- | net/tipc/port.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/net/tipc/port.c b/net/tipc/port.c index 2c64ad88e3cf..0bd3e6192c43 100644 --- a/net/tipc/port.c +++ b/net/tipc/port.c @@ -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; |