conncheck: avoid transport association mismatch
authorFabrice Bellet <fabrice@bellet.info>
Fri, 12 Jul 2019 14:06:13 +0000 (14:06 +0000)
committerOlivier CrĂȘte <olivier.crete@ocrete.ca>
Fri, 12 Jul 2019 14:06:13 +0000 (14:06 +0000)
commit85a5c0a053aa32d987558803653de905c523cf9f
treee08fbb80467b6774b41c4b75e254644ad792763a
parentbd4b47813844aa0e68e9074b3ac516c383ca8bab
conncheck: avoid transport association mismatch

In some rare cases, the same address and port number may match two
remotes candidates, a tcp and an udp one, and lead to buggy pair
construction with incompatible transport. This supplementary check
prevents this problem. The matching test is not aimed to be exhaustive
but just a way to discard obviously broken associations, and fallback to
accept everything else (because socket type has a great diversity, with
socket types based on other sockets types).

It should fix #81, where such bogus transport association has been
reported (tcp-pass:udp).
agent/conncheck.c