summaryrefslogtreecommitdiffstats
path: root/net/tipc/port.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/port.c')
-rw-r--r--net/tipc/port.c9
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;