Opened 12 years ago

Closed 12 years ago

#618 closed defect (invalid)

Make DHCP lease time configurable

Reported by: luke-jr@… Owned by: developers
Priority: normal Milestone:
Component: packages Version:
Keywords: Cc:


--- /dev/fd/63  2006-06-26 08:27:43.197485250 +0000
+++ /dev/fd/62  2006-06-26 08:27:43.197485250 +0000
@@ -20,10 +20,14 @@
   num=$(nvram get dhcp_num)
   eval $(ipcalc $ipaddr $netmask $start $num)
+  lease_time=$(nvram get dhcp_lease)
+  if test -z "$lease_time"; then
+    lease_time=12h
+  fi

   # and pass the args via the commandline
   # (because trying to edit the config from here is crazy)
-  args="-K -F $START,$END,$NETMASK,12h"
+  args="-K -F $START,$END,$NETMASK,$lease_time"

 # ignore requests from wan interface

Attachments (0)

Change History (3)

comment:1 Changed 12 years ago by anonymous

BTW, it's a patch for /etc/init.d/S50dnsmasq

comment:2 Changed 12 years ago by anonymous

What part of

# The following is to automatically configure the DHCP settings
# based on nvram settings. Feel free to replace all this crap
# with a simple "dnsmasq" and manage everything via the
# /etc/dnsmasq.conf config file

is so hard to understand?

comment:3 Changed 12 years ago by florian

  • Resolution set to invalid
  • Status changed from new to closed

Already in whiterussian and kamikaze.

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.