On Wed, 10.06.15 11:17, Simon McVittie ([email protected]) wrote:
> On 10/06/15 03:18, Daurnimator wrote: > > example use case, I'm testing a client/server protocol: > > - the server is running locally; and because it shouldn't be exposed > > to the internet, it is bound to localhost. > > - I start the client and tell it to connect to $HOSTNAME > > Why wouldn't you tell the client to connect to localhost instead? > > (Relatedly, on my development laptop I have dnsmasq set up to resolve > [anything].localhost to 127.0.0.1, which means I can even use name-based > virtual hosting in local testing - maybe it would be worthwhile for > systemd-resolved and/or nss-myhostname to behave similarly?) This is actually already what happens. Here's the call that checks whether a hostname should be considered equivalent to "localhost": https://github.com/systemd/systemd/blob/master/src/shared/hostname-util.c#L129 Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
