]> git.ipfire.org Git - ipfire-3.x.git/blob - dhcp/patches/0006-Various-man-page-only-fixes.patch
xfsprogs: Update to 5.0.0
[ipfire-3.x.git] / dhcp / patches / 0006-Various-man-page-only-fixes.patch
1 From dd3053e6f45ac1f149869b7ded3f539d6c046114 Mon Sep 17 00:00:00 2001
2 From: Pavel Zhukov <pzhukov@redhat.com>
3 Date: Thu, 21 Feb 2019 10:25:53 +0100
4 Subject: [PATCH 06/21] Various man-page-only fixes
5 Cc: pzhukov@redhat.com
6
7 ---
8 client/dhclient-script.8 | 22 +++++++++++++++++++++-
9 client/dhclient.conf.5 | 14 +++++++++++++-
10 common/dhcp-options.5 | 15 +++++++++++++++
11 server/dhcpd.conf.5 | 14 +++++++++-----
12 4 files changed, 58 insertions(+), 7 deletions(-)
13
14 diff --git a/client/dhclient-script.8 b/client/dhclient-script.8
15 index 3553afd..0db5516 100644
16 --- a/client/dhclient-script.8
17 +++ b/client/dhclient-script.8
18 @@ -43,7 +43,7 @@ customizations are needed, they should be possible using the enter and
19 exit hooks provided (see HOOKS for details). These hooks will allow the
20 user to override the default behaviour of the client in creating a
21 .B /etc/resolv.conf
22 -file.
23 +file, and to handle DHCP options not handled by default.
24 .PP
25 No standard client script exists for some operating systems, even though
26 the actual client may work, so a pioneering user may well need to create
27 @@ -87,6 +87,26 @@ present. The
28 .B ETCDIR/dhclient-exit-hooks
29 script can modify the valid of exit_status to change the exit status
30 of dhclient-script.
31 +.PP
32 +Immediately after dhclient brings an interface UP with a new IP address,
33 +subnet mask, and routes, in the REBOOT/BOUND states, it will check for the
34 +existence of an executable
35 +.B ETCDIR/dhclient-up-hooks
36 +script, and source it if found. This script can handle DHCP options in
37 +the environment that are not handled by default. A per-interface.
38 +.B ETCDIR/dhclient-${IF}-up-hooks
39 +script will override the generic script and be sourced when interface
40 +$IF has been brought up.
41 +.PP
42 +Immediately before dhclient brings an interface DOWN, removing its IP
43 +address, subnet mask, and routes, in the STOP/RELEASE states, it will
44 +check for the existence of an executable
45 +.B ETCDIR/dhclient-down-hooks
46 +script, and source it if found. This script can handle DHCP options in
47 +the environment that are not handled by default. A per-interface
48 +.B ETCDIR/dhclient-${IF}-down-hooks
49 +script will override the generic script and be sourced when interface
50 +$IF is about to be brought down.
51 .SH OPERATION
52 When dhclient needs to invoke the client configuration script, it
53 defines a set of variables in the environment, and then invokes
54 diff --git a/client/dhclient.conf.5 b/client/dhclient.conf.5
55 index fa3b908..566a881 100644
56 --- a/client/dhclient.conf.5
57 +++ b/client/dhclient.conf.5
58 @@ -228,7 +228,8 @@ responding to the client send the client its values for the specified
59 options. Only the option names should be specified in the request
60 statement - not option parameters. By default, the DHCPv4 client
61 requests the subnet-mask, broadcast-address, time-offset, routers,
62 -domain-name, domain-name-servers and host-name options while the DHCPv6
63 +domain-search, domain-name, domain-name-servers, host-name, nis-domain,
64 +nis-servers, ntp-servers and interface-mtu options while the DHCPv6
65 client requests the dhcp6 name-servers and domain-search options. Note
66 that if you enter a \'request\' statement, you over-ride these defaults
67 and these options will not be requested.
68 @@ -735,6 +736,17 @@ broadcast packets transmitted by DHCP clients, but is only useful if you
69 know the DHCP service(s) anycast MAC address prior to configuring your
70 client. The \fIlink-type\fR and \fImac-address\fR parameters are configured
71 in a similar manner to the \fBhardware\fR statement.
72 +.PP
73 + \fBbootp-broadcast-always;\fR
74 +.PP
75 +The
76 +.B bootp-broadcast-always
77 +statement instructs dhclient to always set the bootp broadcast flag in
78 +request packets, so that servers will always broadcast replies.
79 +This is equivalent to supplying the dhclient -B argument, and has
80 +the same effect as specifying 'always-broadcast' in the server's dhcpd.conf.
81 +This option is provided as an extension to enable dhclient to work
82 +on IBM s390 Linux guests.
83 .PP
84 .SH SAMPLE
85 The following configuration file was used on a laptop running NetBSD
86 diff --git a/common/dhcp-options.5 b/common/dhcp-options.5
87 index 33d4804..d9e1197 100644
88 --- a/common/dhcp-options.5
89 +++ b/common/dhcp-options.5
90 @@ -1068,6 +1068,21 @@ classless IP routing - it does not include a subnet mask. Since
91 classless IP routing is now the most widely deployed routing standard,
92 this option is virtually useless, and is not implemented by any of the
93 popular DHCP clients, for example the Microsoft DHCP client.
94 +.PP
95 +NOTE to Fedora dhclient users:
96 +.br
97 +dhclient-script interprets trailing 0 octets of the target as indicating
98 +the subnet class of the route, so for the following static-routes value:
99 +.br
100 + option static-routes 172.0.0.0 172.16.2.254,
101 +.br
102 + 192.168.0.0 192.168.2.254;
103 +.br
104 +dhclient-script will create routes:
105 +.br
106 + 172/8 via 172.16.2.254 dev $interface
107 +.br
108 + 192.168/16 via 192.168.2.254 dev $interface
109 .RE
110 .PP
111 .nf
112 diff --git a/server/dhcpd.conf.5 b/server/dhcpd.conf.5
113 index 17330d4..89b5540 100644
114 --- a/server/dhcpd.conf.5
115 +++ b/server/dhcpd.conf.5
116 @@ -527,6 +527,9 @@ pool {
117 };
118 .fi
119 .PP
120 +Dynamic BOOTP leases are not compatible with failover, and, as such,
121 +you need to disallow BOOTP in pools that you are using failover for.
122 +.PP
123 The server currently does very little sanity checking, so if you
124 configure it wrong, it will just fail in odd ways. I would recommend
125 therefore that you either do failover or don't do failover, but don't
126 @@ -541,9 +544,9 @@ primary server might look like this:
127 failover peer "foo" {
128 primary;
129 address anthrax.rc.example.com;
130 - port 519;
131 + port 647;
132 peer address trantor.rc.example.com;
133 - peer port 520;
134 + peer port 847;
135 max-response-delay 60;
136 max-unacked-updates 10;
137 mclt 3600;
138 @@ -1323,7 +1326,7 @@ the zone containing PTR records - for ISC BIND, something like this:
139 .PP
140 .nf
141 key DHCP_UPDATER {
142 - algorithm HMAC-MD5.SIG-ALG.REG.INT;
143 + algorithm hmac-md5;
144 secret pRP5FapFoJ95JEL06sv4PQ==;
145 };
146
147 @@ -1346,7 +1349,7 @@ dhcpd.conf file:
148 .PP
149 .nf
150 key DHCP_UPDATER {
151 - algorithm HMAC-MD5.SIG-ALG.REG.INT;
152 + algorithm hmac-md5;
153 secret pRP5FapFoJ95JEL06sv4PQ==;
154 };
155
156 @@ -2912,7 +2915,8 @@ statement
157 The \fInext-server\fR statement is used to specify the host address of
158 the server from which the initial boot file (specified in the
159 \fIfilename\fR statement) is to be loaded. \fIServer-name\fR should
160 -be a numeric IP address or a domain name.
161 +be a numeric IP address or a domain name. If no \fInext-server\fR statement
162 +applies to a given client, the address 0.0.0.0 is used.
163 .RE
164 .PP
165 The
166 --
167 2.14.5