[Dnsmasq-discuss] Bug in dhcpv4 quiet-dhcp option

Kevin Darbyshire-Bryant kevin at darbyshire-bryant.me.uk
Wed Oct 23 13:13:05 BST 2013


Hi Simon,



I think there's a bug in the quiet-dhcp option.  In essence no dhcpv4 logging is performed unless the log option is also enabled.  I think the code should be:



diff --git a/src/rfc2131.c b/src/rfc2131.c
index 0ee7c90..dd67509 100644
--- a/src/rfc2131.c
+++ b/src/rfc2131.c
@@ -1543,7 +1543,7 @@ static void log_packet(char *type, void *addr, unsigned ch
   struct in_addr a;


-  if (!err && (!option_bool(OPT_LOG_OPTS) || option_bool(OPT_QUIET_DHCP)))
+  if (!err && !option_bool(OPT_LOG_OPTS) && option_bool(OPT_QUIET_DHCP))
     return;

   /* addr may be misaligned */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20131023/99736322/attachment.html>


More information about the Dnsmasq-discuss mailing list