Cleaned up address selection code for LAN and WAN plugins.
The LAN plugin only accepts IPv4 link-local or site-local addresses. This rules out LANs that use globally routable addresses (such as UCL), but also reduces the chances of the LAN plugin making observable connections across the WAN, which could reveal the social graph. Both plugins will attempt to reuse the previous address and port only if there's currently an interface with that address; this will avoid unnecessary attempts to bind to nonexistent addresses.
Showing
- briar-core/src/org/briarproject/plugins/tcp/LanTcpPlugin.java 25 additions, 32 deletions...r-core/src/org/briarproject/plugins/tcp/LanTcpPlugin.java
- briar-core/src/org/briarproject/plugins/tcp/WanTcpPlugin.java 26 additions, 23 deletions...r-core/src/org/briarproject/plugins/tcp/WanTcpPlugin.java
- briar-tests/src/org/briarproject/plugins/tcp/LanTcpPluginTest.java 10 additions, 7 deletions...ts/src/org/briarproject/plugins/tcp/LanTcpPluginTest.java
Loading
Please register or sign in to comment