Introduce new --local-service=host parameter
authorPetr Menšík <pemensik@redhat.com>
Tue, 5 Oct 2021 11:46:51 +0000 (13:46 +0200)
committerSimon Kelley <simon@thekelleys.org.uk>
Sat, 13 Jan 2024 22:11:22 +0000 (22:11 +0000)
commit2748d4e901193c919614276e42d6d54b11f3232d
treed4efaa9d80eafbee5229fa55bba6b28b3ccec98a
parent63ba726e1f8d1ac53db260110657bc82539b2d97
Introduce new --local-service=host parameter

Similar to local-service, but more strict. Listen only on localhost
unless other interface is specified. Has no effect when interface is
provided explicitly. I had multiple bugs fillen on Fedora, because I have
changed default configuration to:

interface=lo
bind-interfaces

People just adding configuration parts to /etc/dnsmasq.d or appending to
existing configuration often fail to see some defaults are already there.
Give them auto-ignored configuration as smart default.

Signed-off-by: Petr Menšík <pemensik@redhat.com>
Do not add a new parameter on command line. Instead add just parameter
for behaviour modification of existing local-service option. Now it
accepts two optional values:
- net: exactly the same as before
- host: bind only to lo interface, do not listen on any other addresses
  than loopback.
man/dnsmasq.8
src/dnsmasq.c
src/dnsmasq.h
src/option.c