diff options
-rw-r--r-- | usr.sbin/dhcp/dhclient/dhclient.8 | 7 | ||||
-rw-r--r-- | usr.sbin/dhcp/dhclient/dhclient.c | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/usr.sbin/dhcp/dhclient/dhclient.8 b/usr.sbin/dhcp/dhclient/dhclient.8 index 36d7aacdc76..576f08f3c9f 100644 --- a/usr.sbin/dhcp/dhclient/dhclient.8 +++ b/usr.sbin/dhcp/dhclient/dhclient.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: dhclient.8,v 1.9 2000/10/20 13:19:10 aaron Exp $ +.\" $OpenBSD: dhclient.8,v 1.10 2000/10/30 02:35:33 deraadt Exp $ .\" .\" Copyright (c) 1997 The Internet Software Consortium. .\" All rights reserved. @@ -43,7 +43,7 @@ .Nd Dynamic Host Configuration Protocol (DHCP) Client .Sh SYNOPSIS .Nm -.Op Fl 1d +.Op Fl 1du .Op Fl p Ar port .Op Ar interface ... .Sh DESCRIPTION @@ -76,6 +76,9 @@ By default, .Nm runs in the foreground until it has configured an interface, and then will revert to running in the background. +.It Fl u +Forces dhclient to reject leases with unknown options in them. The default +behaviour is to accept such lease offers .It Fl p Ar port Specifies the UDP .Ar port diff --git a/usr.sbin/dhcp/dhclient/dhclient.c b/usr.sbin/dhcp/dhclient/dhclient.c index 4bac3573d0b..7d585f49d7e 100644 --- a/usr.sbin/dhcp/dhclient/dhclient.c +++ b/usr.sbin/dhcp/dhclient/dhclient.c @@ -56,7 +56,7 @@ #ifndef lint static char copyright[] = -"$Id: dhclient.c,v 1.10 2000/10/26 20:35:32 beck Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; +"$Id: dhclient.c,v 1.11 2000/10/30 02:35:33 deraadt Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -106,6 +106,7 @@ u_int16_t remote_port; int log_priority; int no_daemon; int onetry; +int unknown_ok = 1; static void usage PROTO ((void)); @@ -132,6 +133,8 @@ int main (argc, argv, envp) ntohs (local_port)); } else if (!strcmp (argv [i], "-d")) { no_daemon = 1; + } else if (!strcmp (argv [i], "-u")) { + unknown_ok = 0; } else if (!strcmp (argv [i], "-1")) { onetry = 1; } else if (argv [i][0] == '-') { @@ -2201,7 +2204,7 @@ int check_option (struct client_lease *l, int option) { return(1); default: warn("unknown dhcp option value 0x%x", option); - return(0); + return(unknown_ok); } } |