host address retrieving through assigned subnet information and broadcast message to learn host address

This commit is contained in:
Constantin Leue
2026-08-03 23:10:11 +02:00
parent 4671b34f5b
commit 4e94102861
4 changed files with 87 additions and 16 deletions
+18 -2
View File
@@ -189,8 +189,24 @@ void main() {
});
test(
'falls back to the default mLRS bridge IP when neither a host is '
'configured nor a gateway address is reported',
'uses the reported subnet broadcast address as initial peer when no '
'host is configured and no gateway address is reported',
() async {
final fake = FakeMlrsNetworkController();
final transport = await connectWithFake(
fake,
event: const MlrsNetworkAvailable(broadcastAddress: '192.168.4.255'),
);
expect(transport.peerDescription, startsWith('192.168.4.255'));
transport.dispose();
},
);
test(
'falls back to the default mLRS bridge IP when neither a host, a '
'gateway address, nor a broadcast address is reported',
() async {
final fake = FakeMlrsNetworkController();
final transport = await connectWithFake(fake);