dhclient - Only warn on unknown options when appropiate.
authorAntonio Huete Jimenez <tuxillo@quantumachine.net>
Fri, 3 Aug 2012 23:26:33 +0000 (01:26 +0200)
committerAntonio Huete Jimenez <tuxillo@quantumachine.net>
Sun, 19 Aug 2012 14:30:46 +0000 (16:30 +0200)
- By default we ignore unknown dhcp server options, so don't bother
  warning unless we ask dhclient to reject leases with unknown options.

Taken-from: OpenBSD

sbin/dhclient/dhclient.c

index f4b7d48..7688efb 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: src/sbin/dhclient/dhclient.c,v 1.139 2011/04/04 11:14:52 krw Exp $    */
+/*     $OpenBSD: src/sbin/dhclient/dhclient.c,v 1.140 2011/04/17 20:06:08 phessler Exp $       */
 
 /*
  * Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -1919,7 +1919,8 @@ check_option(struct client_lease *l, int option)
        case DHO_END:
                return (1);
        default:
-               warning("unknown dhcp option value 0x%x", option);
+               if (!unknown_ok)
+                       warning("unknown dhcp option value 0x%x", option);
                return (unknown_ok);
        }
 }