All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-networking][PATCH 1/2] dnsmasq: read the conf files found in dnsmasq.d
@ 2016-11-21 18:42 Mark Asselstine
  2016-11-21 18:42 ` [meta-networking][PATCH 2/2] dnsmasq: allow for dnsmasq instances to reuse default dnsmasq.conf Mark Asselstine
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Asselstine @ 2016-11-21 18:42 UTC (permalink / raw)
  To: openembedded-devel, joe_macdonald

The dnsmasq package installs a ${sysconfigdir}/dnsmasq.d directory but
doesn't currently use any configuration files that might be placed
there. This goes against what the user would expect and doesn't match
what you see in other distros.

We could ensure this config directory is read when dnsmasq is started,
as we are doing here, or by including it in the main dnsmasq.conf
file. By doing it here we can have better reuseability of the main
dnsmasq.conf file by other instances of dnsmasq.

There are currently no files added to the dnsmasq.d directory for core
oe images, so this should not result in any runtime behavior changes.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
---
 .../recipes-support/dnsmasq/files/dnsmasq-noresolvconf.service          | 2 +-
 .../recipes-support/dnsmasq/files/dnsmasq-resolvconf.service            | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta-networking/recipes-support/dnsmasq/files/dnsmasq-noresolvconf.service b/meta-networking/recipes-support/dnsmasq/files/dnsmasq-noresolvconf.service
index cde2244..32f8e59 100644
--- a/meta-networking/recipes-support/dnsmasq/files/dnsmasq-noresolvconf.service
+++ b/meta-networking/recipes-support/dnsmasq/files/dnsmasq-noresolvconf.service
@@ -6,7 +6,7 @@ After=network.target
 Type=forking
 PIDFile=/run/dnsmasq.pid
 ExecStartPre=/usr/bin/dnsmasq --test
-ExecStart=/usr/bin/dnsmasq -x /run/dnsmasq.pid
+ExecStart=/usr/bin/dnsmasq -x /run/dnsmasq.pid -7 /etc/dnsmasq.d
 ExecStop=/bin/kill $MAINPID
 ExecReload=/bin/kill -HUP $MAINPID
 
diff --git a/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolvconf.service b/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolvconf.service
index 68b175c..07b4817 100644
--- a/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolvconf.service
+++ b/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolvconf.service
@@ -6,7 +6,7 @@ After=network.target
 Type=forking
 PIDFile=/run/dnsmasq.pid
 ExecStartPre=/usr/bin/dnsmasq --test
-ExecStart=/usr/bin/dnsmasq -x /run/dnsmasq.pid
+ExecStart=/usr/bin/dnsmasq -x /run/dnsmasq.pid -7 /etc/dnsmasq.d
 ExecStartPost=/usr/bin/dnsmasq-resolvconf-helper start
 ExecStopPre=/usr/bin/dnsmasq-resolvconf-helper stop
 ExecStop=/bin/kill $MAINPID
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [meta-networking][PATCH 2/2] dnsmasq: allow for dnsmasq instances to reuse default dnsmasq.conf
  2016-11-21 18:42 [meta-networking][PATCH 1/2] dnsmasq: read the conf files found in dnsmasq.d Mark Asselstine
@ 2016-11-21 18:42 ` Mark Asselstine
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Asselstine @ 2016-11-21 18:42 UTC (permalink / raw)
  To: openembedded-devel, joe_macdonald

By defining 'listen-address' in the global dnsmasq.conf file we
prevent other instances of dnsmasq from using the global config as we
will get an error that the address is already in use. Instead we pass
'local-service' when we start the main dnsmasq instance which will
listen on the loopback address as well as any other local
subnets. This will allow the main dnsmasq instance to play nice with
other instances we might start for network-manager, libvirt, lxc...

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
---
 .../recipes-support/dnsmasq/files/dnsmasq-noresolvconf.service          | 2 +-
 .../recipes-support/dnsmasq/files/dnsmasq-resolvconf.service            | 2 +-
 meta-networking/recipes-support/dnsmasq/files/dnsmasq.conf              | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta-networking/recipes-support/dnsmasq/files/dnsmasq-noresolvconf.service b/meta-networking/recipes-support/dnsmasq/files/dnsmasq-noresolvconf.service
index 32f8e59..0c64fab 100644
--- a/meta-networking/recipes-support/dnsmasq/files/dnsmasq-noresolvconf.service
+++ b/meta-networking/recipes-support/dnsmasq/files/dnsmasq-noresolvconf.service
@@ -6,7 +6,7 @@ After=network.target
 Type=forking
 PIDFile=/run/dnsmasq.pid
 ExecStartPre=/usr/bin/dnsmasq --test
-ExecStart=/usr/bin/dnsmasq -x /run/dnsmasq.pid -7 /etc/dnsmasq.d
+ExecStart=/usr/bin/dnsmasq -x /run/dnsmasq.pid -7 /etc/dnsmasq.d --local-service
 ExecStop=/bin/kill $MAINPID
 ExecReload=/bin/kill -HUP $MAINPID
 
diff --git a/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolvconf.service b/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolvconf.service
index 07b4817..2980f7d 100644
--- a/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolvconf.service
+++ b/meta-networking/recipes-support/dnsmasq/files/dnsmasq-resolvconf.service
@@ -6,7 +6,7 @@ After=network.target
 Type=forking
 PIDFile=/run/dnsmasq.pid
 ExecStartPre=/usr/bin/dnsmasq --test
-ExecStart=/usr/bin/dnsmasq -x /run/dnsmasq.pid -7 /etc/dnsmasq.d
+ExecStart=/usr/bin/dnsmasq -x /run/dnsmasq.pid -7 /etc/dnsmasq.d --local-service
 ExecStartPost=/usr/bin/dnsmasq-resolvconf-helper start
 ExecStopPre=/usr/bin/dnsmasq-resolvconf-helper stop
 ExecStop=/bin/kill $MAINPID
diff --git a/meta-networking/recipes-support/dnsmasq/files/dnsmasq.conf b/meta-networking/recipes-support/dnsmasq/files/dnsmasq.conf
index bd0ee00..34d5135 100755
--- a/meta-networking/recipes-support/dnsmasq/files/dnsmasq.conf
+++ b/meta-networking/recipes-support/dnsmasq/files/dnsmasq.conf
@@ -77,7 +77,7 @@ bogus-priv
 #except-interface=
 # Or which to listen on by address (remember to include 127.0.0.1 if
 # you use this.)
-listen-address=127.0.0.1
+#listen-address=127.0.0.1
 
 # On systems which support it, dnsmasq binds the wildcard address,
 # even when it is listening on only some interfaces. It then discards
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-21 18:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-21 18:42 [meta-networking][PATCH 1/2] dnsmasq: read the conf files found in dnsmasq.d Mark Asselstine
2016-11-21 18:42 ` [meta-networking][PATCH 2/2] dnsmasq: allow for dnsmasq instances to reuse default dnsmasq.conf Mark Asselstine

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.