]> git.pld-linux.org Git - packages/dhcp.git/blob - dhcp-options.patch
- rediff patch
[packages/dhcp.git] / dhcp-options.patch
1 diff -urNp -x '*.orig' dhcp-4.4.2.org/client/clparse.c dhcp-4.4.2/client/clparse.c
2 --- dhcp-4.4.2.org/client/clparse.c     2020-01-21 20:21:48.000000000 +0100
3 +++ dhcp-4.4.2/client/clparse.c 2021-05-15 22:10:03.054906758 +0200
4 @@ -192,6 +192,7 @@ isc_result_t read_client_conf ()
5         /* Requested lease time, used by DHCPv6 (DHCPv4 uses the option cache)
6          */
7         top_level_config.requested_lease = 7200;
8 +       top_level_config.bootp_broadcast_always = 0;
9  
10         group_allocate (&top_level_config.on_receipt, MDL);
11         if (!top_level_config.on_receipt)
12 @@ -397,7 +398,8 @@ void read_client_leases ()
13         interface-declaration |
14         LEASE client-lease-statement |
15         ALIAS client-lease-statement |
16 -       KEY key-definition */
17 +       KEY key-definition |
18 +       BOOTP_BROADCAST_ALWAYS */
19  
20  void parse_client_statement (cfile, ip, config)
21         struct parse *cfile;
22 @@ -820,6 +822,12 @@ void parse_client_statement (cfile, ip,
23                 parse_lease_id_format(cfile);
24                 break;
25  
26 +             case BOOTP_BROADCAST_ALWAYS:
27 +               token = next_token(&val, (unsigned*)0, cfile);
28 +               config -> bootp_broadcast_always = 1;
29 +               parse_semi (cfile);
30 +               return;
31 +
32  
33               default:
34                 lose = 0;
35 diff -urNp -x '*.orig' dhcp-4.4.2.org/client/dhclient.8 dhcp-4.4.2/client/dhclient.8
36 --- dhcp-4.4.2.org/client/dhclient.8    2020-01-21 20:21:48.000000000 +0100
37 +++ dhcp-4.4.2/client/dhclient.8        2021-05-15 22:10:03.054906758 +0200
38 @@ -147,6 +147,33 @@ dhclient - Dynamic Host Configuration Pr
39  .I seconds
40  ]
41  [
42 +.B -B
43 +]
44 +[
45 +.B -C
46 +.I dhcp-client-identifier
47 +]
48 +[
49 +.B -H
50 +.I host-name
51 +]
52 +[
53 +.B -F
54 +.I fqdn.fqdn
55 +]
56 +[
57 +.B -V
58 +.I vendor-class-identifier
59 +]
60 +[
61 +.B --request-options
62 +.I request-option-list
63 +]
64 +[
65 +.B --timeout
66 +.I timeout
67 +]
68 +[
69  .B -v
70  ]
71  [
72 @@ -302,6 +329,69 @@ not to exit when it doesn't find any suc
73  program can then be used to notify the client when a network interface
74  has been added or removed, so that the client can attempt to configure an IP
75  address on that interface.
76 +
77 +.TP
78 +.BI \-B
79 +Set the BOOTP broadcast flag in request packets so servers will always
80 +broadcast replies.
81 +
82 +.TP
83 +.BI \-C\ <dhcp-client-identifier>
84 +Specify the dhcp-client-identifier option to send to the DHCP server.
85 +
86 +.TP
87 +.BI \-H\ <host-name>
88 +Specify the host-name option to send to the DHCP server.  The host-name
89 +string only contains the client's hostname prefix, to which the server will
90 +append the ddns-domainname or domain-name options, if any, to derive the
91 +fully qualified domain name of the client.  The
92 +.B -H
93 +option cannot be used with the
94 +.B -F
95 +option.
96 +
97 +.TP
98 +.BI \-F\ <fqdn.fqdn>
99 +Specify the fqdn.fqdn option to send to the DHCP server.  This option cannot
100 +be used with the
101 +.B -H
102 +option.  The fqdn.fqdn option must specify the complete domain name of the
103 +client host, which the server may use for dynamic DNS updates.
104 +
105 +.TP
106 +.BI \-V\ <vendor-class-identifier>
107 +Specify the vendor-class-identifier option to send to the DHCP server.
108 +
109 +.TP
110 +.BI \--request-options\ <option>[,<option>...]
111 +Specify the list of options the client is to request from the server.  The
112 +option list must be a single string consisting of option names separated
113 +by at least one command and optional space characters.  The default option
114 +list is:
115 +
116 +.BR
117 +    subnet-mask, broadcast-address, time-offset, routers,
118 +.BR
119 +    domain-search, domain-name, domain-name-servers, host-name, 
120 +.BR
121 +    nis-domain, nis-servers, ntp-servers, interface-mtu
122 +
123 +.TP
124 +.B --request-options
125 +option does not append options to the default request, it overrides the
126 +default request list.  Keep this in mind if you want to request an
127 +additional option besides the default request list.  You will have to
128 +specify all option names for the
129 +.B --request-options
130 +parameter.
131 +
132 +.TP
133 +.BI \--timeout\ <timeout>
134 +Specify the time after which
135 +.B dhclient
136 +will decide that no DHCP servers can be contacted when no responses have been
137 +received.
138 +
139  .TP
140  .BI \-n
141  Do not configure any interfaces.  This is most likely to be useful in
142 diff -urNp -x '*.orig' dhcp-4.4.2.org/client/dhclient.c dhcp-4.4.2/client/dhclient.c
143 --- dhcp-4.4.2.org/client/dhclient.c    2021-05-15 22:10:02.951572212 +0200
144 +++ dhcp-4.4.2/client/dhclient.c        2021-05-15 22:10:03.054906758 +0200
145 @@ -41,6 +41,12 @@
146  #include <sys/wait.h>
147  #include <limits.h>
148  
149 +/*
150 + * Defined in stdio.h when _GNU_SOURCE is set, but we don't want to define
151 + * that when building ISC code.
152 + */
153 +extern int asprintf(char **strp, const char *fmt, ...);
154 +
155  TIME default_lease_time = 43200; /* 12 hours... */
156  TIME max_lease_time = 86400; /* 24 hours... */
157  
158 @@ -112,6 +118,10 @@ char *mockup_relay = NULL;
159  
160  char *progname = NULL;
161  
162 +int bootp_broadcast_always = 0;
163 +
164 +extern struct option *default_requested_options[];
165 +
166  void run_stateless(int exit_mode, u_int16_t port);
167  
168  static isc_result_t write_duid(struct data_string *duid);
169 @@ -188,7 +198,11 @@ static const char use_v6command[] = "Com
170  "                [-s server-addr] [-cf config-file]\n" \
171  "                [-df duid-file] [-lf lease-file]\n" \
172  "                [-pf pid-file] [--no-pid] [-e VAR=val]\n" \
173 -"                [-sf script-file] [interface]*"
174 +"                [-sf script-file] [interface]*\n" \
175 +"                [-C <dhcp-client-identifier>] [-B]\n" \
176 +"                [-H <host-name> | -F <fqdn.fqdn>] [--timeout <timeout>]\n" \
177 +"                [-V <vendor-class-identifier>]\n" \
178 +"                [--request-options <request option list>]"
179  
180  #define DHCLIENT_USAGEH "{--version|--help|-h}"
181  
182 @@ -251,6 +265,17 @@ main(int argc, char **argv) {
183         /* Initialize client globals. */
184         memset(&default_duid, 0, sizeof(default_duid));
185  
186 +       char *dhcp_client_identifier_arg = NULL;
187 +       char *dhcp_host_name_arg = NULL;
188 +       char *dhcp_fqdn_arg = NULL;
189 +       char *dhcp_vendor_class_identifier_arg = NULL;
190 +       char *dhclient_request_options = NULL;
191 +
192 +       int timeout_arg = 0;
193 +       char *arg_conf = NULL;
194 +       int arg_conf_len = 0;
195 +
196 +
197         /* Make sure that file descriptors 0 (stdin), 1, (stdout), and
198            2 (stderr) are open. To do this, we assume that when we
199            open a file the lowest available file descriptor is used. */
200 @@ -305,6 +330,89 @@ main(int argc, char **argv) {
201                                          strlen(DHCLIENT_USAGEH)));
202                         IGNORE_RET(write(STDERR_FILENO, "\n", 1));
203                         exit(0);
204 +               } else if (!strcmp(argv[i], "-C")) {
205 +                       if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
206 +                               usage(use_noarg, argv[i-1]);
207 +                               exit(1);
208 +                       }
209 +
210 +                       if (strlen(argv[i]) >= DHCP_MAX_OPTION_LEN) {
211 +                               log_error("-C option dhcp-client-identifier string \"%s\" is too long - maximum length is: %d", argv[i], DHCP_MAX_OPTION_LEN-1);
212 +                               exit(1);
213 +                       }
214 +
215 +                       dhcp_client_identifier_arg = argv[i];
216 +               } else if (!strcmp(argv[i], "-B")) {
217 +                       bootp_broadcast_always = 1;
218 +               } else if (!strcmp(argv[i], "-H")) {
219 +                       if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
220 +                               usage(use_noarg, argv[i-1]);
221 +                               exit(1);
222 +                       }
223 +
224 +                       if (strlen(argv[i]) >= DHCP_MAX_OPTION_LEN) {
225 +                               log_error("-H option host-name string \"%s\" is too long - maximum length is: %d", argv[i], DHCP_MAX_OPTION_LEN-1);
226 +                               exit(1);
227 +                       }
228 +
229 +                       if (dhcp_host_name_arg != NULL) {
230 +                               log_error("The -H <host-name> and -F <fqdn> arguments are mutually exclusive");
231 +                               exit(1);
232 +                       }
233 +
234 +                       dhcp_host_name_arg = argv[i];
235 +               } else if (!strcmp(argv[i], "-F")) {
236 +                       if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
237 +                               usage(use_noarg, argv[i-1]);
238 +                               exit(1);
239 +                       }
240 +
241 +                       if (strlen(argv[i]) >= DHCP_MAX_OPTION_LEN) {
242 +                               log_error("-F option fqdn.fqdn string \"%s\" is too long - maximum length is: %d", argv[i], DHCP_MAX_OPTION_LEN-1);
243 +                               exit(1);
244 +                       }
245 +
246 +                       if (dhcp_fqdn_arg != NULL) {
247 +                               log_error("Only one -F <fqdn> argument can be specified");
248 +                               exit(1);
249 +                       }
250 +
251 +                       if (dhcp_host_name_arg != NULL) {
252 +                               log_error("The -F <fqdn> and -H <host-name> arguments are mutually exclusive");
253 +                               exit(1);
254 +                       }
255 +
256 +                       dhcp_fqdn_arg = argv[i];
257 +               } else if (!strcmp(argv[i], "--timeout")) {
258 +                       if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
259 +                               usage(use_noarg, argv[i-1]);
260 +                               exit(1);
261 +                       }
262 +
263 +                       if ((timeout_arg = atoi(argv[i])) <= 0) {
264 +                               log_error("timeout option must be > 0 - bad value: %s",argv[i]);
265 +                               exit(1);
266 +                       }
267 +               } else if (!strcmp(argv[i], "-V")) {
268 +                       if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
269 +                               usage(use_noarg, argv[i-1]);
270 +                               exit(1);
271 +                       }
272 +
273 +                       if (strlen(argv[i]) >= DHCP_MAX_OPTION_LEN) {
274 +                               log_error("-V option vendor-class-identifier string \"%s\" is too long - maximum length is: %d", argv[i], DHCP_MAX_OPTION_LEN-1);
275 +                               exit(1);
276 +                       }
277 +
278 +                       dhcp_vendor_class_identifier_arg = argv[i];
279 +               } else if (!strcmp(argv[i], "--request-options")) {
280 +                       if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
281 +                               usage(use_noarg, argv[i-1]);
282 +                               exit(1);
283 +                       }
284 +
285 +                       dhclient_request_options = argv[i];
286 +
287                 }
288         }
289         /* When not forbidden prepare to become a daemon */
290 @@ -831,6 +939,156 @@ main(int argc, char **argv) {
291         /* Parse the dhclient.conf file. */
292         read_client_conf();
293  
294 +       /* Parse any extra command line configuration arguments: */
295 +       if ((dhcp_client_identifier_arg != NULL) && (*dhcp_client_identifier_arg != '\0')) {
296 +               arg_conf_len = asprintf(&arg_conf, "send dhcp-client-identifier \"%s\";", dhcp_client_identifier_arg);
297 +
298 +               if ((arg_conf == 0) || (arg_conf_len <= 0))
299 +                       log_fatal("Unable to send -C option dhcp-client-identifier");
300 +       }
301 +
302 +       if ((dhcp_host_name_arg != NULL) && (*dhcp_host_name_arg != '\0')) {
303 +               if (arg_conf == 0) {
304 +                       arg_conf_len = asprintf(&arg_conf, "send host-name \"%s\";", dhcp_host_name_arg);
305 +
306 +                       if ((arg_conf == 0) || (arg_conf_len <= 0))
307 +                               log_fatal("Unable to send -H option host-name");
308 +               } else {
309 +                       char *last_arg_conf = arg_conf;
310 +                       arg_conf = NULL;
311 +                       arg_conf_len = asprintf(&arg_conf, "%s\nsend host-name \"%s\";", last_arg_conf, dhcp_host_name_arg);
312 +
313 +                       if ((arg_conf == 0) || (arg_conf_len <= 0))
314 +                               log_fatal("Unable to send -H option host-name");
315 +
316 +                       free(last_arg_conf);
317 +               }
318 +       }
319 +
320 +       if ((dhcp_fqdn_arg != NULL) && (*dhcp_fqdn_arg != '\0')) {
321 +               if (arg_conf == 0) {
322 +                       arg_conf_len = asprintf(&arg_conf,  "send fqdn.fqdn \"%s\";", dhcp_fqdn_arg);
323 +
324 +                       if ((arg_conf == 0) || (arg_conf_len <= 0))
325 +                               log_fatal("Unable to send -F option fqdn.fqdn");
326 +               } else {
327 +                       char *last_arg_conf = arg_conf;
328 +                       arg_conf = NULL;
329 +                       arg_conf_len = asprintf(&arg_conf, "%s\nsend fqdn.fqdn \"%s\";", last_arg_conf, dhcp_fqdn_arg);
330 +
331 +                       if ((arg_conf == 0)  || (arg_conf_len <= 0))
332 +                               log_fatal("Unable to send -F option fqdn.fqdn");
333 +
334 +                       free(last_arg_conf);
335 +               }
336 +       }
337 +
338 +       if (timeout_arg) {
339 +               if (arg_conf == 0) {
340 +                       arg_conf_len = asprintf(&arg_conf,  "timeout %d;", timeout_arg);
341 +
342 +                       if ((arg_conf == 0) || (arg_conf_len <= 0))
343 +                               log_fatal("Unable to process --timeout timeout argument");
344 +               } else {
345 +                       char *last_arg_conf = arg_conf;
346 +                       arg_conf = NULL;
347 +                       arg_conf_len = asprintf(&arg_conf, "%s\ntimeout %d;", last_arg_conf, timeout_arg);
348 +
349 +                       if ((arg_conf == 0) || (arg_conf_len == 0))
350 +                               log_fatal("Unable to process --timeout timeout argument");
351 +
352 +                       free(last_arg_conf);
353 +               }
354 +       }
355 +
356 +       if ((dhcp_vendor_class_identifier_arg != NULL) && (*dhcp_vendor_class_identifier_arg != '\0')) {
357 +               if (arg_conf == 0) {
358 +                       arg_conf_len = asprintf(&arg_conf,  "send vendor-class-identifier \"%s\";", dhcp_vendor_class_identifier_arg);
359 +
360 +                       if ((arg_conf == 0) || (arg_conf_len <= 0))
361 +                               log_fatal("Unable to send -V option vendor-class-identifier");
362 +               } else {
363 +                       char *last_arg_conf = arg_conf;
364 +                       arg_conf = NULL;
365 +                       arg_conf_len = asprintf(&arg_conf, "%s\nsend vendor-class-identifier \"%s\";", last_arg_conf, dhcp_vendor_class_identifier_arg);
366 +
367 +                       if ((arg_conf == 0) || (arg_conf_len <= 0))
368 +                               log_fatal("Unable to send -V option vendor-class-identifier");
369 +
370 +                       free(last_arg_conf);
371 +               }
372 +       }
373 +
374 +       if (dhclient_request_options != NULL) {
375 +               if (arg_conf == 0) {
376 +                       arg_conf_len = asprintf(&arg_conf,  "request %s;", dhclient_request_options);
377 +
378 +                       if ((arg_conf == 0) || (arg_conf_len <= 0))
379 +                               log_fatal("Unable to parse --request-options <request options list> argument");
380 +               } else {
381 +                       char *last_arg_conf = arg_conf;
382 +                       arg_conf = NULL;
383 +                       arg_conf_len = asprintf(&arg_conf, "%s\nrequest %s;", last_arg_conf, dhclient_request_options);
384 +
385 +                       if ((arg_conf == 0)  || (arg_conf_len <= 0))
386 +                               log_fatal("Unable to parse --request-options <request options list> argument");
387 +
388 +                       free(last_arg_conf);
389 +               }
390 +       }
391 +
392 +       if (arg_conf) {
393 +               if (arg_conf_len == 0)
394 +                       if ((arg_conf_len = strlen(arg_conf)) == 0)
395 +                               /* huh ? cannot happen ! */
396 +                               log_fatal("Unable to process -C/-H/-F/--timeout/-V/--request-options configuration arguments");
397 +
398 +               /* parse the extra dhclient.conf configuration arguments
399 +                * into top level config: */
400 +               struct parse *cfile = (struct parse *)0;
401 +               const char *val = NULL;
402 +               int token;
403 +
404 +               status = new_parse(&cfile, -1, arg_conf, arg_conf_len, "extra dhclient -C/-H/-F/--timeout/-V/--request-options configuration arguments", 0);
405 +
406 +               if ((status != ISC_R_SUCCESS) || (cfile -> warnings_occurred))
407 +                       log_fatal("Cannot parse -C/-H/-F/--timeout/-V/--request-options configuration arguments !");
408 +               /* more detailed parse failures will be logged */
409 +
410 +               do {
411 +                       token = peek_token(&val, (unsigned *)0, cfile);
412 +                       if (token == END_OF_FILE)
413 +                               break;
414 +
415 +                       parse_client_statement(cfile, (struct interface_info *)0, &top_level_config);
416 +               } while (1);
417 +
418 +               if (cfile -> warnings_occurred)
419 +                       log_fatal("Cannot parse -C/-H/-F/--timeout/-V/--request-options configuration arguments !");
420 +               end_parse(&cfile);
421 +
422 +               if (timeout_arg) {
423 +                       /* we just set the toplevel timeout, but per-client
424 +                        * timeouts may still be at defaults.
425 +                        */
426 +                       for (ip=interfaces; ip; ip = ip->next) {
427 +                               if (ip->client->config->timeout == 60)
428 +                                       ip->client->config->timeout = timeout_arg;
429 +                       }
430 +               }
431 +
432 +               if ((dhclient_request_options != 0) && (top_level_config.requested_options != default_requested_options)) {
433 +                       for (ip=interfaces; ip; ip = ip->next) {
434 +                               if (ip->client->config->requested_options == default_requested_options)
435 +                                       ip->client->config->requested_options = top_level_config.requested_options;
436 +                       }
437 +               }
438 +
439 +               free(arg_conf);
440 +               arg_conf = NULL;
441 +               arg_conf_len = 0;
442 +       }
443 +
444         /* Parse the lease database. */
445         read_client_leases();
446  
447 @@ -991,7 +1249,7 @@ main(int argc, char **argv) {
448                                                  *whole seconds
449                                                  */
450                                                 add_timeout(&tv, state_reboot,
451 -                                                           client, 0, 0);
452 +                                                           client, 0, 0);
453                                         } else {
454                                                 state_reboot(client);
455                                         }
456 @@ -1771,11 +2029,11 @@ void bootp (packet)
457              ap; ap = ap -> next) {
458                 if (addr_match(&packet->client_addr, &ap->match)) {
459  
460 -                       /* piaddr() returns its result in a static
461 +                       /* piaddr() returns its result in a static
462                            buffer sized 4*16 (see common/inet.c). */
463  
464 -                       strcpy(addrbuf, piaddr(ap->match.addr));
465 -                       strcpy(maskbuf, piaddr(ap->match.mask));
466 +                       strcpy(addrbuf, piaddr(ap->match.addr));
467 +                       strcpy(maskbuf, piaddr(ap->match.mask));
468  
469                         log_info("BOOTREPLY from %s rejected by rule %s "
470                                  "mask %s.", piaddr(packet->client_addr),
471 @@ -1823,11 +2081,11 @@ void dhcp (packet)
472              ap; ap = ap -> next) {
473                 if (addr_match(&packet->client_addr, &ap->match)) {
474  
475 -                       /* piaddr() returns its result in a static
476 +                       /* piaddr() returns its result in a static
477                            buffer sized 4*16 (see common/inet.c). */
478  
479 -                       strcpy(addrbuf, piaddr(ap->match.addr));
480 -                       strcpy(maskbuf, piaddr(ap->match.mask));
481 +                       strcpy(addrbuf, piaddr(ap->match.addr));
482 +                       strcpy(maskbuf, piaddr(ap->match.mask));
483  
484                         log_info("%s from %s rejected by rule %s mask %s.",
485                                  type, piaddr(packet->client_addr),
486 @@ -3403,7 +3661,8 @@ void make_discover (client, lease)
487         client -> packet.xid = random ();
488         client -> packet.secs = 0; /* filled in by send_discover. */
489  
490 -       if (can_receive_unicast_unconfigured (client -> interface))
491 +       if ((!(bootp_broadcast_always || client->config->bootp_broadcast_always))
492 +           && can_receive_unicast_unconfigured(client->interface))
493                 client -> packet.flags = 0;
494         else
495                 client -> packet.flags = htons (BOOTP_BROADCAST);
496 @@ -3488,7 +3747,9 @@ void make_request (client, lease)
497         } else {
498                 memset (&client -> packet.ciaddr, 0,
499                         sizeof client -> packet.ciaddr);
500 -               if (can_receive_unicast_unconfigured (client -> interface))
501 +               if ((!(bootp_broadcast_always ||
502 +                   client ->config->bootp_broadcast_always)) &&
503 +                   can_receive_unicast_unconfigured (client -> interface))
504                         client -> packet.flags = 0;
505                 else
506                         client -> packet.flags = htons (BOOTP_BROADCAST);
507 @@ -3551,7 +3812,8 @@ void make_decline (client, lease)
508         client -> packet.hops = 0;
509         client -> packet.xid = client -> xid;
510         client -> packet.secs = 0; /* Filled in by send_request. */
511 -       if (can_receive_unicast_unconfigured (client -> interface))
512 +       if ((!(bootp_broadcast_always || client->config-> bootp_broadcast_always))
513 +           && can_receive_unicast_unconfigured (client->interface))
514                 client -> packet.flags = 0;
515         else
516                 client -> packet.flags = htons (BOOTP_BROADCAST);
517 diff -urNp -x '*.orig' dhcp-4.4.2.org/common/conflex.c dhcp-4.4.2/common/conflex.c
518 --- dhcp-4.4.2.org/common/conflex.c     2020-01-21 20:21:48.000000000 +0100
519 +++ dhcp-4.4.2/common/conflex.c 2021-05-15 22:10:03.054906758 +0200
520 @@ -832,6 +832,8 @@ intern(char *atom, enum dhcp_token dfv)
521                 if (!strcasecmp(atom+1, "ig-endian")) {
522                         return TOKEN_BIG_ENDIAN;
523                 }
524 +               if (!strcasecmp (atom + 1, "ootp-broadcast-always"))
525 +                       return BOOTP_BROADCAST_ALWAYS;
526                 break;
527               case 'c':
528                 if (!strcasecmp(atom + 1, "ase"))
529 diff -urNp -x '*.orig' dhcp-4.4.2.org/includes/dhcpd.h dhcp-4.4.2/includes/dhcpd.h
530 --- dhcp-4.4.2.org/includes/dhcpd.h     2021-05-15 22:10:02.951572212 +0200
531 +++ dhcp-4.4.2/includes/dhcpd.h 2021-05-15 22:10:03.054906758 +0200
532 @@ -1279,6 +1279,9 @@ struct client_config {
533  
534         int lease_id_format;            /* format for IDs in lease file,
535                                            TOKEN_OCTAL or TOKEN_HEX */
536 +
537 +       int bootp_broadcast_always;     /* If nonzero, always set the BOOTP_BROADCAST
538 +                                          flag in requests */
539  };
540  
541  /* Per-interface state used in the dhcp client... */
542 diff -urNp -x '*.orig' dhcp-4.4.2.org/includes/dhctoken.h dhcp-4.4.2/includes/dhctoken.h
543 --- dhcp-4.4.2.org/includes/dhctoken.h  2020-01-21 20:21:48.000000000 +0100
544 +++ dhcp-4.4.2/includes/dhctoken.h      2021-05-15 22:10:03.054906758 +0200
545 @@ -376,7 +376,8 @@ enum dhcp_token {
546         LEASE_ID_FORMAT = 676,
547         TOKEN_HEX = 677,
548         TOKEN_OCTAL = 678,
549 -       KEY_ALGORITHM = 679
550 +       KEY_ALGORITHM = 679,
551 +       BOOTP_BROADCAST_ALWAYS = 680
552  };
553  
554  #define is_identifier(x)       ((x) >= FIRST_TOKEN &&  \
This page took 0.123991 seconds and 4 git commands to generate.