提交 84b07c16 编写于 作者: A Allan Stephens 提交者: David S. Miller

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: NAllan Stephens <allan.stephens@windriver.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e83728c7
...@@ -842,13 +842,10 @@ static void port_dispatcher_sigh(void *dummy) ...@@ -842,13 +842,10 @@ static void port_dispatcher_sigh(void *dummy)
tipc_port_unlock(p_ptr); tipc_port_unlock(p_ptr);
if (unlikely(!connected)) { if (unlikely(!connected)) {
if (unlikely(published)) if (tipc_connect2port(dref, &orig))
goto reject; goto reject;
tipc_connect2port(dref,&orig); } else if ((msg_origport(msg) != peer_port) ||
} (msg_orignode(msg) != peer_node))
if (unlikely(msg_origport(msg) != peer_port))
goto reject;
if (unlikely(msg_orignode(msg) != peer_node))
goto reject; goto reject;
if (unlikely(!cb)) if (unlikely(!cb))
goto reject; goto reject;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册