[aadk-commits] jlyons: udhcp/trunk r748 - in /udhcp/trunk: Makefile files.c

SVN commits to the AADK repository aadk-commits at lists.digium.com
Thu Jan 31 15:29:06 CST 2008


Author: jlyons
Date: Thu Jan 31 15:29:06 2008
New Revision: 748

URL: http://svn.digium.com/view/aadk?view=rev&rev=748
Log:
Allow udhcp to be built with leasing capability; default to no leasing though

Modified:
    udhcp/trunk/Makefile
    udhcp/trunk/files.c

Modified: udhcp/trunk/Makefile
URL: http://svn.digium.com/view/aadk/udhcp/trunk/Makefile?view=diff&rev=748&r1=747&r2=748
==============================================================================
--- udhcp/trunk/Makefile (original)
+++ udhcp/trunk/Makefile Thu Jan 31 15:29:06 2008
@@ -6,6 +6,9 @@
 USRSBINDIR  = $(DESTDIR)${prefix}/sbin
 USRBINDIR   = $(DESTDIR)${prefix}/bin
 USRSHAREDIR = $(DESTDIR)${prefix}/share
+
+# Uncomment this to allow udhcpd to generate dhcp leases
+#ALLOW_LEASES=1
 
 # Uncomment this to get a shared binary. Call as udhcpd for the server,
 # and udhcpc for the client
@@ -50,6 +53,10 @@
 endif
 
 CFLAGS += -W -Wall -Wstrict-prototypes -D_GNU_SOURCE
+
+ifdef ALLOW_LEASES
+CFLAGS += -DALLOW_LEASES
+endif
 
 ifdef UDHCP_DEBUG
 CFLAGS += -g -DUDHCP_DEBUG

Modified: udhcp/trunk/files.c
URL: http://svn.digium.com/view/aadk/udhcp/trunk/files.c?view=diff&rev=748&r1=747&r2=748
==============================================================================
--- udhcp/trunk/files.c (original)
+++ udhcp/trunk/files.c Thu Jan 31 15:29:06 2008
@@ -210,7 +210,7 @@
 	{"interface",	read_str, &(server_config.interface),	"eth0"},
 	{"option",	read_opt, &(server_config.options),	""},
 	{"opt",		read_opt, &(server_config.options),	""},
-#if defined(ALLOW_LEASES)
+#ifdef ALLOW_LEASES
 	{"max_leases",	read_u32, &(server_config.max_leases),	"254"},
 #endif
 	{"remaining",	read_yn,  &(server_config.remaining),	"yes"},




More information about the aadk-commits mailing list