tcp: correct tcp connection lookup condition