bebbe6c7d0
Signed-off-by: Tomas Hozza <thozza@redhat.com>
38 lines
1.1 KiB
Diff
38 lines
1.1 KiB
Diff
From c2845b1f4047c7441bae46c8651ab6a6df9d832c Mon Sep 17 00:00:00 2001
|
|
From: Tomas Hozza <thozza@redhat.com>
|
|
Date: Fri, 15 Mar 2013 10:55:55 +0100
|
|
Subject: [PATCH] Allocate dhcp_buff-ers also if deamon->ra_contexts
|
|
|
|
Allocate dhcp_buff and prevent SIGSEGV.
|
|
|
|
Signed-off-by: Tomas Hozza <thozza@redhat.com>
|
|
---
|
|
dnsmasq-2.65/src/dnsmasq.c | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/dnsmasq-2.65/src/dnsmasq.c b/dnsmasq-2.65/src/dnsmasq.c
|
|
index 02055e9..d61810b 100644
|
|
--- a/dnsmasq-2.65/src/dnsmasq.c
|
|
+++ b/dnsmasq-2.65/src/dnsmasq.c
|
|
@@ -152,13 +152,16 @@ int main (int argc, char **argv)
|
|
now = dnsmasq_time();
|
|
|
|
#ifdef HAVE_DHCP
|
|
- if (daemon->dhcp || daemon->dhcp6)
|
|
+ if (daemon->dhcp || daemon->dhcp6 || daemon->ra_contexts)
|
|
{
|
|
/* Note that order matters here, we must call lease_init before
|
|
creating any file descriptors which shouldn't be leaked
|
|
to the lease-script init process. We need to call common_init
|
|
before lease_init to allocate buffers it uses.*/
|
|
dhcp_common_init();
|
|
+ }
|
|
+ if (daemon->dhcp || daemon->dhcp6)
|
|
+ {
|
|
lease_init(now);
|
|
|
|
if (daemon->dhcp)
|
|
--
|
|
1.8.1.4
|
|
|