Hi,

many thanks! - with the last two patches the build ran through.

But to be complete, two "warnings" still remain:

I'm using these options from IPFire GIT while building 'dnsmasq' (the latest
'lfs'-file and 'dnsmasq-Add-support-to-read-ISC-DHCP-lease-file.patch'
are attached, all other patches are *original* from 'thekelleys.org'):

***SNIP***
...
# We cannot use INOTIFY because our ISC reader code does not support that
COPTS      = -DHAVE_ISC_READER -DNO_INOTIFY
...

        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/043-Update_copyright_notices_Happy_new_year.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/044-Fix_FTBFS_when_scripts_excluded_at_compilation_time.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq-Add-support-to-read-ISC-DHCP-lease-file.patch

        cd $(DIR_APP) && sed -i src/config.h \
                -e 's|/\* #define HAVE_IDN \*/|#define HAVE_IDN|g' \
                -e 's|/\* #define HAVE_DNSSEC \*/|#define HAVE_DNSSEC|g' \
                -e 's|#define HAVE_DHCP|//#define HAVE_DHCP|g' \
                -e 's|#define HAVE_DHCP6|//#define HAVE_DHCP6|g' \
                -e 's|#define HAVE_TFTP|//#define HAVE_TFTP|g'

        cd $(DIR_APP) && make CFLAGS="$(CFLAGS)" COPTS="$(COPTS)" \
                PREFIX=/usr all install
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
***SNAP***

Build was finished, new version is running, but I'm still getting two
warnings during compilation whose importance or possible consequences
I can't rate:

***SNIP***
...
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-all 
--param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer 
-DHAVE_ISC_READER -DNO_INOTIFY  -DVERSION='"2.75"'            -c dnsmasq.c      
dnsmasq.c: In function 'main':
dnsmasq.c:55:7: warning: unused variable 'did_bind' [-Wunused-variable]
   int did_bind = 0;
       ^
dnsmasq.c:54:9: warning: unused variable 'bound_device' [-Wunused-variable]
   char *bound_device = NULL;
         ^
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-all 
--param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer 
-DHAVE_ISC_READER -DNO_INOTIFY  -DVERSION='"2.75"'            -c dhcp.c 
.
.
.
cc -O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC -fstack-protector-all 
--param=ssp-buffer-size=4 -march=i586 -mtune=generic -fomit-frame-pointer 
-DHAVE_ISC_READER -DNO_INOTIFY  -DVERSION='"2.75"'            -c isc.c  
isc.c: In function 'dhcp_lease_new':
isc.c:40:3: warning: ignoring return value of 'asprintf', declared with 
attribute warn_unused_result [-Wunused-result]
   asprintf(&lease->fqdn, "%s.%s", hostname, daemon->domain_suffix);
   ^
cc  -o dnsmasq cache.o rfc1035.o util.o option.o forward.o network.o dnsmasq.o 
dhcp.o lease.o rfc2131.o netlink.o dbus.o bpf.o helper.o tftp.o log.o 
conntrack.o dhcp6.o rfc3315.o dhcp-common.o outpacket.o radv.o slaac.o auth.o 
ipset.o domain.o dnssec.o blockdata.o tables.o loop.o inotify.o poll.o 
rrfilter.o edns0.o arp.o isc.o -lidn        -lnettle -lhogweed   -lgmp
make[2]: Leaving directory '/usr/src/dnsmasq-2.75/src'
...
***SNAP***

Furthermore from time to time we get several forum postings and mails
about sudden crashes and 'segmentation faults' of 'dnsmasq' as described
here from 'Rodolico' (Mail, developm...@lists.ipfire.org) or 'sideeffect
(IPFire Forum):

***SNIP***
'Rodolico':
"I just had it break on me. It lasted longer than the last time, but
dnsmasq just broke on me.

Basically, the same error message. This is dnsmasq_275_2015_12_24 which
I got from Matthias, I think.

Jan  3 01:25:43 dd-router kernel: dnsmasq[26066]: segfault at 0 ip
0805d4ae sp 5a8252d0 error 4 in dnsmasq[8048000+34000]
Jan  3 01:25:43 dd-router kernel: grsec: Segmentation fault occurred at
   (nil) in /usr/sbin/dnsmasq[dnsmasq:26066] uid/euid:99/99
gid/egid:40/40, parent /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0
Jan  3 01:25:43 dd-router kernel: grsec: bruteforce prevention initiated
due to crash of /usr/sbin/dnsmasq against uid 99, banning suid/sgid
execs for 15 minutes.  Please investigate the crash report for
/usr/sbin/dnsmasq[dnsmasq:26066] uid/euid:99/99 gid/egid:40/40, parent
/sbin/init[init:1] uid/euid:0/0 gid/egid:0/0

I'm guessing on my client machines I need to write an fcron job to check
it and bring it back up if it dies."

'sideeffect':
"Some web pages like ipfire forums taking ages to load.
I have to disable DNSSEC like in previous build.
All the problems go away with ENABLE_DNSSEC=0 in dnsmasq."
***SNAP***

Sorry, if this is a stupid question but since I'm not able to reproduce
these crashes and because we're trying to get a grip on this:

Could it be that those errors are related to the problems with seg faults
and DNSSEC sites?

Best,
Matthias

On 06.01.2016 20:39, Lonnie Abelbeck wrote:

On Jan 6, 2016, at 12:04 PM, Simon Kelley <si...@thekelleys.org.uk> wrote:

The do_script_run calls need to be removed from the compilation when
DHCP is not included. Since the scripting system used to just about
DHCP events, it was automatically removed from the compilation when
DHCP was removed. Now the script system handles tftp and (in the
latest code) ARP events, so it's no longer conditional on DHCP being
included. This is fall-out from that change.

Conditional combination has a nasty combinatorial explosion. I should
hack up a regression test to build all possible variants.

Fix pushed to git.

http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=blobdiff;f=src/dnsmasq.c;h=5cbfdbdf28cf1d03d95e50308107ee3225852c3b;hp=4ab56f1610750f16ef2afb86a369406f3aa906c3;hb=53a9173fc0b36d9427adb4ee9ac44df425717e84;hpb=d917275e481add809cd5c40650f339ae994ee35f

Simon, do_arp_script_run() does not have arguments, shouldn't ... ?

- while (do_arp_script_run(now));
+ while (do_arp_script_run());

Lonnie


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


--- a/src/cache.c       Wed Dec 16 19:24:12 2015
+++ b/src/cache.c       Wed Dec 16 19:37:37 2015
@@ -17,7 +17,7 @@
 #include "dnsmasq.h"
 
 static struct crec *cache_head = NULL, *cache_tail = NULL, **hash_table = NULL;
-#ifdef HAVE_DHCP
+#if (defined HAVE_DHCP) || (defined HAVE_ISC_READER)
 static struct crec *dhcp_spare = NULL;
 #endif
 static struct crec *new_chain = NULL;
@@ -217,6 +217,9 @@
       crecp->flags &= ~F_BIGNAME;
     }
 
+  if (crecp->flags & F_DHCP)
+    free(crecp->name.namep);
+
 #ifdef HAVE_DNSSEC
   cache_blockdata_free(crecp);
 #endif
@@ -1131,7 +1134,7 @@
   
 } 
 
-#ifdef HAVE_DHCP
+#if (defined HAVE_DHCP) || (defined HAVE_ISC_READER)
 struct in_addr a_record_from_hosts(char *name, time_t now)
 {
   struct crec *crecp = NULL;
@@ -1274,7 +1277,11 @@
       else
        crec->ttd = ttd;
       crec->addr.addr = *host_address;
+#ifdef HAVE_ISC_READER
+      crec->name.namep = strdup(host_name);
+#else
       crec->name.namep = host_name;
+#endif
       crec->uid = next_uid();
       cache_hash(crec);
 
--- a/src/dnsmasq.c     Thu Jul 30 20:59:06 2015
+++ b/src/dnsmasq.c     Wed Dec 16 19:38:32 2015
@@ -990,6 +990,11 @@
 
          poll_resolv(0, daemon->last_resolv != 0, now);          
          daemon->last_resolv = now;
+
+#ifdef HAVE_ISC_READER
+         if (daemon->lease_file && !daemon->dhcp)
+           load_dhcp(now);
+#endif
        }
 #endif
 
--- a/src/dnsmasq.h     Wed Dec 16 19:24:12 2015
+++ b/src/dnsmasq.h     Wed Dec 16 19:40:11 2015
@@ -1509,6 +1509,11 @@
 void poll_listen(int fd, short event);
 int do_poll(int timeout);
 
+/* isc.c */
+#ifdef HAVE_ISC_READER
+void load_dhcp(time_t now);
+#endif
+
 /* rrfilter.c */
 size_t rrfilter(struct dns_header *header, size_t plen, int mode);
 u16 *rrfilter_desc(int type);
 int expand_workspace(unsigned char ***wkspc, int *szp, int new);
-
--- /dev/null   Wed Dec 16 19:48:08 2015
+++ b/src/isc.c Wed Dec 16 19:41:35 2015
@@ -0,0 +1,251 @@
+/* dnsmasq is Copyright (c) 2014 John Volpe, Simon Kelley and
+     Michael Tremer
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; version 2 dated June, 1991, or
+  (at your option) version 3 dated 29 June, 2007.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+  Code in this file is based on contributions by John Volpe and
+  Simon Kelley. Updated for recent versions of dnsmasq by
+  Michael Tremer.
+*/
+
+#include "dnsmasq.h"
+
+#ifdef HAVE_ISC_READER
+#define MAXTOK 50
+
+struct isc_dhcp_lease {
+       char* name;
+       char* fqdn;
+       time_t expires;
+       struct in_addr addr;
+       struct isc_dhcp_lease* next;
+};
+
+static struct isc_dhcp_lease* dhcp_lease_new(const char* hostname) {
+       struct isc_dhcp_lease* lease = whine_malloc(sizeof(*lease));
+
+       lease->name = strdup(hostname);
+       if (daemon->domain_suffix) {
+               asprintf(&lease->fqdn, "%s.%s", hostname, 
daemon->domain_suffix);
+       }
+       lease->expires = 0;
+       lease->next = NULL;
+
+       return lease;
+}
+
+static void dhcp_lease_free(struct isc_dhcp_lease* lease) {
+       if (!lease)
+               return;
+
+       if (lease->name)
+               free(lease->name);
+       if (lease->fqdn)
+               free(lease->fqdn);
+       free(lease);
+}
+
+static int next_token(char* token, int buffsize, FILE* fp) {
+       int c, count = 0;
+       char* cp = token;
+
+       while ((c = getc(fp)) != EOF) {
+               if (c == '#') {
+                       do {
+                               c = getc(fp);
+                       } while (c != '\n' && c != EOF);
+               }
+
+               if (c == ' ' || c == '\t' || c == '\n' || c == ';') {
+                       if (count)
+                               break;
+               } else if ((c != '"') && (count < buffsize - 1)) {
+                       *cp++ = c;
+                       count++;
+               }
+       }
+
+       *cp = 0;
+       return count ? 1 : 0;
+}
+
+static long get_utc_offset() {
+       time_t t = time(NULL);
+       struct tm* time_struct = localtime(&t);
+
+       return time_struct->tm_gmtoff;
+}
+
+static time_t parse_lease_time(const char* token_date, const char* token_time) 
{
+       time_t time = (time_t)(-1);
+       struct tm lease_time;
+
+       if (sscanf(token_date, "%d/%d/%d", &lease_time.tm_year, 
&lease_time.tm_mon, &lease_time.tm_mday) == 3) {
+               lease_time.tm_year -= 1900;
+               lease_time.tm_mon -= 1;
+
+               if (sscanf(token_time, "%d:%d:%d", &lease_time.tm_hour, 
&lease_time.tm_min, &lease_time.tm_sec) == 3) {
+                       time = mktime(&lease_time) + get_utc_offset();
+               }
+       }
+
+       return time;
+}
+
+static struct isc_dhcp_lease* find_lease(const char* hostname, struct 
isc_dhcp_lease* leases) {
+       struct isc_dhcp_lease* lease = leases;
+
+       while (lease) {
+               if (strcmp(hostname, lease->name) == 0) {
+                       return lease;
+               }
+               lease = lease->next;
+       }
+
+       return NULL;
+}
+
+static off_t lease_file_size = (off_t)0;
+static ino_t lease_file_inode = (ino_t)0;
+
+void load_dhcp(time_t now) {
+       struct isc_dhcp_lease* leases = NULL;
+
+       struct stat statbuf;
+       if (stat(daemon->lease_file, &statbuf) == -1) {
+               return;
+       }
+
+       /* Do nothing if the lease file has not changed. */
+       if ((statbuf.st_size <= lease_file_size) && (statbuf.st_ino == 
lease_file_inode))
+               return;
+
+       lease_file_size = statbuf.st_size;
+       lease_file_inode = statbuf.st_ino;
+
+       FILE* fp = fopen(daemon->lease_file, "r");
+       if (!fp) {
+               my_syslog(LOG_ERR, _("failed to load %s:%s"), 
daemon->lease_file, strerror(errno));
+               return;
+       }
+
+       my_syslog(LOG_INFO, _("reading %s"), daemon->lease_file);
+
+       char* hostname = daemon->namebuff;
+       struct in_addr host_address;
+       time_t time_starts = -1;
+       time_t time_ends = -1;
+       int nomem;
+
+       char token[MAXTOK];
+       while ((next_token(token, MAXTOK, fp))) {
+               if (strcmp(token, "lease") == 0) {
+                       hostname[0] = '\0';
+
+                       if (next_token(token, MAXTOK, fp) && 
((host_address.s_addr = inet_addr(token)) != (in_addr_t)-1)) {
+                               if (next_token(token, MAXTOK, fp) && *token == 
'{') {
+                                       while (next_token(token, MAXTOK, fp) && 
*token != '}') {
+                                               if ((strcmp(token, 
"client-hostname") == 0) || (strcmp(token, "hostname") == 0)) {
+                                                       if 
(next_token(hostname, MAXDNAME, fp)) {
+                                                               if 
(!canonicalise(hostname, &nomem)) {
+                                                                       
*hostname = 0;
+                                                                       
my_syslog(LOG_ERR, _("bad name in %s"), daemon->lease_file);
+                                                               }
+                                                       }
+                                               } else if ((strcmp(token, 
"starts") == 0) || (strcmp(token, "ends") == 0)) {
+                                                       char token_date[MAXTOK];
+                                                       char token_time[MAXTOK];
+
+                                                       int is_starts = 
strcmp(token, "starts") == 0;
+
+                                                       // Throw away the 
weekday and parse the date.
+                                                       if (next_token(token, 
MAXTOK, fp) && next_token(token_date, MAXTOK, fp) && next_token(token_time, 
MAXTOK, fp)) {
+                                                               time_t time = 
parse_lease_time(token_date, token_time);
+
+                                                               if (is_starts)
+                                                                       
time_starts = time;
+                                                               else
+                                                                       
time_ends = time;
+                                                       }
+                                               }
+                                       }
+
+                                       if (!*hostname)
+                                               continue;
+
+                                       if ((time_starts == -1) || (time_ends 
== -1))
+                                               continue;
+
+                                       if (difftime(now, time_ends) > 0)
+                                               continue;
+
+                                       char* dot = strchr(hostname, '.');
+                                       if (dot) {
+                                               if (!daemon->domain_suffix || 
hostname_isequal(dot + 1, daemon->domain_suffix)) {
+                                                       my_syslog(LOG_WARNING,
+                                                               _("Ignoring 
DHCP lease for %s because it has an illegal domain part"),
+                                                               hostname);
+                                                       continue;
+                                               }
+                                               *dot = 0;
+                                       }
+
+                                       // Search for an existing lease in the 
list
+                                       // with the given host name and update 
the data
+                                       // if needed.
+                                       struct isc_dhcp_lease* lease = 
find_lease(hostname, leases);
+
+                                       // If no lease already exists, we 
create a new one
+                                       // and append it to the list.
+                                       if (!lease) {
+                                               lease = 
dhcp_lease_new(hostname);
+
+                                               lease->next = leases;
+                                               leases = lease;
+                                       }
+
+                                       // Only update more recent leases.
+                                       if (lease->expires > time_ends)
+                                               continue;
+
+                                       lease->addr = host_address;
+                                       lease->expires = time_ends;
+                               }
+                       }
+               }
+       }
+
+       fclose(fp);
+
+       // Drop all entries.
+       cache_unhash_dhcp();
+
+       while (leases) {
+               struct isc_dhcp_lease *lease = leases;
+               leases = lease->next;
+
+               if (lease->fqdn) {
+                       cache_add_dhcp_entry(lease->fqdn, AF_INET, (struct 
all_addr*)&lease->addr.s_addr, lease->expires);
+               }
+
+               if (lease->name) {
+                       cache_add_dhcp_entry(lease->name, AF_INET, (struct 
all_addr*)&lease->addr.s_addr, lease->expires);
+               }
+
+               // Cleanup
+               dhcp_lease_free(lease);
+       }
+}
+
+#endif
--- a/src/option.c      Wed Dec 16 19:24:12 2015
+++ b/src/option.c      Wed Dec 16 19:42:48 2015
@@ -1757,7 +1757,7 @@
        ret_err(_("bad MX target"));
       break;
 
-#ifdef HAVE_DHCP      
+#if (defined HAVE_DHCP) || (defined HAVE_ISC_READER)
     case 'l':  /* --dhcp-leasefile */
       daemon->lease_file = opt_string_alloc(arg);
       break;
--- a/Makefile  Wed Dec 16 19:24:12 2015
+++ b/Makefile  Wed Dec 16 19:28:45 2015
@@ -74,7 +74,7 @@
        helper.o tftp.o log.o conntrack.o dhcp6.o rfc3315.o \
        dhcp-common.o outpacket.o radv.o slaac.o auth.o ipset.o \
        domain.o dnssec.o blockdata.o tables.o loop.o inotify.o \
-       poll.o rrfilter.o edns0.o arp.o
+       poll.o rrfilter.o edns0.o arp.o isc.o
 
 hdrs = dnsmasq.h config.h dhcp-protocol.h dhcp6-protocol.h \
        dns-protocol.h radv-protocol.h ip6addr.h
###############################################################################
#                                                                             #
# IPFire.org - A linux based firewall                                         #
# Copyright (C) 2015  Michael Tremer & Christian Schmidt                      #
#                                                                             #
# This program is free software: you can redistribute it and/or modify        #
# it under the terms of the GNU General Public License as published by        #
# the Free Software Foundation, either version 3 of the License, or           #
# (at your option) any later version.                                         #
#                                                                             #
# This program is distributed in the hope that it will be useful,             #
# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
# GNU General Public License for more details.                                #
#                                                                             #
# You should have received a copy of the GNU General Public License           #
# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
#                                                                             #
###############################################################################

###############################################################################
# Definitions
###############################################################################

include Config

VER        = 2.75

THISAPP    = dnsmasq-$(VER)
DL_FILE    = $(THISAPP).tar.xz
DL_FROM    = $(URL_IPFIRE)
DIR_APP    = $(DIR_SRC)/$(THISAPP)
TARGET     = $(DIR_INFO)/$(THISAPP)

# We cannot use INOTIFY because our ISC reader code does not support that
COPTS      = -DHAVE_ISC_READER -DNO_INOTIFY

###############################################################################
# Top-level Rules
###############################################################################

objects = $(DL_FILE)

$(DL_FILE) = $(DL_FROM)/$(DL_FILE)

$(DL_FILE)_MD5 = 887236f1ddde6eb57cdb9d01916c9f72

install : $(TARGET)

check : $(patsubst %,$(DIR_CHK)/%,$(objects))

download :$(patsubst %,$(DIR_DL)/%,$(objects))

md5 : $(subst %,%_MD5,$(objects))

###############################################################################
# Downloading, checking, md5sum
###############################################################################

$(patsubst %,$(DIR_CHK)/%,$(objects)) :
        @$(CHECK)

$(patsubst %,$(DIR_DL)/%,$(objects)) :
        @$(LOAD)

$(subst %,%_MD5,$(objects)) :
        @$(MD5)

###############################################################################
# Installation Details
###############################################################################

$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/001-include_0_0_0_0_8_in_DNS_rebind_checks.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/002-enhance_add_subnet_to_allow_arbitary_subnet_addresses.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/003-dont_answer_non_auth_queries_for_auth_zones_locally_when_localise_queries_set.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/004-fix_behaviour_of_empty_dhcp-option.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/005-suggest_solution_to_ENOMEM_error_with_IPv6_multicast.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/006-clarify_man_page_on_RDNSS_set_in_router_advertisement.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/007-handle_signed_dangling_CNAME_replies_to_DS_queries.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/008-DHCPv6_option_56_does_not_hold_an_address_list.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/009-Respect_the_--no_resolv_flag_in_inotify_code.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/010-Rationalise_5e3e464ac4022ee0b3794513abe510817e2cf3ca.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/011-Catch_errors_from_sendmsg_in_DHCP_code.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/012-Update_list_of_subnet_for_--bogus-priv.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/013-Fix_crash_when_empty_address_from_DNS_overlays_A_record_from.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/014-Handle_unknown_DS_hash_algos_correctly.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/015-Fix_crash_at_start_up_with_conf-dir.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/016-Major_rationalisation_of_DNSSEC_validation.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/017-Abandon_caching_RRSIGs_and_returning_them_from_cache.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/018-Move_code_which_caches_DS_records_to_a_more_logical_place.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/019-Generalise_RR-filtering_code_for_use_with_EDNS0.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/020-DNSSEC_validation_tweak.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/021-Tweaks_to_EDNS0_handling_in_DNS_replies.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/022-Tidy_up_DNSSEC_non-existence_code_Check_zone_status_is_NSEC_proof_bad.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/023-Fix_brace_botch_in_dnssec_validate_ds.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/024-Do_a_better_job_of_determining_which_DNSSEC_sig_algos_are_supported.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/025-Major_tidy_up_of_EDNS0_handling_and_computation_use_of_udp.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/026-More_tweaks_in_handling_unknown_DNSSEC_algorithms.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/027-Nasty_rare_and_obscure_off-by-one_in_DNSSEC_hostname_cmp.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/028-Minor_tweak_to_previous_commit.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/029-NSEC3_check_RFC5155_para_8_2.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/030-Split_EDNS0_stuff_into_its_own_source_file.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/031-Handle_extending_EDNS0_OPT_RR.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/032-Truncate_DNS_replies_bigger_512_bytes_that_the_client_isnt_expecting.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/033-Fix_build_failure_when_DNSSEC_code_omitted.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/034-Log_signature_algo_with_DNSKEY_and_DS_also_digest_with_DS.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/035-More_EDNS0_packet_size_tweaks.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/036-Cache_access_to_the_kernels_ARP_table.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/037-First_complete_version_of_DNS-client-id_EDNS0_and_ARP_tracking_code.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/038-Correct_logic_for_when_to_start_helper.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/039-Trivial_code_tweak.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/040-Fix_datatype-sixe_botch_which_broke_DNSSEC_sig_timestamps_when_far_in_the_future.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/041-Fix_botch_in_new_arp-cache_linked-list_code_resulting_in_100percent_CPU_spin.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/042-Handle_building_with_script_support_enabled_and_DHCP_disabled.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/043-Update_copyright_notices_Happy_new_year.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq/044-Fix_FTBFS_when_scripts_excluded_at_compilation_time.patch
        cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/dnsmasq-Add-support-to-read-ISC-DHCP-lease-file.patch

        cd $(DIR_APP) && sed -i src/config.h \
                -e 's|/\* #define HAVE_IDN \*/|#define HAVE_IDN|g' \
                -e 's|/\* #define HAVE_DNSSEC \*/|#define HAVE_DNSSEC|g' \
                -e 's|#define HAVE_DHCP|//#define HAVE_DHCP|g' \
                -e 's|#define HAVE_DHCP6|//#define HAVE_DHCP6|g' \
                -e 's|#define HAVE_TFTP|//#define HAVE_TFTP|g'

        cd $(DIR_APP) && make CFLAGS="$(CFLAGS)" COPTS="$(COPTS)" \
                PREFIX=/usr all install
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

Reply via email to