magnetico icon indicating copy to clipboard operation
magnetico copied to clipboard

Magneticod attempts to send messages to localhost

Open bobobo1618 opened this issue 6 years ago • 4 comments

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.

bobobo1618 avatar Jan 15 '19 11:01 bobobo1618

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?

bobobo1618 avatar Jan 15 '19 11:01 bobobo1618

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…

Glandos avatar Jan 15 '19 13:01 Glandos

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.

bobobo1618 avatar Jan 15 '19 13:01 bobobo1618

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.

skobkin avatar Dec 20 '20 01:12 skobkin