Re: [Touch-packages] [Bug 1501189] [NEW] Don't put 127.0.0.1 in resolvconf when port=0

2015-10-05 Thread Simon Kelley
I'm sympathetic to aim, but this solution is rather fragile, there are
plenty of ways to get dnsmasq to read configuration from places other
than /etc/dnsmasq.conf and /etc/dnsmasq.d/*, for instance adding

conf-file=/path/to/more/configuration

to the existing config files.

It's also possible to override things in /etc/default/dnsmasq.


A better solution might be to extend the IGNORE_RESOLVCONF setting in
/etc/default/dnsmasq so that it inhibits adding 127.0.0.1 to resolvconf,
as well as stopping dnsmasq from using the resolvconf output as upstream.

Simon.



On 30/09/15 07:38, Alkis Georgopoulos wrote:
> Public bug reported:
> 
> The following function is defined in /etc/init.d/dnsmasq:
> 
> start_resolvconf()
> {
> # If interface "lo" is explicitly disabled in /etc/default/dnsmasq
> # Then dnsmasq won't be providing local DNS, so don't add it to
> # the resolvconf server set.
> for interface in $DNSMASQ_EXCEPT
> do
> [ $interface = lo ] && return
> done
> 
> if [ -x /sbin/resolvconf ] ; then
> echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo.$NAME
> fi
> return 0
> }
> 
> When someone puts port=0 in dnsmasq.conf, because e.g. he wants to use it 
> only as a (proxy)DHCP/TFTP server,
> 127.0.0.1 is added to resolvconf, and DNS is broken because nothing listens 
> there.
> 
> One workaround is to put DNSMASQ_EXCEPT=lo in /etc/default/dnsmasq.
> But that doesn't make much sense, we don't want to exclude some interface, 
> we're not running a DNS server at all.
> 
> So it would be nice if dnsmasq checked if port=0 is defined in its
> configuration, and didn't add 127.0.0.1 to resolvconf then.
> 
> Sample implementation code, to be inserted before `if [ -x /sbin/resolvconf 
> ]`:
> grep -qr port=0 /etc/dnsmasq.d/ /etc/dnsmasq.conf && return
> 
> ** Affects: dnsmasq (Ubuntu)
>  Importance: Undecided
>  Status: New
> 
> 
> ** Tags: patch
>

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to dnsmasq in Ubuntu.
https://bugs.launchpad.net/bugs/1501189

Title:
  Don't put 127.0.0.1 in resolvconf when port=0

Status in dnsmasq package in Ubuntu:
  New

Bug description:
  The following function is defined in /etc/init.d/dnsmasq:

  start_resolvconf()
  {
  # If interface "lo" is explicitly disabled in /etc/default/dnsmasq
  # Then dnsmasq won't be providing local DNS, so don't add it to
  # the resolvconf server set.
  for interface in $DNSMASQ_EXCEPT
  do
  [ $interface = lo ] && return
  done

  if [ -x /sbin/resolvconf ] ; then
  echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo.$NAME
  fi
  return 0
  }

  When someone puts port=0 in dnsmasq.conf, because e.g. he wants to use it 
only as a (proxy)DHCP/TFTP server,
  127.0.0.1 is added to resolvconf, and DNS is broken because nothing listens 
there.

  One workaround is to put DNSMASQ_EXCEPT=lo in /etc/default/dnsmasq.
  But that doesn't make much sense, we don't want to exclude some interface, 
we're not running a DNS server at all.

  So it would be nice if dnsmasq checked if port=0 is defined in its
  configuration, and didn't add 127.0.0.1 to resolvconf then.

  Sample implementation code, to be inserted before `if [ -x /sbin/resolvconf 
]`:
  grep -qr port=0 /etc/dnsmasq.d/ /etc/dnsmasq.conf && return

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/1501189/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1501189] [NEW] Don't put 127.0.0.1 in resolvconf when port=0

2015-09-29 Thread Alkis Georgopoulos
Public bug reported:

The following function is defined in /etc/init.d/dnsmasq:

start_resolvconf()
{
# If interface "lo" is explicitly disabled in /etc/default/dnsmasq
# Then dnsmasq won't be providing local DNS, so don't add it to
# the resolvconf server set.
for interface in $DNSMASQ_EXCEPT
do
[ $interface = lo ] && return
done

if [ -x /sbin/resolvconf ] ; then
echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo.$NAME
fi
return 0
}

When someone puts port=0 in dnsmasq.conf, because e.g. he wants to use it only 
as a (proxy)DHCP/TFTP server,
127.0.0.1 is added to resolvconf, and DNS is broken because nothing listens 
there.

One workaround is to put DNSMASQ_EXCEPT=lo in /etc/default/dnsmasq.
But that doesn't make much sense, we don't want to exclude some interface, 
we're not running a DNS server at all.

So it would be nice if dnsmasq checked if port=0 is defined in its
configuration, and didn't add 127.0.0.1 to resolvconf then.

Sample implementation code, to be inserted before `if [ -x /sbin/resolvconf ]`:
grep -qr port=0 /etc/dnsmasq.d/ /etc/dnsmasq.conf && return

** Affects: dnsmasq (Ubuntu)
 Importance: Undecided
 Status: New


** Tags: patch

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to dnsmasq in Ubuntu.
https://bugs.launchpad.net/bugs/1501189

Title:
  Don't put 127.0.0.1 in resolvconf when port=0

Status in dnsmasq package in Ubuntu:
  New

Bug description:
  The following function is defined in /etc/init.d/dnsmasq:

  start_resolvconf()
  {
  # If interface "lo" is explicitly disabled in /etc/default/dnsmasq
  # Then dnsmasq won't be providing local DNS, so don't add it to
  # the resolvconf server set.
  for interface in $DNSMASQ_EXCEPT
  do
  [ $interface = lo ] && return
  done

  if [ -x /sbin/resolvconf ] ; then
  echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo.$NAME
  fi
  return 0
  }

  When someone puts port=0 in dnsmasq.conf, because e.g. he wants to use it 
only as a (proxy)DHCP/TFTP server,
  127.0.0.1 is added to resolvconf, and DNS is broken because nothing listens 
there.

  One workaround is to put DNSMASQ_EXCEPT=lo in /etc/default/dnsmasq.
  But that doesn't make much sense, we don't want to exclude some interface, 
we're not running a DNS server at all.

  So it would be nice if dnsmasq checked if port=0 is defined in its
  configuration, and didn't add 127.0.0.1 to resolvconf then.

  Sample implementation code, to be inserted before `if [ -x /sbin/resolvconf 
]`:
  grep -qr port=0 /etc/dnsmasq.d/ /etc/dnsmasq.conf && return

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/1501189/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp