magnetico
magnetico copied to clipboard
Magneticod attempts to send messages to localhost
I'm getting a bunch of these errors out of magneticod
, both on a build from Git and from the latest release, all coming from here: Could NOT write an UDP packet! {"error": "invalid argument"}
I'm running this on Debian 9 with kernel 4.18.5.
After adding some logging, it appears that magneticod
is attempting to send messages to the host I'm running it on. Every time I see these messages, the address is an IPv4 address corresponding to one of the addresses assigned to the machine it's running on (it has a bunch of them).
I'm not sure how to address this however.
Actually, in terms of addressing it, what about an in-memory blacklist on the transport, to which we add any address that has resulted in EINVAL
in the past?
This seems tricky. Magneticod communicates with a lot of different peers, and usually a few time per day. So this could be a waste of memory. I don't know if my thoughts are real…
There shouldn't be many peers in this list, so far it's only done this for the addresses of the machine it's running on, of which there are 16ish. Resource usage will be negligible.
I'd even say that it'd be good to have ability to define a list of restricted addresses/subnets.
For example, Hetzner sent me a warning once because magneticod was trying to make requests to machines in the internal network. We can't rely on data from DHT, so being able to filter would be good.