9c49c9e
From 846779467f7393b19e8d206405116e1e26e16efc Mon Sep 17 00:00:00 2001
7c09728
From: Pavel Zhukov <pzhukov@redhat.com>
7c09728
Date: Thu, 21 Feb 2019 10:25:53 +0100
9c49c9e
Subject: [PATCH 06/26] Various man-page-only fixes
7c09728
Cc: pzhukov@redhat.com
7c09728
7c09728
---
7c09728
 client/dhclient-script.8 | 22 +++++++++++++++++++++-
7c09728
 client/dhclient.conf.5   | 14 +++++++++++++-
7c09728
 common/dhcp-options.5    | 15 +++++++++++++++
7c09728
 server/dhcpd.conf.5      | 14 +++++++++-----
7c09728
 4 files changed, 58 insertions(+), 7 deletions(-)
7c09728
7c09728
diff --git a/client/dhclient-script.8 b/client/dhclient-script.8
7c09728
index 3553afd..0db5516 100644
7c09728
--- a/client/dhclient-script.8
7c09728
+++ b/client/dhclient-script.8
7c09728
@@ -43,7 +43,7 @@ customizations are needed, they should be possible using the enter and
e83fb19
 exit hooks provided (see HOOKS for details).   These hooks will allow the
e83fb19
 user to override the default behaviour of the client in creating a
e83fb19
 .B /etc/resolv.conf
e83fb19
-file.
e83fb19
+file, and to handle DHCP options not handled by default.
e83fb19
 .PP
e83fb19
 No standard client script exists for some operating systems, even though
e83fb19
 the actual client may work, so a pioneering user may well need to create
7c09728
@@ -87,6 +87,26 @@ present.   The
e83fb19
 .B ETCDIR/dhclient-exit-hooks
e83fb19
 script can modify the valid of exit_status to change the exit status
e83fb19
 of dhclient-script.
e83fb19
+.PP
e83fb19
+Immediately after dhclient brings an interface UP with a new IP address,
e83fb19
+subnet mask, and routes, in the REBOOT/BOUND states, it will check for the
e83fb19
+existence of an executable
e83fb19
+.B ETCDIR/dhclient-up-hooks
e83fb19
+script, and source it if found. This script can handle DHCP options in
e83fb19
+the environment that are not handled by default. A per-interface.
e83fb19
+.B ETCDIR/dhclient-${IF}-up-hooks
e83fb19
+script will override the generic script and be sourced when interface
e83fb19
+$IF has been brought up.
e83fb19
+.PP
e83fb19
+Immediately before dhclient brings an interface DOWN, removing its IP
e83fb19
+address, subnet mask, and routes, in the STOP/RELEASE  states, it will
e83fb19
+check for the existence of an executable
e83fb19
+.B ETCDIR/dhclient-down-hooks
e83fb19
+script, and source it if found. This script can handle DHCP options in
e83fb19
+the environment that are not handled by default. A per-interface
e83fb19
+.B ETCDIR/dhclient-${IF}-down-hooks
e83fb19
+script will override the generic script and be sourced when interface
e83fb19
+$IF is about to be brought down.
e83fb19
 .SH OPERATION
e83fb19
 When dhclient needs to invoke the client configuration script, it
e83fb19
 defines a set of variables in the environment, and then invokes
7c09728
diff --git a/client/dhclient.conf.5 b/client/dhclient.conf.5
7c09728
index fa3b908..566a881 100644
7c09728
--- a/client/dhclient.conf.5
7c09728
+++ b/client/dhclient.conf.5
7c09728
@@ -228,7 +228,8 @@ responding to the client send the client its values for the specified
7c09728
 options.  Only the option names should be specified in the request
7c09728
 statement - not option parameters.  By default, the DHCPv4 client
7c09728
 requests the subnet-mask, broadcast-address, time-offset, routers,
7c09728
-domain-name, domain-name-servers and host-name options while the DHCPv6
7c09728
+domain-search, domain-name, domain-name-servers, host-name, nis-domain,
7c09728
+nis-servers, ntp-servers and interface-mtu options while the DHCPv6
7c09728
 client requests the dhcp6 name-servers and domain-search options.  Note
7c09728
 that if you enter a \'request\' statement, you over-ride these defaults
7c09728
 and these options will not be requested.
7c09728
@@ -735,6 +736,17 @@ broadcast packets transmitted by DHCP clients, but is only useful if you
7c09728
 know the DHCP service(s) anycast MAC address prior to configuring your
7c09728
 client.  The \fIlink-type\fR and \fImac-address\fR parameters are configured
7c09728
 in a similar manner to the \fBhardware\fR statement.
7c09728
+.PP
7c09728
+ \fBbootp-broadcast-always;\fR
7c09728
+.PP
7c09728
+The
7c09728
+.B bootp-broadcast-always
7c09728
+statement instructs dhclient to always set the bootp broadcast flag in
7c09728
+request packets, so that servers will always broadcast replies.
7c09728
+This is equivalent to supplying the dhclient -B argument, and has
7c09728
+the same effect as specifying 'always-broadcast' in the server's dhcpd.conf.
7c09728
+This option is provided as an extension to enable dhclient to work
7c09728
+on IBM s390 Linux guests.
7c09728
 .PP
7c09728
 .SH SAMPLE
7c09728
 The following configuration file was used on a laptop running NetBSD
7c09728
diff --git a/common/dhcp-options.5 b/common/dhcp-options.5
7c09728
index 33d4804..d9e1197 100644
7c09728
--- a/common/dhcp-options.5
7c09728
+++ b/common/dhcp-options.5
7c09728
@@ -1068,6 +1068,21 @@ classless IP routing - it does not include a subnet mask.  Since
45c0371
 classless IP routing is now the most widely deployed routing standard,
45c0371
 this option is virtually useless, and is not implemented by any of the
45c0371
 popular DHCP clients, for example the Microsoft DHCP client.
45c0371
+.PP
45c0371
+NOTE to Fedora dhclient users:
45c0371
+.br
45c0371
+dhclient-script interprets trailing 0 octets of the target as indicating
45c0371
+the subnet class of the route, so for the following static-routes value:
45c0371
+.br
45c0371
+        option static-routes 172.0.0.0 172.16.2.254,
45c0371
+.br
45c0371
+                             192.168.0.0 192.168.2.254;
45c0371
+.br
45c0371
+dhclient-script will create routes:
45c0371
+.br
45c0371
+        172/8 via 172.16.2.254 dev $interface
45c0371
+.br
45c0371
+        192.168/16 via 192.168.2.254 dev $interface
45c0371
 .RE
45c0371
 .PP
45c0371
 .nf
7c09728
diff --git a/server/dhcpd.conf.5 b/server/dhcpd.conf.5
7c09728
index 17330d4..89b5540 100644
7c09728
--- a/server/dhcpd.conf.5
7c09728
+++ b/server/dhcpd.conf.5
7c09728
@@ -527,6 +527,9 @@ pool {
45c0371
 };
45c0371
 .fi
45c0371
 .PP
45c0371
+Dynamic BOOTP leases are not compatible with failover, and, as such,
45c0371
+you need to disallow BOOTP in pools that you are using failover for.
45c0371
+.PP
45c0371
 The  server currently  does very  little  sanity checking,  so if  you
45c0371
 configure it wrong, it will just  fail in odd ways.  I would recommend
45c0371
 therefore that you either do  failover or don't do failover, but don't
7c09728
@@ -541,9 +544,9 @@ primary server might look like this:
45c0371
 failover peer "foo" {
45c0371
   primary;
7a016a6
   address anthrax.rc.example.com;
45c0371
-  port 519;
45c0371
+  port 647;
7a016a6
   peer address trantor.rc.example.com;
45c0371
-  peer port 520;
45c0371
+  peer port 847;
45c0371
   max-response-delay 60;
45c0371
   max-unacked-updates 10;
45c0371
   mclt 3600;
7c09728
@@ -1323,7 +1326,7 @@ the zone containing PTR records - for ISC BIND, something like this:
45c0371
 .PP
45c0371
 .nf
45c0371
 key DHCP_UPDATER {
45c0371
-  algorithm HMAC-MD5.SIG-ALG.REG.INT;
45c0371
+  algorithm hmac-md5;
45c0371
   secret pRP5FapFoJ95JEL06sv4PQ==;
45c0371
 };
45c0371
 
7c09728
@@ -1346,7 +1349,7 @@ dhcpd.conf file:
45c0371
 .PP
45c0371
 .nf
45c0371
 key DHCP_UPDATER {
45c0371
-  algorithm HMAC-MD5.SIG-ALG.REG.INT;
45c0371
+  algorithm hmac-md5;
45c0371
   secret pRP5FapFoJ95JEL06sv4PQ==;
45c0371
 };
45c0371
 
7c09728
@@ -2912,7 +2915,8 @@ statement
45c0371
 The \fInext-server\fR statement is used to specify the host address of
45c0371
 the server from which the initial boot file (specified in the
c72a792
 \fIfilename\fR statement) is to be loaded.  \fIServer-name\fR should
45c0371
-be a numeric IP address or a domain name.
45c0371
+be a numeric IP address or a domain name.  If no \fInext-server\fR statement
45c0371
+applies to a given client, the address 0.0.0.0 is used.
45c0371
 .RE
45c0371
 .PP
45c0371
 The
7c09728
-- 
7c09728
2.14.5
7c09728