]> git.ipfire.org Git - ipfire-3.x.git/blame - dhcp/patches/dhcp-4.2.4-P1-dhclient6-leases_semicolon_expected.patch
nss-myhostname: Remove package.
[ipfire-3.x.git] / dhcp / patches / dhcp-4.2.4-P1-dhclient6-leases_semicolon_expected.patch
CommitLineData
444c1184
MT
1diff -up dhcp-4.2.4-P1/client/dhclient.c.dhclient6-leases_semicolon dhcp-4.2.4-P1/client/dhclient.c
2--- dhcp-4.2.4-P1/client/dhclient.c.dhclient6-leases_semicolon 2012-07-25 15:20:22.187164614 +0200
3+++ dhcp-4.2.4-P1/client/dhclient.c 2012-07-25 15:20:26.648152028 +0200
4@@ -3236,10 +3236,21 @@ void write_lease_option (struct option_c
5 }
6 if (evaluate_option_cache (&ds, packet, lease, client_state,
7 in_options, cfg_options, scope, oc, MDL)) {
8- fprintf(leaseFile, "%soption %s%s%s %s;\n", preamble,
9- name, dot, oc->option->name,
10- pretty_print_option(oc->option, ds.data, ds.len,
11- 1, 1));
12+ /* The option name */
13+ fprintf(leaseFile, "%soption %s%s%s", preamble,
14+ name, dot, oc->option->name);
15+
16+ /* The option value if there is one */
17+ if ((oc->option->format == NULL) ||
18+ (oc->option->format[0] != 'Z')) {
19+ fprintf(leaseFile, " %s",
20+ pretty_print_option(oc->option, ds.data,
21+ ds.len, 1, 1));
22+ }
23+
24+ /* The closing semi-colon and newline */
25+ fprintf(leaseFile, ";\n");
26+
27 data_string_forget (&ds, MDL);
28 }
29 }
30diff -up dhcp-4.2.4-P1/common/parse.c.dhclient6-leases_semicolon dhcp-4.2.4-P1/common/parse.c
31--- dhcp-4.2.4-P1/common/parse.c.dhclient6-leases_semicolon 2012-07-25 15:10:39.683557386 +0200
32+++ dhcp-4.2.4-P1/common/parse.c 2012-07-25 15:16:50.826762985 +0200
33@@ -5772,7 +5772,7 @@ int parse_option_decl (oc, cfile)
34 goto alloc;
35
36 case 'Z': /* Zero-length option */
37- token = next_token(&val, (unsigned *)0, cfile);
38+ token = peek_token(&val, (unsigned *)0, cfile);
39 if (token != SEMI) {
40 parse_warn(cfile,
41 "semicolon expected.");