markqvist / Reticulum

The cryptography-based networking stack for building unstoppable networks with LoRa, Packet Radio, WiFi and everything in between.
https://reticulum.network
MIT License
2k stars 124 forks source link

AutoInterface discovery packets received by self #239

Closed gdt closed 1 year ago

gdt commented 1 year ago

Discovery packets from oneself are received. This is a minor efficiency bug. I think the cause is that there's a new socket for TX, rather than them being sent on the listening socket. (It's also a minor efficiency bug to create and tear down a socket every second.)

It seems this is only noticeable because the transmit hash is wrong on NetBSD.

markqvist commented 1 year ago

This is intentional, AutoInterface uses these multicast "echoes" to asess link state, and to detect when to recover on link state changes, WiFi roaming and such. In some edge cases where adapters change MAC addresses on every reconnect, this behaviour is necessary.