diff --git a/bramble-core/src/test/java/org/briarproject/bramble/plugin/tcp/LanTcpPluginTest.java b/bramble-core/src/test/java/org/briarproject/bramble/plugin/tcp/LanTcpPluginTest.java
index ecc41e28971e36d4a7a81f7f545a90667f6d93f3..ede3df810f2c646728e9f23715e5d53723d5e7b5 100644
--- a/bramble-core/src/test/java/org/briarproject/bramble/plugin/tcp/LanTcpPluginTest.java
+++ b/bramble-core/src/test/java/org/briarproject/bramble/plugin/tcp/LanTcpPluginTest.java
@@ -58,6 +58,9 @@ public class LanTcpPluginTest extends BrambleTestCase {
 		// Local and remote in 192.168.0.0/16 should return true
 		assertTrue(plugin.addressesAreOnSameLan(makeAddress(192, 168, 0, 0),
 				makeAddress(192, 168, 255, 255)));
+		// Local and remote in 169.254.0.0/16 (link-local) should return true
+		assertTrue(plugin.addressesAreOnSameLan(makeAddress(169, 254, 0, 0),
+				makeAddress(169, 254, 255, 255)));
 		// Local and remote in different recognised prefixes should return false
 		assertFalse(plugin.addressesAreOnSameLan(makeAddress(10, 0, 0, 0),
 				makeAddress(172, 31, 255, 255)));
@@ -304,6 +307,24 @@ public class LanTcpPluginTest extends BrambleTestCase {
 		assertEquals(0, comparator.compare(prefix10, prefix10));
 	}
 
+	@Test
+	public void testComparatorPrefersSiteLocalToLinkLocal() throws Exception {
+		Comparator<InetSocketAddress> comparator = new LanAddressComparator();
+		InetSocketAddress prefix192 = new InetSocketAddress("192.168.0.1", 0);
+		InetSocketAddress prefix172 = new InetSocketAddress("172.16.0.1", 0);
+		InetSocketAddress prefix10 = new InetSocketAddress("10.0.0.1", 0);
+		InetSocketAddress linkLocal = new InetSocketAddress("169.254.0.1", 0);
+
+		assertTrue(comparator.compare(prefix192, linkLocal) < 0);
+		assertTrue(comparator.compare(prefix172, linkLocal) < 0);
+		assertTrue(comparator.compare(prefix10, linkLocal) < 0);
+
+		assertTrue(comparator.compare(linkLocal, prefix192) > 0);
+		assertTrue(comparator.compare(linkLocal, prefix172) > 0);
+		assertTrue(comparator.compare(linkLocal, prefix10) > 0);
+		assertEquals(0, comparator.compare(linkLocal, linkLocal));
+	}
+
 	private boolean systemHasLocalIpv4Address() throws Exception {
 		for (NetworkInterface i : Collections.list(
 				NetworkInterface.getNetworkInterfaces())) {