[Dnsmasq-discuss] Segfault when dhcp-lease-max reached
simon at thekelleys.org.uk
Thu Apr 11 14:09:01 BST 2013
On 11/04/13 12:56, Tsachi wrote:
> I am working with dnsmasq 2.61 and came across a potential issue:
> Connecting with a 3rd client when dhcp-lease-max is set to 2 (for example),
> causes dnsmasq to exit with segfault.
> Looking at the code, it seems that the lease_allocate might return a NULL
> pointer which then can be referenced in lease4_allocate.
> This code looks the same in v2.65
> struct dhcp_lease *lease_allocate(void)
> struct dhcp_lease *lease;
> if (!leases_left || !(lease = whine_malloc(sizeof(struct dhcp_lease))))
> return NULL;
> struct dhcp_lease *lease4_allocate(struct in_addr addr)
> struct dhcp_lease *lease = lease_allocate();
> lease->addr = addr;
Yes, a real bug, (and in lease6_allocate too). I've just committed the
fix and it will go into the imminent 2.66 release.
Thanks for the bug report.
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
More information about the Dnsmasq-discuss