Re: [Dnsmasq-discuss] view running config

2015-07-05 Thread Simon Kelley
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Whenever the config is updated via DBus, the complete set of upstream
servers is logged, I think.

Cheers,

Simon.


On 22/06/15 14:34, CircleCode wrote:
 Hi,
 
 with dbus interface enabled, the config dnsmasq runs with is
 something like dynamic.
 
 is there a way to see its current dns config at some time during
 its execution?
 
 
 
 ___ Dnsmasq-discuss
 mailing list Dnsmasq-discuss@lists.thekelleys.org.uk 
 http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQIcBAEBCAAGBQJVmWV1AAoJEBXN2mrhkTWiZkQP/AvzndXNlZyS6PWbsUvvJMiy
RrxP6cvuM0h/wLa9x7Fjs1BZV1xbjg4As721wkbUeLTKDszUzAWeqmN8FFRyAzN0
C+5bo3AmKZxEdqwygDzWovHYcBVhSmuanhY6FqBPwj5YBs7L+x3zsi2YKohmpVtN
o5ZoRkL0CDGKYkp7hf/JTNu4Ys7H/7dbR9eDgs1QXAxx0tOuRbh4I+ovyCymLceD
fcdStMuqBtoZsnb6F1UIfs/J3beAkAMbyB0cR4+83gbi+gXgaaBPPpmK1hyCSTb9
wCs42wbRTy2J0T7Wpr3WOBhzemZ30oEXK96hgobocS2C8XM1u/oeup/DDHhsf3YA
y+F48L8mpTcBCUgHvMSuEvhwJx+dHjvlZ7dlYpP9a9433SaNMCCsAR6ZCobzVel7
IXl3hOSObT5/U19MpbyyJ+VDhMSVx9PqjQNdY1qYUWFgIraIe0DWPtbaSIKEmlTz
TRxY0ZYQs9vR3n4rMlTJ+k8hCFHe9qIc93kFQglqpCpVahpnv+98gqPGn4BVfFgk
o6TQ9sU0xvUzdf7DmCq+3Sovbna5twklI7P2M440Qp7PQ2C2fvtz569hEABO2mUG
SjREJi1zMAuVc6QioZ6rn1M1nNWJZ58TvYBTFpwXKSy+bR1Uwy0v0Y5XBLh/uLCZ
m84e38WwViUVuulHwDL0
=fjgI
-END PGP SIGNATURE-

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] DNSMASQ log output format

2015-07-05 Thread Simon Kelley
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

If you have the latest release, 2.73 then

- --log-queries=extra

Will enchance the logging format in a way which makes it easier to
link requests and replies.


Cheers,

Simon.


On 28/06/15 12:54, ma...@manfbraun.de wrote:
 Hello !
 
 I am just trying to understand how my VPN and my iptables work
 together. In this process, I missed, that dnsmasq shows me to whom
 a reply or config logentry would be send - there are too many
 concurrently.
 
 If dnsmasq would log the requestor address in each following line,
 this would be a big help. There is currently no chance to change
 the logformat.
 
 Just my notes.
 
 Thanks anyway and best regards,
 
 Manfred
 
 
 
 
 
 
 ___ Dnsmasq-discuss
 mailing list Dnsmasq-discuss@lists.thekelleys.org.uk 
 http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQIcBAEBCAAGBQJVmWawAAoJEBXN2mrhkTWiRUgP/jk8IO2ZjXYhBUhlrO/7MyZm
F8nfFbQWatUkobzbmnkg6w5XdnoV5j9zwa9IIBfsQLlvv5PMBBDekTMHyyrjPeQc
ZQ7x5S28/3Cp/EAgkiKFszynvImrNhrCKRoIi5bh9kxByfJOQEuFhbXs7RSD1tWP
wYqTXj9mlKG6w0XZ63HkHUSoXZyiezHQZKqwj5wzqf8v7iLZY8yqwMM9zdYvAce5
T5rqdnt8mLKO/7wzL288Sk7V1GfcN7CTt+OJreNA6sR9aBPam21zAPEOKbb210iJ
pFEqriAu9+5JkXX0uwB4Bg9z1qkYFDVuKowN8ys2Wqa8ONP8nbzk3jojSwZHDp2T
bZN8z+dsPxIAOeNBw/ukZAAal8sgaa9+lQ7emb26D7DfEhSGnWe0JfYlolAJwMlF
ETzi3i+50FBluHfEU0AgVzBt9tdxrMxk6tVc1Mo3BPOvJi9mNsSgoVoaLmlXDhN+
RR5aTSE6QmaqIrsvkNzfeTJja2sR06a0bsGi16GEmkucolHBEj1Eh3wrvs5BtmJg
NFNmG6D529lU1soFI3DIMGu8aaMJJaqkvJGHT+E50sYYV5lwIU/Azk0wMrXUHLhi
fhftwe57d7gFZcMSlGW/FrPYpGoEhWfWidLHD/MKUGJwCYO7hJd9f/SlbPKpYMjL
rPpDlM5vTN9m5mKIvvQx
=+xEY
-END PGP SIGNATURE-

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] dnsmasq segfault

2015-07-05 Thread R
I have fixed the problem by including

Requires=systemd-resolved.service
After=systemd-resolved.service

in the systemd service file for dnsmasq and it now boots correctly.

On 5 July 2015 at 21:17, R bjorkeg...@gmail.com wrote:

 dnsmasq segfaults at boot and systemd fails to load the service. (
 http://sysv.se/journal.txt ) after the boot process systemd can start
 dnsmasq successfully through 'systemctl start dnsmasq' and everything works.

 This started happening after I switched from using netctl + dhcpcd to
 configure my interfaces to using systemd-networkd + systemd-resolved.

 I was able to reproduce the segfault after the system had started by
 stopping systemd-resolved. When systemd-resolved was stopped, 'systemctl
 start dnsmasq' again segfaulted.

 Starting systemd-resolved again, systemctl start dnsmasq worked without
 problems.

 I'm using dnsmasq - dnscrypt_proxy - opendns on latest Arch Linux fully
 updated as of the date of this message.

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


[Dnsmasq-discuss] dnsmasq segfault

2015-07-05 Thread R
dnsmasq segfaults at boot and systemd fails to load the service. (
http://sysv.se/journal.txt ) after the boot process systemd can start
dnsmasq successfully through 'systemctl start dnsmasq' and everything works.

This started happening after I switched from using netctl + dhcpcd to
configure my interfaces to using systemd-networkd + systemd-resolved.

I was able to reproduce the segfault after the system had started by
stopping systemd-resolved. When systemd-resolved was stopped, 'systemctl
start dnsmasq' again segfaulted.

Starting systemd-resolved again, systemctl start dnsmasq worked without
problems.

I'm using dnsmasq - dnscrypt_proxy - opendns on latest Arch Linux fully
updated as of the date of this message.
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] openvpn + dnsmasq

2015-07-05 Thread Anton Blau

Is this a bad question?

Am 21.06.2015 um 21:13 schrieb Anton Blau:

Hello,

please excuse my bad englisch. I am not a native speaker.

I run dnsmasq with openvpn on my Debian Router. After the upgrade to 
jessie dnsmasq crashes on the boot because the openvpn device isn´t up.


openvpn starts as /etc/rc5.d/S02openvpn and
dnsmasq starts as /etc/rc5.d/S03dnsmasq

In /var/log/syslog I got this error-message:

Jun 21 07:46:09 router dnsmasq[999]: dnsmasq: Konnte Empfangs-Socket 
für 192.168.10.1: Die angeforderte Adresse kann nicht zugewiesen 
werden nicht erzeugen
Jun 21 07:46:09 router dnsmasq[999]: Konnte Empfangs-Socket für 
192.168.10.1: Die angeforderte Adresse kann nicht zugewiesen werden 
nicht erzeugen

Jun 21 07:46:09 router dnsmasq[999]: Start fehlgeschlagen
Jun 21 07:46:09 router systemd[1]: dnsmasq.service: control process 
exited, code=exited status=2
Jun 21 07:46:09 router systemd[1]: Failed to start dnsmasq - A 
lightweight DHCP and caching DNS server.
Jun 21 07:46:09 router systemd[1]: Dependency failed for Host and 
Network Name Lookups.
Jun 21 07:46:09 router systemd[1]: Unit dnsmasq.service entered failed 
state.


How is it possible to check openvpn bevor starting dnsmasq?

Thank you!


Tony

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss



___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] Hang when system time is changed backwards

2015-07-05 Thread Simon Kelley
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Using monotonic time seems to be a bit of a portability nightmare, as
an alternative, I've added code to count the number of zero returns
from select(). The standard wait is three seconds, so once select()
has returned zero 12 times, the loop ends even if the result of
gettimeofday() doesn't end it. Unless the net is unfeasibly busy
(ending every select call with a received packet) then  that should
put a sensible limit of the waiting time.

Code in the git repo now, if you could test it.


Cheers,

Simon.

On 29/06/15 14:00, Jacob Siverskog wrote:
 Hi! It seems like dnsmasq may occasionally hang (=become
 unresponsive, unkillable with killall dnsmasq (-9 works), doesn't
 seem to answer on DHCP requests etc) if the system time is changed
 backwards.
 
 I ran strace on dnsmasq once when this happened: root@OD-11:~#
 strace -p 1645 -f -tt -s 1024 Process 1645 attached 12:12:08.502148
 select(18, [6 7 8 9 10 11 15 16 17], [], NULL, {0, 46327}) = 0
 (Timeout) 12:12:08.552953 gettimeofday({1435572728, 553933}, NULL)
 = 0 12:12:08.555642 select(18, [6 7 8 9 10 11 15 16 17], [], NULL,
 {0, 25}) = 0 (Timeout) 12:12:08.808748
 gettimeofday({1435572728, 809379}, NULL) = 0 12:12:08.810668
 select(18, [6 7 8 9 10 11 15 16 17], [], NULL, {0, 25}) = 0
 (Timeout) 12:12:09.063807 gettimeofday({1435572729, 65256}, NULL) =
 0 12:12:09.066343 select(18, [6 7 8 9 10 11 15 16 17], [], NULL,
 {0, 25}) = 0 (Timeout) 12:12:09.319034
 gettimeofday({1435572729, 320590}, NULL) = 0 12:12:09.321021
 select(18, [6 7 8 9 10 11 15 16 17], [], NULL, {0, 25}) = 0
 (Timeout)
 
 I grep:ed for select:s in the source code and my guess is that it's
 the icmp_ping() select loop in dnsmasq.c that gets confused.
 Perhaps monotonic time should be used in this for loop: for (now =
 start = dnsmasq_time(); difftime(now, start)  (float)PING_WAIT;)
 
 I manually set the time forward a few hours and dnsmasq released 
 immediately: root@SYSTEM:~# date -s 2015-06-29 14:14:56 Mon Jun
 29 14:14:56 CEST 2015 root@SYSTEM:~# Mon Jun 29 14:14:56 2015
 daemon.info dnsmasq-dhcp[1645]: DHCPDISCOVER(wlan0-work)
 8a:33:14:0f:3b:d8 Mon Jun 29 14:14:56 2015 daemon.info
 dnsmasq-dhcp[1645]: DHCPOFFER(wlan0-work) 192.168.7.146
 8a:33:14:0f:3b:d8
 
 I'm using dnsmasq 2.72.
 
 Thanks, Jacob
 
 
 
 ___ Dnsmasq-discuss
 mailing list Dnsmasq-discuss@lists.thekelleys.org.uk 
 http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQIcBAEBCAAGBQJVmaP4AAoJEBXN2mrhkTWiFVMP/2XP3OTf+f2PEKnb45Ttt8vH
FKULZKfoB6vzM9fhK1Y3FzeTrlfHdrtOpd2jazYF5QUOZbG7uywopHIPTQNJ77FV
TKqjU5a75naZF+UMz3DrkOyWc4hs6TXVs0E5WGDy8ZHN6NrgSij8JvBYm2pTIUwu
1vLD95xcCZgnROgKd6eo7SDARlYZ/k6gw51M/KE6kql0cE7oM1gtFDJ1JCOR0lf/
SIxO+fFfYkCrYfQQfvo0aKiBsnfa0EMeuTOFlDOyeiPYnW2+wdq3iv5L8ClsnX90
FXJTk1czJ7QKhpTPxKltkEtU/Uz9iQ7A8roA7Ex1ngjIHQ96XxR0f4RLbEyisJpt
s9aAjzqmdFP5Rpv8nH9cQsO870qq09OxfdGLNwGhMknCdVVl1+TNy4b6KrvdM5qZ
9CEQUeLi4yuXX9u/s46tBHTThMsYslGU+lImBx2IqBEz3wfxCchAkfzyLkugrWg2
YqB5/AEOLNI+jwvQvaH2O2LBEEszbJ2GELWKQY15xh+Ijt4HLyGxzlshkl2D4hSx
hctZ1K7Q/G9PD+zd5+wpCoyivct9NWCQn95AFbSWLfqCCN6ZhppSavWMiwk8vstw
dfa3EOVEyyR0BroeKEDfWZXa7p3OcqOULi3bEAdLG/uECPeiuMH8js19P73u+rAa
ODmCRJrDNbZk8KVHHtYr
=83S5
-END PGP SIGNATURE-

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] openvpn + dnsmasq

2015-07-05 Thread Johannes Martin

Hi Anton,

it might have helped if the error messages weren't in German... ;-)

Debian Jessie is using systemd as init system. systemd does not always 
start legacy services (those described in /etc/init.d rather than 
/etc/init) in the order you would expect (for more details, see

https://utcc.utoronto.ca/~cks/space/blog/linux/SystemdAndSysVInitScripts).

So it is possible that in your setup systemd starts openvpn and dnsmasq in 
parallel or in the wrong order rather than in alphabetical sequence.


To fix this, you could either:
a) convert the SYSV init scripts to systemd init scripts.
b) add LSB standard comment blocks to the existing SYSV init scripts to 
declare the dependency between opendns and dnsmasq.


Hope this helps
Johannes

On Sun, 5 Jul 2015, Anton Blau wrote:


Is this a bad question?

Am 21.06.2015 um 21:13 schrieb Anton Blau:

Hello,

please excuse my bad englisch. I am not a native speaker.

I run dnsmasq with openvpn on my Debian Router. After the upgrade to jessie 
dnsmasq crashes on the boot because the openvpn device isn´t up.


openvpn starts as /etc/rc5.d/S02openvpn and
dnsmasq starts as /etc/rc5.d/S03dnsmasq

In /var/log/syslog I got this error-message:

Jun 21 07:46:09 router dnsmasq[999]: dnsmasq: Konnte Empfangs-Socket für 
192.168.10.1: Die angeforderte Adresse kann nicht zugewiesen werden nicht 
erzeugen
Jun 21 07:46:09 router dnsmasq[999]: Konnte Empfangs-Socket für 
192.168.10.1: Die angeforderte Adresse kann nicht zugewiesen werden nicht 
erzeugen

Jun 21 07:46:09 router dnsmasq[999]: Start fehlgeschlagen
Jun 21 07:46:09 router systemd[1]: dnsmasq.service: control process exited, 
code=exited status=2
Jun 21 07:46:09 router systemd[1]: Failed to start dnsmasq - A lightweight 
DHCP and caching DNS server.
Jun 21 07:46:09 router systemd[1]: Dependency failed for Host and Network 
Name Lookups.
Jun 21 07:46:09 router systemd[1]: Unit dnsmasq.service entered failed 
state.


How is it possible to check openvpn bevor starting dnsmasq?

Thank you!


Tony

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss



___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss




---

Mit zwei Euro im Monat helfen:
http://www.2-euro-helfen.de/
Help to fight hunger and injustice in our world:
http://www.devp.org/
http://www.oxfam.org/___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss