diff --git a/man/dnsmasq.8 b/man/dnsmasq.8
index 0a3b5df..cc2229e 100644
--- a/man/dnsmasq.8
+++ b/man/dnsmasq.8
@@ -1073,6 +1073,16 @@ ICMP echo request (aka "ping") to the address in question. If it gets
 a reply, then the address must already be in use, and another is
 tried. This flag disables this check. Use with caution.
 .TP
+.B --ping-timeout=<milliseconds>
+(IPv4 only) Specifies how long to wait for an ICMP echo reply from an IP address
+before dnsmasq considers it free to be allocated to a host. By default, unless
+--no-ping is used, this is 1.5 seconds. It might be safe to lower this on low-latency
+networks. The maximum value is 15 seconds. Another use is for redundant primary/secondary 
+dnsmasq servers, in lieu of true cooperative load-sharing; setting the primary server
+ to have a lower ping-timeout than the secondary would cause the primary server 
+to answer most requests first. Adding --dhcp-authoritative to the primary server
+would also help this.
+.TP
 .B --log-dhcp
 Extra logging for DHCP: log all the options sent to DHCP clients and
 the tags used to determine them.
diff --git a/src/config.h b/src/config.h
index 84025f7..7faadd2 100644
--- a/src/config.h
+++ b/src/config.h
@@ -26,7 +26,7 @@
 #define LEASE_RETRY 60 /* on error, retry writing leasefile after LEASE_RETRY seconds */
 #define CACHESIZ 150 /* default cache size */
 #define MAXLEASES 1000 /* maximum number of DHCP leases */
-#define PING_WAIT 3 /* wait for ping address-in-use test */
+#define PING_WAIT 3000 /* wait for ping address-in-use test */
 #define PING_CACHE_TIME 30 /* Ping test assumed to be valid this long. */
 #define DECLINE_BACKOFF 600 /* disable DECLINEd static addresses for this long */
 #define DHCP_PACKET_MAX 16384 /* hard limit on DHCP packet size */
diff --git a/src/dhcp.c b/src/dhcp.c
index 045eb3a..0fb1671 100644
--- a/src/dhcp.c
+++ b/src/dhcp.c
@@ -630,7 +630,7 @@ int address_allocate(struct dhcp_context *context,
 	      {
 		struct ping_result *r, *victim = NULL;
 		int count, max = (int)(0.6 * (((float)PING_CACHE_TIME)/
-					      ((float)PING_WAIT)));
+					      (daemon->ping_timeout*2/1000.0f)));
 		
 		*addrp = addr;
 
diff --git a/src/dnsmasq.c b/src/dnsmasq.c
index 1b951f0..475d811 100644
--- a/src/dnsmasq.c
+++ b/src/dnsmasq.c
@@ -1486,7 +1486,7 @@ int icmp_ping(struct in_addr addr)
 	 retry_send());
   
   for (now = start = dnsmasq_time(); 
-       difftime(now, start) < (float)PING_WAIT;)
+       difftime(now, start) < (daemon->ping_timeout*2/1000.0f);)
     {
       struct timeval tv;
       fd_set rset, wset;
diff --git a/src/dnsmasq.h b/src/dnsmasq.h
index 445efad..0064902 100644
--- a/src/dnsmasq.h
+++ b/src/dnsmasq.h
@@ -812,6 +812,7 @@ extern struct daemon {
   struct iovec dhcp_packet;
   char *dhcp_buff, *dhcp_buff2, *dhcp_buff3;
   struct ping_result *ping_results;
+  int ping_timeout;
   FILE *lease_stream;
   struct dhcp_bridge *bridges;
 #ifdef HAVE_DHCP6
diff --git a/src/option.c b/src/option.c
index 5cb7d7b..0531e77 100644
--- a/src/option.c
+++ b/src/option.c
@@ -118,6 +118,7 @@ struct myoption {
 #define LOPT_DUID      307
 #define LOPT_HOST_REC  308
 #define LOPT_TFTP_LC   309
+#define LOPT_PING_TO   310
 
 #ifdef HAVE_GETOPT_LONG
 static const struct option opts[] =  
@@ -185,6 +186,7 @@ static const struct myoption opts[] =
     { "bootp-dynamic", 2, 0, '3' },
     { "dhcp-mac", 1, 0, '4' },
     { "no-ping", 0, 0, '5' },
+    { "ping-timeout",1, 0, LOPT_PING_TO },
     { "dhcp-script", 1, 0, '6' },
     { "conf-dir", 1, 0, '7' },
     { "log-facility", 1, 0 ,'8' },
@@ -328,6 +330,7 @@ static struct {
   { '4', ARG_DUP, "set:<tag>,<mac address>", gettext_noop("Map MAC address (with wildcards) to option set."), NULL },
   { LOPT_BRIDGE, ARG_DUP, "<iface>,<alias>..", gettext_noop("Treat DHCP requests on aliases as arriving from interface."), NULL },
   { '5', OPT_NO_PING, NULL, gettext_noop("Disable ICMP echo address checking in the DHCP server."), NULL },
+  { LOPT_PING_TO, ARG_ONE, "<milliseconds>", gettext_noop("Timeout for ICMP echo reply in the DHCP server."), NULL },
   { '6', ARG_ONE, "<path>", gettext_noop("Shell script to run on DHCP lease creation and destruction."), NULL },
   { LOPT_LUASCRIPT, ARG_DUP, "path", gettext_noop("Lua script to run on DHCP lease creation and destruction."), NULL },
   { LOPT_SCRIPTUSR, ARG_ONE, "<username>", gettext_noop("Run lease-change scripts as this user."), NULL },
@@ -1353,6 +1356,16 @@ static char *one_opt(int option, char *arg, char *gen_prob, int command_line)
         daemon->lease_change_command = opt_string_alloc(arg);
 #  endif
       break;
+
+    case LOPT_PING_TO: /* --ping-timeout */
+      if(!atoi_check(arg,&daemon->ping_timeout))
+        option = '?';
+      else if ( daemon->ping_timeout > 15000  )
+        problem = _("ping-timeout must be less than 15 seconds (15000 milliseconds)");
+      else if ( daemon->ping_timeout <= 0 )
+        problem = _("ping-timeout must be greater than 0");
+      break;
+
 #endif /* HAVE_DHCP */
 
     case LOPT_DHCP_HOST: /* --dhcp-hostfile */
@@ -3525,6 +3538,7 @@ void read_opts(int argc, char **argv, char *compile_opts)
   daemon->tftp_max = TFTP_MAX_CONNECTIONS;
   daemon->edns_pktsz = EDNS_PKTSZ;
   daemon->log_fac = -1;
+  daemon->ping_timeout = PING_WAIT;
   add_txt("version.bind", "dnsmasq-" VERSION );
   add_txt("authors.bind", "Simon Kelley");
   add_txt("copyright.bind", COPYRIGHT);