Re: [Dnsmasq-discuss] dnsmasq does crash

2016-09-02 Thread e9hack
Am 31.08.2016 um 11:51 schrieb Kevin Darbyshire-Bryant:
> 
> On 30/08/16 23:08, Simon Kelley wrote:
>> Sorry about this. Putative fix pushed to git.
> 
> Looks good.  It doesn't go bang anymore on my system :-)

The same for me.

Regards,
Hartmut


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


Re: [Dnsmasq-discuss] dnsmasq does crash

2016-08-31 Thread Kevin Darbyshire-Bryant



On 30/08/16 23:08, Simon Kelley wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Sorry about this. Putative fix pushed to git.


Cheers,

Simon.



Looks good.  It doesn't go bang anymore on my system :-)

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


Re: [Dnsmasq-discuss] dnsmasq does crash

2016-08-30 Thread Simon Kelley
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Sorry about this. Putative fix pushed to git.


Cheers,

Simon.


On 30/08/16 19:47, e9hack wrote:
> Hi,
> 
> I did check it again. I did try to checkout
> e94ad0fa01ccc8d0c39e069ab29b008f9c811600 'Suppress useless warning
> about DHCP packets of interfaces without addresses'. But for some
> reason, I got all later changes too. Now I did patch the files
> manually. The crash is introduced by
> 2675f2061525bc954be14988d64384b74aa7bf8b 'Handle binding upstream
> servers to an interface (--server=1.2.3.4@eth0) when the named
> interface is destroyed and recreated in the kernel'.
> 
> Regards, Hartmut
> 
> Am 30.08.2016 um 12:19 schrieb Kevin Darbyshire-Bryant:
>> 
>> 
>> On 29/08/16 20:30, e9hack wrote:
>>> Hi,
>>> 
>>> I've trouble with this commit, independently that it looks
>>> simple:
>>> 
>>> Suppress useless warning about DHCP packets of interfaces
>>> without addresses.
>>> 
>>> Starting with this commit, dnsmasq does crash shortly after
>>> start:
>>> 
>>> Mon Aug 29 21:18:40 2016 kern.info kernel: [17587.489903] Mon
>>> Aug 29 21:18:40 2016 kern.info kernel: [17587.489903]
>>> do_page_fault(): sending SIGSEGV to dnsmasq for invalid write
>>> access to 0038 Mon Aug 29 21:18:40 2016 kern.info kernel:
>>> [17587.498607] epc = 00411eff in dnsmasq[40+2d000] Mon Aug
>>> 29 21:18:40 2016 kern.info kernel: [17587.503589] ra  =
>>> 00411ec7 in dnsmasq[40+2d000] Mon Aug 29 21:18:40 2016
>>> kern.info kernel: [17587.508587]
>>> 
>>> Regards, Hartmut
>> Get an identical error, didn't get as far as narrowing it to a
>> specific commit. Openwrt/LEDE has 'long' carried a (more
>> complicated) patch to suppress the message, attached for
>> reference.
>> 
>> Kevin
>> 
>> 
>> 
>> ___ 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
> 
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBCAAGBQJXxgPfAAoJEBXN2mrhkTWivPkP/jqWy7CrEUSNLeTtrf/LWDOU
HSW8uMaf7U0c53/Ipsys1c9ABw2jZpkDnaR/EDqFoMAeWYJTX5HWT7n1PCm3nqhg
D36yL5QPIM4C4RaVdm63BZVy6L6xD2bCxXwMMmxlCdwS8pcS1zEP9enyCvK7g8BK
Pr9iCEsx6b05HhtsXSmy03z0o5M3RYShspU5TZ6XkfN3wYn1RaJcQZLV4HXE9ZG7
EioxOqClyEjpzxD5ArH/U7KgJr/FVMti8pIzxli7QIz+bgaDzodqIF8Ukk6kCqFo
soEdqj0Uch24TRZMjyjxCJYU3nY5PqqCl0VdOQJXoAVTB4tgSaRSoNFjmogwoRQF
YQwe+beUIhqh3YiEDnXLJQNNRH96bX1g73vDVNghZZ9WhXDALsGMcVdadCJSFcis
snkJXM9dim8xv7+NwKcTB/0lomDxgH4cqGoRFz/Zx/SXPCddLA+GLIfs4A5M62Z0
W5XIPO/FLjoevwS5aHofL61G2AN6pKe5UehMcvxhTUP2ue06nLjmzy5JtZ4vO3q8
C0Q/E1XuEKC97LaiokNUnr4aRM6LUA8hnDvMgoJ2Se88Q1F2gQN70QHZhyzp2+lF
j5G46p7M0MmeQnuLNJHDOvGCr6Tp2ul2Kt//R+OwNU4AmK8RlZIk4YaIhJXJq2Z6
tt2wjpPde3PR1Tn7Spru
=UJhM
-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 does crash

2016-08-30 Thread Kevin Darbyshire-Bryant



On 29/08/16 20:30, e9hack wrote:

Hi,

I've trouble with this commit, independently that it looks simple:

Suppress useless warning about DHCP packets of interfaces without addresses.

Starting with this commit, dnsmasq does crash shortly after start:

Mon Aug 29 21:18:40 2016 kern.info kernel: [17587.489903]
Mon Aug 29 21:18:40 2016 kern.info kernel: [17587.489903] do_page_fault(): 
sending SIGSEGV
to dnsmasq for invalid write access to 0038
Mon Aug 29 21:18:40 2016 kern.info kernel: [17587.498607] epc = 00411eff in
dnsmasq[40+2d000]
Mon Aug 29 21:18:40 2016 kern.info kernel: [17587.503589] ra  = 00411ec7 in
dnsmasq[40+2d000]
Mon Aug 29 21:18:40 2016 kern.info kernel: [17587.508587]

Regards,
Hartmut
Get an identical error, didn't get as far as narrowing it to a specific 
commit.  Openwrt/LEDE has 'long' carried a (more complicated) patch to 
suppress the message, attached for reference.


Kevin

--- a/src/dhcp.c
+++ b/src/dhcp.c
@@ -147,7 +147,7 @@ void dhcp_packet(time_t now, int pxe_fd)
   ssize_t sz; 
   int iface_index = 0, unicast_dest = 0, is_inform = 0;
   int rcvd_iface_index;
-  struct in_addr iface_addr;
+  struct in_addr iface_addr, *addrp = NULL;
   struct iface_param parm;
 #ifdef HAVE_LINUX_NETWORK
   struct arpreq arp_req;
@@ -277,11 +277,9 @@ void dhcp_packet(time_t now, int pxe_fd)
 {
   ifr.ifr_addr.sa_family = AF_INET;
   if (ioctl(daemon->dhcpfd, SIOCGIFADDR, ) != -1 )
-	iface_addr = ((struct sockaddr_in *) _addr)->sin_addr;
-  else
 	{
-	  my_syslog(MS_DHCP | LOG_WARNING, _("DHCP packet received on %s which has no address"), ifr.ifr_name);
-	  return;
+	  addrp = _addr;
+	  iface_addr = ((struct sockaddr_in *) _addr)->sin_addr;
 	}
   
   for (tmp = daemon->dhcp_except; tmp; tmp = tmp->next)
@@ -300,7 +298,7 @@ void dhcp_packet(time_t now, int pxe_fd)
   parm.relay_local.s_addr = 0;
   parm.ind = iface_index;
   
-  if (!iface_check(AF_INET, (struct all_addr *)_addr, ifr.ifr_name, NULL))
+  if (!iface_check(AF_INET, (struct all_addr *)addrp, ifr.ifr_name, NULL))
 	{
 	  /* If we failed to match the primary address of the interface, see if we've got a --listen-address
 	 for a secondary */
@@ -320,6 +318,12 @@ void dhcp_packet(time_t now, int pxe_fd)
 	  complete_context(match.addr, iface_index, NULL, match.netmask, match.broadcast, );
 	}
   
+  if (!addrp)
+{
+  my_syslog(MS_DHCP | LOG_WARNING, _("DHCP packet received on %s which has no address"), ifr.ifr_name);
+  return;
+}
+
   if (!iface_enumerate(AF_INET, , complete_context))
 	return;
 
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


[Dnsmasq-discuss] dnsmasq does crash

2016-08-29 Thread e9hack
Hi,

I've trouble with this commit, independently that it looks simple:

Suppress useless warning about DHCP packets of interfaces without addresses.

Starting with this commit, dnsmasq does crash shortly after start:

Mon Aug 29 21:18:40 2016 kern.info kernel: [17587.489903]
Mon Aug 29 21:18:40 2016 kern.info kernel: [17587.489903] do_page_fault(): 
sending SIGSEGV
to dnsmasq for invalid write access to 0038
Mon Aug 29 21:18:40 2016 kern.info kernel: [17587.498607] epc = 00411eff in
dnsmasq[40+2d000]
Mon Aug 29 21:18:40 2016 kern.info kernel: [17587.503589] ra  = 00411ec7 in
dnsmasq[40+2d000]
Mon Aug 29 21:18:40 2016 kern.info kernel: [17587.508587]

Regards,
Hartmut


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


[Dnsmasq-discuss] dnsmasq does crash with segmentation fault

2013-01-20 Thread e9hack
Hi,

my windows 7 PC is connected with a WLAN card to my router. If my PC is 
connected to one
router, which doesn't run dnsmasq, it got an ipv4 address only. It's 
192.168.26.100. If I
disconnect the PC from this router an let it connect to the router with 
dnsmasq, it got
the address 192.168.25.2. It got the ipv4 gateway and dns address and dnsmasq 
dies with a
segmentation fault:

root@WLAN-DSL5:~ #dnsmasq --no-daemon -C /etc/dnsmasq.conf
dnsmasq: started, version v2.66test11 cachesize 200
dnsmasq: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP 
DHCPv6
no-scripts no-TFTP no-conntrack no-auth
dnsmasq-dhcp: DHCP, IP range 192.168.25.100 -- 192.168.25.150, lease time 2d
dnsmasq-dhcp: DHCPv6, IP range fec0:::0:0::100 -- 
fec0:::0:0::, lease
time 2d
dnsmasq: using local addresses only for domain lan
dnsmasq: reading /etc/resolv.conf
dnsmasq: using nameserver ...
dnsmasq: using nameserver ...
dnsmasq: using nameserver ...
dnsmasq: using nameserver ...
dnsmasq: using local addresses only for domain lan
dnsmasq: read /var/hosts - 24 addresses
dnsmasq-dhcp: duplicate IP address ... in dhcp-config directive
dnsmasq-dhcp: duplicate IP address ... in dhcp-config directive
dnsmasq-dhcp: duplicate IP address ... in dhcp-config directive
dnsmasq-dhcp: duplicate IP address ... in dhcp-config directive
dnsmasq-dhcp: duplicate IP address ... in dhcp-config directive
dnsmasq-dhcp: 14128106 available DHCP range: fec0:::0:0::100 --
fec0:::0:0::
dnsmasq-dhcp: 14128106 vendor class: 311
dnsmasq-dhcp: 14128106 DHCPINFORMATION-REQUEST(br0)
00:01:00:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx windows7-pc
dnsmasq-dhcp: 14128106 requested options: 24:domain-search, 23:dns-server, 
17:vendor-opts,
dnsmasq-dhcp: 14128106 requested options: 32:information-refresh-time
Segmentation fault
root@WLAN-DSL5:~ #

Regards,
Hartmut

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


Re: [Dnsmasq-discuss] dnsmasq does crash with segmentation fault

2013-01-20 Thread Simon Kelley

On 20/01/13 15:02, e9hack wrote:

Hi,

my windows 7 PC is connected with a WLAN card to my router. If my PC is 
connected to one
router, which doesn't run dnsmasq, it got an ipv4 address only. It's 
192.168.26.100. If I
disconnect the PC from this router an let it connect to the router with 
dnsmasq, it got
the address 192.168.25.2. It got the ipv4 gateway and dns address and dnsmasq 
dies with a
segmentation fault:

root@WLAN-DSL5:~ #dnsmasq --no-daemon -C /etc/dnsmasq.conf
dnsmasq: started, version v2.66test11 cachesize 200
dnsmasq: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP 
DHCPv6
no-scripts no-TFTP no-conntrack no-auth
dnsmasq-dhcp: DHCP, IP range 192.168.25.100 -- 192.168.25.150, lease time 2d
dnsmasq-dhcp: DHCPv6, IP range fec0:::0:0::100 -- 
fec0:::0:0::, lease
time 2d
dnsmasq: using local addresses only for domain lan
dnsmasq: reading /etc/resolv.conf
dnsmasq: using nameserver ...
dnsmasq: using nameserver ...
dnsmasq: using nameserver ...
dnsmasq: using nameserver ...
dnsmasq: using local addresses only for domain lan
dnsmasq: read /var/hosts - 24 addresses
dnsmasq-dhcp: duplicate IP address ... in dhcp-config directive
dnsmasq-dhcp: duplicate IP address ... in dhcp-config directive
dnsmasq-dhcp: duplicate IP address ... in dhcp-config directive
dnsmasq-dhcp: duplicate IP address ... in dhcp-config directive
dnsmasq-dhcp: duplicate IP address ... in dhcp-config directive
dnsmasq-dhcp: 14128106 available DHCP range: fec0:::0:0::100 --
fec0:::0:0::
dnsmasq-dhcp: 14128106 vendor class: 311
dnsmasq-dhcp: 14128106 DHCPINFORMATION-REQUEST(br0)
00:01:00:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx windows7-pc
dnsmasq-dhcp: 14128106 requested options: 24:domain-search, 23:dns-server, 
17:vendor-opts,
dnsmasq-dhcp: 14128106 requested options: 32:information-refresh-time
Segmentation fault
root@WLAN-DSL5:~ #

Regards,
Hartmut



By far the easiest way to solve this is to get a core-dump or debugger 
output?


What system are you running dnsmasq on? does it have gdb available?


Cheers,

Simon.

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