diff --git a/add-a-test-case-to-parse-code93-in-option_unittest.patch b/add-a-test-case-to-parse-code93-in-option_unittest.patch index b1ae36c6d7a4e256c16b5ee882c24b4929e0de55..3070344c2a671b0b7a344b29161232a4b12e5ee9 100644 --- a/add-a-test-case-to-parse-code93-in-option_unittest.patch +++ b/add-a-test-case-to-parse-code93-in-option_unittest.patch @@ -4,14 +4,14 @@ Date: Tue, 10 Nov 2020 02:10:57 -0500 Subject: [PATCH] add a test case to parse code93 in option_unittest --- - common/tests/option_unittest.c | 70 ++++++++++++++++++++++++++++++++++ - 1 file changed, 70 insertions(+) + common/tests/option_unittest.c | 71 ++++++++++++++++++++++++++++++++++ + 1 file changed, 71 insertions(+) diff --git a/common/tests/option_unittest.c b/common/tests/option_unittest.c -index cd52cfb..0bb6517 100644 +index 600ebe6..688762d 100644 --- a/common/tests/option_unittest.c +++ b/common/tests/option_unittest.c -@@ -129,6 +129,75 @@ ATF_TC_BODY(pretty_print_option, tc) +@@ -213,6 +213,76 @@ ATF_TC_BODY(parse_X, tc) } } @@ -84,17 +84,18 @@ index cd52cfb..0bb6517 100644 + atf_tc_fail("pretty_print_option did not return \"\""); + } +} - ++ /* This macro defines main() method that will call specified test cases. tp and simple_test_case names can be whatever you want -@@ -137,6 +206,7 @@ ATF_TP_ADD_TCS(tp) - { + as long as it is a valid variable identifier. */ +@@ -221,6 +291,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, option_refcnt); ATF_TP_ADD_TC(tp, pretty_print_option); + ATF_TP_ADD_TC(tp, parse_X); + ATF_TP_ADD_TC(tp, parse_code93_option); return (atf_no_error()); } -- -2.19.1 +2.23.0 diff --git a/backport-0002-additional-dhclient-options.patch b/backport-0002-additional-dhclient-options.patch index 3808b320dd9465f80e116ea1b8bf6e5e48b24479..f28acb2d6d5b433f9e1474f578249d32e23b8577 100644 --- a/backport-0002-additional-dhclient-options.patch +++ b/backport-0002-additional-dhclient-options.patch @@ -1,24 +1,24 @@ -Reference: https://src.fedoraproject.org/rpms/dhcp/blob/rawhide/f/0002-additional-dhclient-options.patch -From a26161b0fd45cdbeed3038ac63ff04e3b727248f Mon Sep 17 00:00:00 2001 +Reference: +https://src.fedoraproject.org/rpms/dhcp/blob/rawhide/f/0002-additional-dhclient-options.patch +From af18c830fe55f6be0b89997a36b611d981e3c25d Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Thu, 21 Feb 2019 10:19:47 +0100 -Subject: [PATCH 02/26] additional dhclient options -Cc: pzhukov@redhat.com +Subject: [PATCH 02/28] additional dhclient options --- client/clparse.c | 10 +- - client/dhclient.8 | 27 ++++++ - client/dhclient.c | 271 +++++++++++++++++++++++++++++++++++++++++++++++++++- + client/dhclient.8 | 27 +++++ + client/dhclient.c | 271 +++++++++++++++++++++++++++++++++++++++++++- common/conflex.c | 2 + includes/dhcpd.h | 3 + - includes/dhctoken.h | 1 + - 6 files changed, 308 insertions(+), 6 deletions(-) + includes/dhctoken.h | 3 +- + 6 files changed, 309 insertions(+), 7 deletions(-) diff --git a/client/clparse.c b/client/clparse.c -index eaf48a8..7212e3a 100644 +index 74ca499..bb63825 100644 --- a/client/clparse.c +++ b/client/clparse.c -@@ -189,6 +189,7 @@ isc_result_t read_client_conf () +@@ -192,6 +192,7 @@ isc_result_t read_client_conf () /* Requested lease time, used by DHCPv6 (DHCPv4 uses the option cache) */ top_level_config.requested_lease = 7200; @@ -26,7 +26,7 @@ index eaf48a8..7212e3a 100644 group_allocate (&top_level_config.on_receipt, MDL); if (!top_level_config.on_receipt) -@@ -394,7 +395,8 @@ void read_client_leases () +@@ -397,7 +398,8 @@ void read_client_leases () interface-declaration | LEASE client-lease-statement | ALIAS client-lease-statement | @@ -36,7 +36,7 @@ index eaf48a8..7212e3a 100644 void parse_client_statement (cfile, ip, config) struct parse *cfile; -@@ -817,6 +819,12 @@ void parse_client_statement (cfile, ip, config) +@@ -820,6 +822,12 @@ void parse_client_statement (cfile, ip, config) parse_lease_id_format(cfile); break; @@ -50,10 +50,10 @@ index eaf48a8..7212e3a 100644 default: lose = 0; diff --git a/client/dhclient.8 b/client/dhclient.8 -index ebc750f..6d7fbdb 100644 +index 861ff56..5029dac 100644 --- a/client/dhclient.8 +++ b/client/dhclient.8 -@@ -134,6 +134,33 @@ dhclient - Dynamic Host Configuration Protocol Client +@@ -135,6 +135,33 @@ dhclient - Dynamic Host Configuration Protocol Client .B -w ] [ @@ -88,7 +88,7 @@ index ebc750f..6d7fbdb 100644 .I seconds ] diff --git a/client/dhclient.c b/client/dhclient.c -index 825ab00..26a333c 100644 +index 46dc3a7..6c1c09a 100644 --- a/client/dhclient.c +++ b/client/dhclient.c @@ -41,6 +41,12 @@ @@ -104,7 +104,7 @@ index 825ab00..26a333c 100644 TIME default_lease_time = 43200; /* 12 hours... */ TIME max_lease_time = 86400; /* 24 hours... */ -@@ -110,6 +116,10 @@ char *mockup_relay = NULL; +@@ -113,6 +119,10 @@ char *mockup_relay = NULL; char *progname = NULL; @@ -115,7 +115,7 @@ index 825ab00..26a333c 100644 void run_stateless(int exit_mode, u_int16_t port); static isc_result_t write_duid(struct data_string *duid); -@@ -183,8 +193,12 @@ static const char use_v6command[] = "Command not used for DHCPv4: %s"; +@@ -189,8 +199,12 @@ static const char use_v6command[] = "Command not used for DHCPv4: %s"; " [-s server-addr] [-cf config-file]\n" \ " [-df duid-file] [-lf lease-file]\n" \ " [-pf pid-file] [--no-pid] [-e VAR=val]\n" \ @@ -130,7 +130,7 @@ index 825ab00..26a333c 100644 #define DHCLIENT_USAGEH "{--version|--help|-h}" static void -@@ -243,6 +257,16 @@ main(int argc, char **argv) { +@@ -249,6 +263,16 @@ main(int argc, char **argv) { #else progname = argv[0]; #endif @@ -147,7 +147,7 @@ index 825ab00..26a333c 100644 /* Initialize client globals. */ memset(&default_duid, 0, sizeof(default_duid)); -@@ -558,6 +582,89 @@ main(int argc, char **argv) { +@@ -564,6 +588,89 @@ main(int argc, char **argv) { std_dhcid = 1; } else if (!strcmp(argv[i], "-v")) { quiet = 0; @@ -237,7 +237,7 @@ index 825ab00..26a333c 100644 } else if (argv[i][0] == '-') { usage("Unknown command: %s", argv[i]); } else if (interfaces_requested < 0) { -@@ -754,6 +861,156 @@ main(int argc, char **argv) { +@@ -760,6 +867,156 @@ main(int argc, char **argv) { /* Parse the dhclient.conf file. */ read_client_conf(); @@ -394,7 +394,7 @@ index 825ab00..26a333c 100644 /* Parse the lease database. */ read_client_leases(); -@@ -3226,7 +3483,8 @@ void make_discover (client, lease) +@@ -3472,7 +3729,8 @@ void make_discover (client, lease) client -> packet.xid = random (); client -> packet.secs = 0; /* filled in by send_discover. */ @@ -404,7 +404,7 @@ index 825ab00..26a333c 100644 client -> packet.flags = 0; else client -> packet.flags = htons (BOOTP_BROADCAST); -@@ -3311,7 +3569,9 @@ void make_request (client, lease) +@@ -3557,7 +3815,9 @@ void make_request (client, lease) } else { memset (&client -> packet.ciaddr, 0, sizeof client -> packet.ciaddr); @@ -415,7 +415,7 @@ index 825ab00..26a333c 100644 client -> packet.flags = 0; else client -> packet.flags = htons (BOOTP_BROADCAST); -@@ -3374,7 +3634,8 @@ void make_decline (client, lease) +@@ -3620,7 +3880,8 @@ void make_decline (client, lease) client -> packet.hops = 0; client -> packet.xid = client -> xid; client -> packet.secs = 0; /* Filled in by send_request. */ @@ -426,7 +426,7 @@ index 825ab00..26a333c 100644 else client -> packet.flags = htons (BOOTP_BROADCAST); diff --git a/common/conflex.c b/common/conflex.c -index 045b655..71c0bf5 100644 +index 8b01dfb..1fa2be3 100644 --- a/common/conflex.c +++ b/common/conflex.c @@ -832,6 +832,8 @@ intern(char *atom, enum dhcp_token dfv) { @@ -439,10 +439,10 @@ index 045b655..71c0bf5 100644 case 'c': if (!strcasecmp(atom + 1, "ase")) diff --git a/includes/dhcpd.h b/includes/dhcpd.h -index 5930e6a..018fa34 100644 +index f68b228..3b2e2ca 100644 --- a/includes/dhcpd.h +++ b/includes/dhcpd.h -@@ -1269,6 +1269,9 @@ struct client_config { +@@ -1284,6 +1284,9 @@ struct client_config { int lease_id_format; /* format for IDs in lease file, TOKEN_OCTAL or TOKEN_HEX */ @@ -453,17 +453,19 @@ index 5930e6a..018fa34 100644 /* Per-interface state used in the dhcp client... */ diff --git a/includes/dhctoken.h b/includes/dhctoken.h -index 5920f4f..7e7215a 100644 +index e6d125f..6daa422 100644 --- a/includes/dhctoken.h +++ b/includes/dhctoken.h -@@ -377,6 +377,7 @@ enum dhcp_token { +@@ -377,7 +377,8 @@ enum dhcp_token { TOKEN_HEX = 677, TOKEN_OCTAL = 678, - KEY_ALGORITHM = 679 -+ BOOTP_BROADCAST_ALWAYS = 680 + KEY_ALGORITHM = 679, +- DISCONNECT = 680 ++ BOOTP_BROADCAST_ALWAYS = 680, ++ DISCONNECT = 681 }; #define is_identifier(x) ((x) >= FIRST_TOKEN && \ -- -2.14.5 +2.35.1 diff --git a/backport-0003-Handle-releasing-interfaces-requested-by-sbin-ifup.patch b/backport-0003-Handle-releasing-interfaces-requested-by-sbin-ifup.patch index f9e07070a5faadcd13fa24c212ee74bff1b22346..b2fce6e5a07cb0acc40ae2f01d1a40271b2e86da 100644 --- a/backport-0003-Handle-releasing-interfaces-requested-by-sbin-ifup.patch +++ b/backport-0003-Handle-releasing-interfaces-requested-by-sbin-ifup.patch @@ -1,19 +1,18 @@ Reference: https://src.fedoraproject.org/rpms/dhcp/blob/rawhide/f/0003-Handle-releasing-interfaces-requested-by-sbin-ifup.patch -From af504e99abde04b881768d18eaa0054b36b16303 Mon Sep 17 00:00:00 2001 +From be8f73c399c0f89192e57453db153aaa48fcbb2e Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Thu, 21 Feb 2019 10:21:14 +0100 -Subject: [PATCH 03/26] Handle releasing interfaces requested by /sbin/ifup -Cc: pzhukov@redhat.com +Subject: [PATCH 03/28] Handle releasing interfaces requested by /sbin/ifup --- - client/dhclient.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + client/dhclient.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/client/dhclient.c b/client/dhclient.c -index 26a333c..2a2e9e6 100644 +index 6c1c09a..07679a7 100644 --- a/client/dhclient.c +++ b/client/dhclient.c -@@ -787,9 +787,81 @@ main(int argc, char **argv) { +@@ -793,9 +793,81 @@ main(int argc, char **argv) { } } fclose(pidfd); @@ -96,5 +95,5 @@ index 26a333c..2a2e9e6 100644 log_info("%s %s", message, PACKAGE_VERSION); log_info(copyright); -- -2.14.5 +2.35.1 diff --git a/backport-0004-Support-unicast-BOOTP-for-IBM-pSeries-systems-and-ma.patch b/backport-0004-Support-unicast-BOOTP-for-IBM-pSeries-systems-and-ma.patch index 79d2078ec9ab89a3feb14163ab7e43ccc3634883..1afad646de16f5436b4cb16c98571d366df6c27d 100644 --- a/backport-0004-Support-unicast-BOOTP-for-IBM-pSeries-systems-and-ma.patch +++ b/backport-0004-Support-unicast-BOOTP-for-IBM-pSeries-systems-and-ma.patch @@ -1,10 +1,9 @@ Reference: https://src.fedoraproject.org/rpms/dhcp/blob/rawhide/f/0004-Support-unicast-BOOTP-for-IBM-pSeries-systems-and-ma.patch -From 7e8cc8388ac31c5c2b1a423c6b2da0491b19f6f9 Mon Sep 17 00:00:00 2001 +From 0a640394cb6f4a97fb87e53f049fba23523035c8 Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Thu, 21 Feb 2019 10:22:41 +0100 -Subject: [PATCH 04/26] Support unicast BOOTP for IBM pSeries systems (and +Subject: [PATCH 04/28] Support unicast BOOTP for IBM pSeries systems (and maybe others) -Cc: pzhukov@redhat.com --- server/bootp.c | 12 +++++++++++- @@ -12,7 +11,7 @@ Cc: pzhukov@redhat.com 2 files changed, 37 insertions(+), 8 deletions(-) diff --git a/server/bootp.c b/server/bootp.c -index 26a7607..2212f31 100644 +index 919d483..338aac0 100644 --- a/server/bootp.c +++ b/server/bootp.c @@ -52,6 +52,7 @@ void bootp (packet) @@ -49,10 +48,10 @@ index 26a7607..2212f31 100644 /* If it comes from a client that already knows its address and is not requesting a broadcast response, and we can diff --git a/server/dhcp.c b/server/dhcp.c -index 6f3a91f..20f2a62 100644 +index 0b261c2..ae805a6 100644 --- a/server/dhcp.c +++ b/server/dhcp.c -@@ -5224,6 +5224,7 @@ int locate_network (packet) +@@ -5332,6 +5332,7 @@ int locate_network (packet) struct data_string data; struct subnet *subnet = (struct subnet *)0; struct option_cache *oc; @@ -60,7 +59,7 @@ index 6f3a91f..20f2a62 100644 #if defined(DHCPv6) && defined(DHCP4o6) if (dhcpv4_over_dhcpv6 && (packet->dhcp4o6_response != NULL)) { -@@ -5245,12 +5246,24 @@ int locate_network (packet) +@@ -5353,12 +5354,24 @@ int locate_network (packet) from the interface, if there is one. If not, fail. */ if (!oc && !packet -> raw -> giaddr.s_addr) { if (packet -> interface -> shared_network) { @@ -90,7 +89,7 @@ index 6f3a91f..20f2a62 100644 } /* If there's an option indicating link connection, and it's valid, -@@ -5277,7 +5290,10 @@ int locate_network (packet) +@@ -5384,7 +5397,10 @@ int locate_network (packet) data_string_forget (&data, MDL); } else { ia.len = 4; @@ -102,7 +101,7 @@ index 6f3a91f..20f2a62 100644 } /* If we know the subnet on which the IP address lives, use it. */ -@@ -5285,7 +5301,10 @@ int locate_network (packet) +@@ -5392,7 +5408,10 @@ int locate_network (packet) shared_network_reference (&packet -> shared_network, subnet -> shared_network, MDL); subnet_dereference (&subnet, MDL); @@ -115,5 +114,5 @@ index 6f3a91f..20f2a62 100644 /* Otherwise, fail. */ -- -2.14.5 +2.35.1 diff --git a/backport-0005-Change-default-requested-options.patch b/backport-0005-Change-default-requested-options.patch index 06fee039556cd19e637ab8f52eb99d3f1c2f5204..71c6e7608b4e1b1b1f2e1320e180a0424798adc7 100644 --- a/backport-0005-Change-default-requested-options.patch +++ b/backport-0005-Change-default-requested-options.patch @@ -1,9 +1,8 @@ Reference: https://src.fedoraproject.org/rpms/dhcp/blob/rawhide/f/0005-Change-default-requested-options.patch -From a2a3554ff9e05d1a8e2c8aa843f1b6a33fce87e3 Mon Sep 17 00:00:00 2001 +From f994c4d208a8fe88cbf78d4374c8d44793f0598e Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Thu, 21 Feb 2019 10:24:24 +0100 -Subject: [PATCH 05/26] Change default requested options -Cc: pzhukov@redhat.com +Subject: [PATCH 05/28] Change default requested options Add NIS domain, NIS servers, NTP servers, interface-mtu and domain-search to the list of default requested DHCP options @@ -12,7 +11,7 @@ to the list of default requested DHCP options 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/client/clparse.c b/client/clparse.c -index 7212e3a..39b95a0 100644 +index bb63825..e63ea08 100644 --- a/client/clparse.c +++ b/client/clparse.c @@ -31,7 +31,7 @@ @@ -24,7 +23,7 @@ index 7212e3a..39b95a0 100644 /* There can be 2 extra requested options for DHCPv4-over-DHCPv6. */ struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 2 + 1]; -@@ -116,6 +116,31 @@ isc_result_t read_client_conf () +@@ -119,6 +119,31 @@ isc_result_t read_client_conf () option_code_hash_lookup(&default_requested_options[8], dhcpv6_universe.code_hash, &code, 0, MDL); @@ -57,5 +56,5 @@ index 7212e3a..39b95a0 100644 if (default_requested_options[code] == NULL) log_fatal("Unable to find option definition for " -- -2.14.5 +2.35.1 diff --git a/backport-0006-Various-man-page-only-fixes.patch b/backport-0006-Various-man-page-only-fixes.patch index 128b5e3d11b6c5948f8a2a9993908cbecb1efcfc..f4f44a3ae22cc4ddcd9b0f55450e5e70db052597 100644 --- a/backport-0006-Various-man-page-only-fixes.patch +++ b/backport-0006-Various-man-page-only-fixes.patch @@ -1,9 +1,8 @@ Reference: https://src.fedoraproject.org/rpms/dhcp/blob/rawhide/f/0006-Various-man-page-only-fixes.patch -From 846779467f7393b19e8d206405116e1e26e16efc Mon Sep 17 00:00:00 2001 +From d359a7dc30e0423f9b90129291538cad1ee6a6d9 Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Thu, 21 Feb 2019 10:25:53 +0100 -Subject: [PATCH 06/26] Various man-page-only fixes -Cc: pzhukov@redhat.com +Subject: [PATCH 06/28] Various man-page-only fixes --- client/dhclient-script.8 | 22 +++++++++++++++++++++- @@ -13,7 +12,7 @@ Cc: pzhukov@redhat.com 4 files changed, 58 insertions(+), 7 deletions(-) diff --git a/client/dhclient-script.8 b/client/dhclient-script.8 -index 3553afd..0db5516 100644 +index 5e5bd3d..37ecdc5 100644 --- a/client/dhclient-script.8 +++ b/client/dhclient-script.8 @@ -43,7 +43,7 @@ customizations are needed, they should be possible using the enter and @@ -53,7 +52,7 @@ index 3553afd..0db5516 100644 When dhclient needs to invoke the client configuration script, it defines a set of variables in the environment, and then invokes diff --git a/client/dhclient.conf.5 b/client/dhclient.conf.5 -index fa3b908..566a881 100644 +index dbe6f7e..8bac980 100644 --- a/client/dhclient.conf.5 +++ b/client/dhclient.conf.5 @@ -228,7 +228,8 @@ responding to the client send the client its values for the specified @@ -85,10 +84,10 @@ index fa3b908..566a881 100644 .SH SAMPLE The following configuration file was used on a laptop running NetBSD diff --git a/common/dhcp-options.5 b/common/dhcp-options.5 -index 33d4804..d9e1197 100644 +index 51f80f7..a784b32 100644 --- a/common/dhcp-options.5 +++ b/common/dhcp-options.5 -@@ -1068,6 +1068,21 @@ classless IP routing - it does not include a subnet mask. Since +@@ -1075,6 +1075,21 @@ classless IP routing - it does not include a subnet mask. Since classless IP routing is now the most widely deployed routing standard, this option is virtually useless, and is not implemented by any of the popular DHCP clients, for example the Microsoft DHCP client. @@ -111,7 +110,7 @@ index 33d4804..d9e1197 100644 .PP .nf diff --git a/server/dhcpd.conf.5 b/server/dhcpd.conf.5 -index 17330d4..89b5540 100644 +index 691e5dd..b7e79ea 100644 --- a/server/dhcpd.conf.5 +++ b/server/dhcpd.conf.5 @@ -527,6 +527,9 @@ pool { @@ -154,7 +153,7 @@ index 17330d4..89b5540 100644 secret pRP5FapFoJ95JEL06sv4PQ==; }; -@@ -2912,7 +2915,8 @@ statement +@@ -2918,7 +2921,8 @@ statement The \fInext-server\fR statement is used to specify the host address of the server from which the initial boot file (specified in the \fIfilename\fR statement) is to be loaded. \fIServer-name\fR should @@ -165,5 +164,5 @@ index 17330d4..89b5540 100644 .PP The -- -2.14.5 +2.35.1 diff --git a/backport-0007-Change-paths-to-conform-to-our-standards.patch b/backport-0007-Change-paths-to-conform-to-our-standards.patch index 1ff878abcbed6cc5568235fc4bcef578488ab93a..a07f404af51552152c66bd51c0a5d46876f77cf8 100644 --- a/backport-0007-Change-paths-to-conform-to-our-standards.patch +++ b/backport-0007-Change-paths-to-conform-to-our-standards.patch @@ -1,9 +1,8 @@ Reference: https://src.fedoraproject.org/rpms/dhcp/blob/rawhide/f/0007-Change-paths-to-conform-to-our-standards.patch -From ac65289663532db0bc1de449ca2a0eb4c8c2ca6f Mon Sep 17 00:00:00 2001 +From d8da92991d93a3d1c9fc474696aee25b99623c42 Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Thu, 21 Feb 2019 10:26:34 +0100 -Subject: [PATCH 07/26] Change paths to conform to our standards -Cc: pzhukov@redhat.com +Subject: [PATCH 07/28] Change paths to conform to our standards --- doc/examples/dhcpd-dhcpv6.conf | 2 +- @@ -24,10 +23,10 @@ index 448a6a6..2357824 100644 # Static definition (must be global) host myclient { diff --git a/includes/dhcpd.h b/includes/dhcpd.h -index 018fa34..3632a6b 100644 +index 3b2e2ca..4a57002 100644 --- a/includes/dhcpd.h +++ b/includes/dhcpd.h -@@ -1545,7 +1545,7 @@ typedef unsigned char option_mask [16]; +@@ -1561,7 +1561,7 @@ typedef unsigned char option_mask [16]; #else /* !DEBUG */ #ifndef _PATH_DHCPD_CONF @@ -36,7 +35,7 @@ index 018fa34..3632a6b 100644 #endif /* DEBUG */ #ifndef _PATH_DHCPD_DB -@@ -1567,11 +1567,11 @@ typedef unsigned char option_mask [16]; +@@ -1583,11 +1583,11 @@ typedef unsigned char option_mask [16]; #endif /* DEBUG */ #ifndef _PATH_DHCLIENT_CONF @@ -51,5 +50,5 @@ index 018fa34..3632a6b 100644 #ifndef _PATH_DHCLIENT_PID -- -2.14.5 +2.35.1 diff --git a/backport-0008-Make-sure-all-open-file-descriptors-are-closed-on-ex.patch b/backport-0008-Make-sure-all-open-file-descriptors-are-closed-on-ex.patch index 91a7cc0da3af918ada33275b845b7c8b6085b732..f9f4f025c3a2dbd263389afc854f197f588e2552 100644 --- a/backport-0008-Make-sure-all-open-file-descriptors-are-closed-on-ex.patch +++ b/backport-0008-Make-sure-all-open-file-descriptors-are-closed-on-ex.patch @@ -1,10 +1,9 @@ Reference: https://src.fedoraproject.org/rpms/dhcp/blob/rawhide/f/0008-Make-sure-all-open-file-descriptors-are-closed-on-ex.patch -From d2da34706f140101c34f6a9806c258411806a939 Mon Sep 17 00:00:00 2001 +From 39ce1ca26128f4a5d018a567157320ba1f68f4ea Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Thu, 21 Feb 2019 10:27:18 +0100 -Subject: [PATCH 08/26] Make sure all open file descriptors are closed-on-exec +Subject: [PATCH 08/28] Make sure all open file descriptors are closed-on-exec for SELinux -Cc: pzhukov@redhat.com ISC-bug: #19148 --- @@ -24,10 +23,10 @@ ISC-bug: #19148 13 files changed, 40 insertions(+), 40 deletions(-) diff --git a/client/clparse.c b/client/clparse.c -index 39b95a0..44387ed 100644 +index e63ea08..902b523 100644 --- a/client/clparse.c +++ b/client/clparse.c -@@ -288,7 +288,7 @@ int read_client_conf_file (const char *name, struct interface_info *ip, +@@ -291,7 +291,7 @@ int read_client_conf_file (const char *name, struct interface_info *ip, int token; isc_result_t status; @@ -36,7 +35,7 @@ index 39b95a0..44387ed 100644 return uerr2isc (errno); cfile = NULL; -@@ -364,7 +364,7 @@ void read_client_leases () +@@ -367,7 +367,7 @@ void read_client_leases () /* Open the lease file. If we can't open it, just return - we can safely trust the server to remember our state. */ @@ -46,10 +45,10 @@ index 39b95a0..44387ed 100644 cfile = NULL; diff --git a/client/dhclient.c b/client/dhclient.c -index 2a2e9e6..a86ab9e 100644 +index 07679a7..aefc119 100644 --- a/client/dhclient.c +++ b/client/dhclient.c -@@ -273,11 +273,11 @@ main(int argc, char **argv) { +@@ -279,11 +279,11 @@ main(int argc, char **argv) { /* Make sure that file descriptors 0 (stdin), 1, (stdout), and 2 (stderr) are open. To do this, we assume that when we open a file the lowest available file descriptor is used. */ @@ -64,7 +63,7 @@ index 2a2e9e6..a86ab9e 100644 if (fd == 2) log_perror = 0; /* No sense logging to /dev/null. */ else if (fd != -1) -@@ -765,7 +765,7 @@ main(int argc, char **argv) { +@@ -771,7 +771,7 @@ main(int argc, char **argv) { long temp; int e; @@ -73,7 +72,7 @@ index 2a2e9e6..a86ab9e 100644 e = fscanf(pidfd, "%ld\n", &temp); oldpid = (pid_t)temp; -@@ -820,7 +820,7 @@ main(int argc, char **argv) { +@@ -826,7 +826,7 @@ main(int argc, char **argv) { strncpy(new_path_dhclient_pid, path_dhclient_pid, pfx); sprintf(new_path_dhclient_pid + pfx, "-%s.pid", ip->name); @@ -82,7 +81,7 @@ index 2a2e9e6..a86ab9e 100644 e = fscanf(pidfd, "%ld\n", &temp); oldpid = (pid_t)temp; -@@ -845,7 +845,7 @@ main(int argc, char **argv) { +@@ -851,7 +851,7 @@ main(int argc, char **argv) { int dhc_running = 0; char procfn[256] = ""; @@ -91,7 +90,7 @@ index 2a2e9e6..a86ab9e 100644 if ((fscanf(pidfp, "%ld", &temp)==1) && ((dhcpid=(pid_t)temp) > 0)) { snprintf(procfn,256,"/proc/%u",dhcpid); dhc_running = (access(procfn, F_OK) == 0); -@@ -3808,7 +3808,7 @@ void rewrite_client_leases () +@@ -4054,7 +4054,7 @@ void rewrite_client_leases () if (leaseFile != NULL) fclose (leaseFile); @@ -100,7 +99,7 @@ index 2a2e9e6..a86ab9e 100644 if (leaseFile == NULL) { log_error ("can't create %s: %m", path_dhclient_db); return; -@@ -4003,7 +4003,7 @@ write_duid(struct data_string *duid) +@@ -4249,7 +4249,7 @@ write_duid(struct data_string *duid) return DHCP_R_INVALIDARG; if (leaseFile == NULL) { /* XXX? */ @@ -109,7 +108,7 @@ index 2a2e9e6..a86ab9e 100644 if (leaseFile == NULL) { log_error("can't create %s: %m", path_dhclient_db); return ISC_R_IOERROR; -@@ -4207,7 +4207,7 @@ int write_client_lease (client, lease, rewrite, makesure) +@@ -4453,7 +4453,7 @@ int write_client_lease (client, lease, rewrite, makesure) return 1; if (leaseFile == NULL) { /* XXX */ @@ -118,7 +117,7 @@ index 2a2e9e6..a86ab9e 100644 if (leaseFile == NULL) { log_error ("can't create %s: %m", path_dhclient_db); return 0; -@@ -4786,9 +4786,9 @@ void detach () +@@ -5039,9 +5039,9 @@ void detach () (void) close(2); /* Reopen them on /dev/null. */ @@ -131,7 +130,7 @@ index 2a2e9e6..a86ab9e 100644 write_client_pid_file (); -@@ -4806,14 +4806,14 @@ void write_client_pid_file () +@@ -5059,14 +5059,14 @@ void write_client_pid_file () return; } @@ -149,7 +148,7 @@ index 2a2e9e6..a86ab9e 100644 close(pfdesc); log_error ("Can't fdopen %s: %m", path_dhclient_pid); diff --git a/common/bpf.c b/common/bpf.c -index 16076fe..67b6d64 100644 +index 0bffcbf..d2a0549 100644 --- a/common/bpf.c +++ b/common/bpf.c @@ -94,7 +94,7 @@ int if_register_bpf (info) @@ -162,20 +161,20 @@ index 16076fe..67b6d64 100644 if (errno == EBUSY) { continue; diff --git a/common/dlpi.c b/common/dlpi.c -index 3990bf1..a941258 100644 +index f2332c0..bf6e21f 100644 --- a/common/dlpi.c +++ b/common/dlpi.c @@ -817,7 +817,7 @@ dlpiopen(const char *ifname) { } *dp = '\0'; - + - return open (devname, O_RDWR, 0); + return open (devname, O_RDWR | O_CLOEXEC, 0); } /* diff --git a/common/nit.c b/common/nit.c -index d822c15..a9132bc 100644 +index ba62488..4ebfa4a 100644 --- a/common/nit.c +++ b/common/nit.c @@ -75,7 +75,7 @@ int if_register_nit (info) @@ -188,7 +187,7 @@ index d822c15..a9132bc 100644 log_fatal ("Can't open NIT device for %s: %m", info -> name); diff --git a/common/resolv.c b/common/resolv.c -index a01f520..b209e3f 100644 +index 5fd683f..3535f3e 100644 --- a/common/resolv.c +++ b/common/resolv.c @@ -43,7 +43,7 @@ void read_resolv_conf (parse_time) @@ -201,7 +200,7 @@ index a01f520..b209e3f 100644 return; } diff --git a/common/upf.c b/common/upf.c -index 9785879..e0a524f 100644 +index 37e5cb2..b7c0649 100644 --- a/common/upf.c +++ b/common/upf.c @@ -71,7 +71,7 @@ int if_register_upf (info) @@ -214,7 +213,7 @@ index 9785879..e0a524f 100644 if (errno == EBUSY) { continue; diff --git a/omapip/trace.c b/omapip/trace.c -index 45bd508..5ea7486 100644 +index dc9185f..a605d18 100644 --- a/omapip/trace.c +++ b/omapip/trace.c @@ -136,10 +136,10 @@ isc_result_t trace_begin (const char *filename, @@ -240,10 +239,10 @@ index 45bd508..5ea7486 100644 log_error("Can't open tracefile %s: %m", filename); return; diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c -index d8caaaf..ea1be18 100644 +index 946ef1b..a7b1286 100644 --- a/relay/dhcrelay.c +++ b/relay/dhcrelay.c -@@ -296,11 +296,11 @@ main(int argc, char **argv) { +@@ -305,11 +305,11 @@ main(int argc, char **argv) { /* Make sure that file descriptors 0(stdin), 1,(stdout), and 2(stderr) are open. To do this, we assume that when we open a file the lowest available file descriptor is used. */ @@ -258,7 +257,7 @@ index d8caaaf..ea1be18 100644 if (fd == 2) log_perror = 0; /* No sense logging to /dev/null. */ else if (fd != -1) -@@ -776,13 +776,13 @@ main(int argc, char **argv) { +@@ -800,13 +800,13 @@ main(int argc, char **argv) { /* Create the pid file. */ if (no_pid_file == ISC_FALSE) { pfdesc = open(path_dhcrelay_pid, @@ -275,7 +274,7 @@ index d8caaaf..ea1be18 100644 log_error("Can't fdopen %s: %m", path_dhcrelay_pid); diff --git a/server/confpars.c b/server/confpars.c -index d2cedfe..2743979 100644 +index 103af1e..5a6396b 100644 --- a/server/confpars.c +++ b/server/confpars.c @@ -118,7 +118,7 @@ isc_result_t read_conf_file (const char *filename, struct group *group, @@ -288,7 +287,7 @@ index d2cedfe..2743979 100644 log_error ("Can't open lease database %s: %m --", path_dhcpd_db); diff --git a/server/db.c b/server/db.c -index 67e6cc1..6181528 100644 +index cecbf6b..4243a92 100644 --- a/server/db.c +++ b/server/db.c @@ -1154,7 +1154,7 @@ int new_lease_file (int test_mode) @@ -310,7 +309,7 @@ index 67e6cc1..6181528 100644 close(db_fd); goto fdfail; diff --git a/server/dhcpd.c b/server/dhcpd.c -index 55ffae7..530a923 100644 +index 3522889..845d0cc 100644 --- a/server/dhcpd.c +++ b/server/dhcpd.c @@ -300,11 +300,11 @@ main(int argc, char **argv) { @@ -351,10 +350,10 @@ index 55ffae7..530a923 100644 IGNORE_RET (chdir("/")); diff --git a/server/ldap.c b/server/ldap.c -index 5126d24..555545c 100644 +index e3e48f4..1a68936 100644 --- a/server/ldap.c +++ b/server/ldap.c -@@ -1446,7 +1446,7 @@ ldap_start (void) +@@ -1447,7 +1447,7 @@ ldap_start (void) if (ldap_debug_file != NULL && ldap_debug_fd == -1) { @@ -364,5 +363,5 @@ index 5126d24..555545c 100644 log_error ("Error opening debug LDAP log file %s: %s", ldap_debug_file, strerror (errno)); -- -2.14.5 +2.35.1 diff --git a/backport-0009-Fix-garbage-in-format-string-error.patch b/backport-0009-Fix-garbage-in-format-string-error.patch index 9710c18454eab857f24d43fc93182438c435d0ab..4f24415c096d275da4e850461f25465b74b75471 100644 --- a/backport-0009-Fix-garbage-in-format-string-error.patch +++ b/backport-0009-Fix-garbage-in-format-string-error.patch @@ -1,9 +1,8 @@ Reference: https://src.fedoraproject.org/rpms/dhcp/blob/rawhide/f/0009-Fix-garbage-in-format-string-error.patch -From a0a2186ce52a31357d4eb3c32d7d6887e4603814 Mon Sep 17 00:00:00 2001 +From cfe6414644b68d5b6b5ba150bf57cff0a709a59e Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Thu, 21 Feb 2019 10:28:13 +0100 -Subject: [PATCH 09/26] Fix 'garbage in format string' error -Cc: pzhukov@redhat.com +Subject: [PATCH 09/28] Fix 'garbage in format string' error RHBZ: 450042 --- @@ -11,10 +10,10 @@ RHBZ: 450042 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/tables.c b/common/tables.c -index c1aa214..d2294c0 100644 +index be37737..ce12fcd 100644 --- a/common/tables.c +++ b/common/tables.c -@@ -215,7 +215,7 @@ static struct option dhcp_options[] = { +@@ -222,7 +222,7 @@ static struct option dhcp_options[] = { { "name-service-search", "Sa", &dhcp_universe, 117, 1 }, #endif { "subnet-selection", "I", &dhcp_universe, 118, 1 }, @@ -24,5 +23,5 @@ index c1aa214..d2294c0 100644 { "vivso", "Evendor.", &dhcp_universe, 125, 1 }, #if 0 -- -2.14.5 +2.35.1 diff --git a/backport-0010-Handle-null-timeout.patch b/backport-0010-Handle-null-timeout.patch index a3d0ef91013548ba9575601c72d4e729263a75eb..9998ec2df42804ba2668b0bf37fddccf67b96b72 100644 --- a/backport-0010-Handle-null-timeout.patch +++ b/backport-0010-Handle-null-timeout.patch @@ -1,9 +1,8 @@ Reference: https://src.fedoraproject.org/rpms/dhcp/blob/rawhide/f/0010-Handle-null-timeout.patch -From ed7610cdb2e8ebdbaee618e477879e7e008d4f29 Mon Sep 17 00:00:00 2001 +From 7653f3ea80230d4b38bff1c65164aa18c6e51519 Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Thu, 21 Feb 2019 10:29:08 +0100 -Subject: [PATCH 10/26] Handle null timeout -Cc: pzhukov@redhat.com +Subject: [PATCH 10/28] Handle null timeout Handle cases in add_timeout() where the function is called with a NULL value for the 'when' parameter @@ -14,7 +13,7 @@ ISC-Bugs: #19867 (rejected) 1 file changed, 4 insertions(+) diff --git a/common/dispatch.c b/common/dispatch.c -index 0207ad3..d7fe200 100644 +index 7def34c..9741ff5 100644 --- a/common/dispatch.c +++ b/common/dispatch.c @@ -209,6 +209,10 @@ void add_timeout (when, where, what, ref, unref) @@ -29,5 +28,5 @@ index 0207ad3..d7fe200 100644 t = (struct timeout *)0; for (q = timeouts; q; q = q->next) { -- -2.14.5 +2.35.1 diff --git a/backport-0011-Drop-unnecessary-capabilities.patch b/backport-0011-Drop-unnecessary-capabilities.patch index f5d5e17e0e6f7d7d751c0a550cdd79493a6b3b95..d5948e36fde2b0b046cdfc9852c9e2b87728a823 100644 --- a/backport-0011-Drop-unnecessary-capabilities.patch +++ b/backport-0011-Drop-unnecessary-capabilities.patch @@ -1,9 +1,8 @@ Reference: https://src.fedoraproject.org/rpms/dhcp/blob/rawhide/f/0011-Drop-unnecessary-capabilities.patch -From 3b37f4b7bb3a17f8bd655be919915a1912062ea6 Mon Sep 17 00:00:00 2001 +From 7ea2433d716172f160c9380ed0bb852fafe845a2 Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Thu, 21 Feb 2019 10:30:28 +0100 -Subject: [PATCH 11/26] Drop unnecessary capabilities -Cc: pzhukov@redhat.com +Subject: [PATCH 11/28] Drop unnecessary capabilities dhclient (#517649, #546765), dhcpd/dhcrelay (#699713) --- @@ -30,10 +29,10 @@ index d177159..0689185 100644 man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5 EXTRA_DIST = $(man_MANS) diff --git a/client/dhclient-script.8 b/client/dhclient-script.8 -index 0db5516..2eddb8f 100644 +index 37ecdc5..1a88e0e 100644 --- a/client/dhclient-script.8 +++ b/client/dhclient-script.8 -@@ -243,6 +243,16 @@ repeatedly initialized to the values provided by one server, and then +@@ -249,6 +249,16 @@ repeatedly initialized to the values provided by one server, and then the other. Assuming the information provided by both servers is valid, this shouldn't cause any real problems, but it could be confusing. @@ -51,10 +50,10 @@ index 0db5516..2eddb8f 100644 dhclient(8), dhcpd(8), dhcrelay(8), dhclient.conf(5) and dhclient.leases(5). diff --git a/client/dhclient.8 b/client/dhclient.8 -index 6d7fbdb..0145b9f 100644 +index 5029dac..bacf3bc 100644 --- a/client/dhclient.8 +++ b/client/dhclient.8 -@@ -134,6 +134,9 @@ dhclient - Dynamic Host Configuration Protocol Client +@@ -135,6 +135,9 @@ dhclient - Dynamic Host Configuration Protocol Client .B -w ] [ @@ -64,7 +63,7 @@ index 6d7fbdb..0145b9f 100644 .B -B ] [ -@@ -328,6 +331,32 @@ not to exit when it doesn't find any such interfaces. The +@@ -329,6 +332,32 @@ not to exit when it doesn't find any such interfaces. The program can then be used to notify the client when a network interface has been added or removed, so that the client can attempt to configure an IP address on that interface. @@ -98,7 +97,7 @@ index 6d7fbdb..0145b9f 100644 .BI \-n Do not configure any interfaces. This is most likely to be useful in diff --git a/client/dhclient.c b/client/dhclient.c -index a86ab9e..5d3f5bc 100644 +index aefc119..b49fcb3 100644 --- a/client/dhclient.c +++ b/client/dhclient.c @@ -41,6 +41,10 @@ @@ -112,7 +111,7 @@ index a86ab9e..5d3f5bc 100644 /* * Defined in stdio.h when _GNU_SOURCE is set, but we don't want to define * that when building ISC code. -@@ -266,6 +270,9 @@ main(int argc, char **argv) { +@@ -272,6 +276,9 @@ main(int argc, char **argv) { int timeout_arg = 0; char *arg_conf = NULL; int arg_conf_len = 0; @@ -122,7 +121,7 @@ index a86ab9e..5d3f5bc 100644 /* Initialize client globals. */ memset(&default_duid, 0, sizeof(default_duid)); -@@ -665,6 +672,10 @@ main(int argc, char **argv) { +@@ -671,6 +678,10 @@ main(int argc, char **argv) { dhclient_request_options = argv[i]; @@ -133,7 +132,7 @@ index a86ab9e..5d3f5bc 100644 } else if (argv[i][0] == '-') { usage("Unknown command: %s", argv[i]); } else if (interfaces_requested < 0) { -@@ -725,6 +736,19 @@ main(int argc, char **argv) { +@@ -731,6 +742,19 @@ main(int argc, char **argv) { path_dhclient_script = s; } @@ -154,10 +153,10 @@ index a86ab9e..5d3f5bc 100644 initialize_common_option_spaces(); diff --git a/configure.ac b/configure.ac -index a797438..15fc0d7 100644 +index b2c306b..300117f 100644 --- a/configure.ac +++ b/configure.ac -@@ -612,6 +612,41 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[void foo() __attribute__((noreturn)); +@@ -603,6 +603,41 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[void foo() __attribute__((noreturn)); # Look for optional headers. AC_CHECK_HEADERS(sys/socket.h net/if_dl.h net/if6.h regex.h) @@ -200,7 +199,7 @@ index a797438..15fc0d7 100644 AC_SEARCH_LIBS(socket, [socket]) AC_SEARCH_LIBS(inet_ntoa, [nsl]) diff --git a/relay/Makefile.am b/relay/Makefile.am -index 2ba5979..8900e0b 100644 +index 5562b69..4c5cfa6 100644 --- a/relay/Makefile.am +++ b/relay/Makefile.am @@ -8,6 +8,7 @@ dhcrelay_LDADD = ../common/libdhcp.@A@ ../omapip/libomapi.@A@ \ @@ -212,9 +211,8 @@ index 2ba5979..8900e0b 100644 + $(CAPNG_LDADD) man_MANS = dhcrelay.8 EXTRA_DIST = $(man_MANS) - diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c -index ea1be18..7b4f4f1 100644 +index a7b1286..0dc17d6 100644 --- a/relay/dhcrelay.c +++ b/relay/dhcrelay.c @@ -32,6 +32,11 @@ @@ -229,7 +227,7 @@ index ea1be18..7b4f4f1 100644 TIME default_lease_time = 43200; /* 12 hours... */ TIME max_lease_time = 86400; /* 24 hours... */ struct tree_cache *global_options[256]; -@@ -590,6 +595,10 @@ main(int argc, char **argv) { +@@ -614,6 +619,10 @@ main(int argc, char **argv) { if (++i == argc) usage(use_noarg, argv[i-1]); dhcrelay_sub_id = argv[i]; @@ -240,7 +238,7 @@ index ea1be18..7b4f4f1 100644 #endif } else if (!strcmp(argv[i], "-pf")) { if (++i == argc) -@@ -660,6 +669,17 @@ main(int argc, char **argv) { +@@ -684,6 +693,17 @@ main(int argc, char **argv) { #endif } @@ -258,7 +256,7 @@ index ea1be18..7b4f4f1 100644 if (!quiet) { log_info("%s %s", message, PACKAGE_VERSION); log_info(copyright); -@@ -816,6 +836,15 @@ main(int argc, char **argv) { +@@ -840,6 +860,15 @@ main(int argc, char **argv) { signal(SIGTERM, dhcp_signal_handler); /* kill */ #endif @@ -275,5 +273,5 @@ index ea1be18..7b4f4f1 100644 dispatch(); -- -2.14.5 +2.35.1 diff --git a/backport-0012-RFC-3442-Classless-Static-Route-Option-for-DHCPv4-51.patch b/backport-0012-RFC-3442-Classless-Static-Route-Option-for-DHCPv4-51.patch index 3ddb5d79a1f93de66161eb7d571100ecd497c002..40197be87e24eac984b141f452cb5fd914563f38 100644 --- a/backport-0012-RFC-3442-Classless-Static-Route-Option-for-DHCPv4-51.patch +++ b/backport-0012-RFC-3442-Classless-Static-Route-Option-for-DHCPv4-51.patch @@ -1,26 +1,25 @@ Reference: https://src.fedoraproject.org/rpms/dhcp/blob/rawhide/f/0012-RFC-3442-Classless-Static-Route-Option-for-DHCPv4-51.patch -From 01b1dcfef129a4eccfaf0f63a216774019f82dca Mon Sep 17 00:00:00 2001 +From 7e6299e72feaaf7e8bd499614999ba8a07dd1a8a Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Thu, 21 Feb 2019 10:32:35 +0100 -Subject: [PATCH 12/26] RFC 3442 - Classless Static Route Option for DHCPv4 +Subject: [PATCH 12/28] RFC 3442 - Classless Static Route Option for DHCPv4 (#516325) -Cc: pzhukov@redhat.com (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #24572]) --- - client/clparse.c | 13 ++++++++++-- - common/dhcp-options.5 | 43 +++++++++++++++++++++++++++++++++++++++ - common/inet.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ - common/options.c | 49 +++++++++++++++++++++++++++++++++++++++++++- - common/parse.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++- + client/clparse.c | 13 ++++++++-- + common/dhcp-options.5 | 43 +++++++++++++++++++++++++++++++++ + common/inet.c | 54 +++++++++++++++++++++++++++++++++++++++++ + common/options.c | 49 ++++++++++++++++++++++++++++++++++++- + common/parse.c | 56 ++++++++++++++++++++++++++++++++++++++++++- common/tables.c | 2 ++ includes/dhcp.h | 1 + includes/dhcpd.h | 2 ++ - includes/dhctoken.h | 5 +++-- - 9 files changed, 219 insertions(+), 6 deletions(-) + includes/dhctoken.h | 3 ++- + 9 files changed, 218 insertions(+), 5 deletions(-) diff --git a/client/clparse.c b/client/clparse.c -index 44387ed..862e4f9 100644 +index 902b523..57f6456 100644 --- a/client/clparse.c +++ b/client/clparse.c @@ -31,7 +31,7 @@ @@ -32,7 +31,7 @@ index 44387ed..862e4f9 100644 /* There can be 2 extra requested options for DHCPv4-over-DHCPv6. */ struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 2 + 1]; -@@ -87,7 +87,11 @@ isc_result_t read_client_conf () +@@ -90,7 +90,11 @@ isc_result_t read_client_conf () dhcp_universe.code_hash, &code, 0, MDL); /* 4 */ @@ -45,7 +44,7 @@ index 44387ed..862e4f9 100644 option_code_hash_lookup(&default_requested_options[3], dhcp_universe.code_hash, &code, 0, MDL); -@@ -141,6 +145,11 @@ isc_result_t read_client_conf () +@@ -144,6 +148,11 @@ isc_result_t read_client_conf () option_code_hash_lookup(&default_requested_options[13], dhcp_universe.code_hash, &code, 0, MDL); @@ -58,10 +57,10 @@ index 44387ed..862e4f9 100644 if (default_requested_options[code] == NULL) log_fatal("Unable to find option definition for " diff --git a/common/dhcp-options.5 b/common/dhcp-options.5 -index d9e1197..2343b19 100644 +index a784b32..86f04ed 100644 --- a/common/dhcp-options.5 +++ b/common/dhcp-options.5 -@@ -110,6 +110,26 @@ hexadecimal, separated by colons. For example: +@@ -117,6 +117,26 @@ hexadecimal, separated by colons. For example: or option dhcp-client-identifier 43:4c:49:45:54:2d:46:4f:4f; .fi @@ -88,7 +87,7 @@ index d9e1197..2343b19 100644 .SH SETTING OPTION VALUES USING EXPRESSIONS Sometimes it's helpful to be able to set the value of a DHCP option based on some value that the client has sent. To do this, you can -@@ -1086,6 +1106,29 @@ dhclient-script will create routes: +@@ -1093,6 +1113,29 @@ dhclient-script will create routes: .RE .PP .nf @@ -119,7 +118,7 @@ index d9e1197..2343b19 100644 [\fB,\fR \fIip-address\fR...]\fB;\fR .fi diff --git a/common/inet.c b/common/inet.c -index c4da73c..981fb92 100644 +index 0f7f168..7c446d4 100644 --- a/common/inet.c +++ b/common/inet.c @@ -519,6 +519,60 @@ free_iaddrcidrnetlist(struct iaddrcidrnetlist **result) { @@ -184,10 +183,10 @@ index c4da73c..981fb92 100644 /* XXX: should use a const pointer rather than passing the structure */ const char * diff --git a/common/options.c b/common/options.c -index fc0e088..3034cf0 100644 +index 92c8fee..66433c4 100644 --- a/common/options.c +++ b/common/options.c -@@ -729,7 +729,11 @@ cons_options(struct packet *inpacket, struct dhcp_packet *outpacket, +@@ -734,7 +734,11 @@ cons_options(struct packet *inpacket, struct dhcp_packet *outpacket, * packet. */ priority_list[priority_len++] = DHO_SUBNET_MASK; @@ -200,7 +199,7 @@ index fc0e088..3034cf0 100644 priority_list[priority_len++] = DHO_DOMAIN_NAME_SERVERS; priority_list[priority_len++] = DHO_HOST_NAME; priority_list[priority_len++] = DHO_FQDN; -@@ -1804,6 +1808,7 @@ const char *pretty_print_option (option, data, len, emit_commas, emit_quotes) +@@ -1812,6 +1816,7 @@ const char *pretty_print_option (option, data, len, emit_commas, emit_quotes) unsigned long tval; isc_boolean_t a_array = ISC_FALSE; int len_used; @@ -208,7 +207,7 @@ index fc0e088..3034cf0 100644 if (emit_commas) comma = ','; -@@ -1812,6 +1817,7 @@ const char *pretty_print_option (option, data, len, emit_commas, emit_quotes) +@@ -1820,6 +1825,7 @@ const char *pretty_print_option (option, data, len, emit_commas, emit_quotes) memset (enumbuf, 0, sizeof enumbuf); @@ -216,7 +215,7 @@ index fc0e088..3034cf0 100644 /* Figure out the size of the data. */ for (l = i = 0; option -> format [i]; i++, l++) { if (l >= sizeof(fmtbuf) - 1) -@@ -2004,6 +2010,33 @@ const char *pretty_print_option (option, data, len, emit_commas, emit_quotes) +@@ -2029,6 +2035,33 @@ const char *pretty_print_option (option, data, len, emit_commas, emit_quotes) if (numhunk < 0) numhunk = 1; @@ -250,7 +249,7 @@ index fc0e088..3034cf0 100644 /* Cycle through the array (or hunk) printing the data. */ for (i = 0; i < numhunk; i++) { if ((a_array == ISC_TRUE) && (i != 0) && (numelem > 0)) { -@@ -2159,6 +2192,20 @@ const char *pretty_print_option (option, data, len, emit_commas, emit_quotes) +@@ -2197,6 +2230,20 @@ const char *pretty_print_option (option, data, len, emit_commas, emit_quotes) strcpy(op, piaddr(iaddr)); dp += 4; break; @@ -272,12 +271,12 @@ index fc0e088..3034cf0 100644 iaddr.len = 16; memcpy(iaddr.iabuf, dp, 16); diff --git a/common/parse.c b/common/parse.c -index 3ac4ebf..f17bc0b 100644 +index b123a6c..7cf4f2a 100644 --- a/common/parse.c +++ b/common/parse.c @@ -344,6 +344,39 @@ int parse_ip_addr (cfile, addr) return 0; - } + } +/* + * destination-descriptor :== NUMBER DOT NUMBER | @@ -337,7 +336,7 @@ index 3ac4ebf..f17bc0b 100644 case IP6_ADDRESS: type = '6'; break; -@@ -5101,6 +5139,15 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups) +@@ -5124,6 +5162,15 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups) } break; @@ -353,7 +352,7 @@ index 3ac4ebf..f17bc0b 100644 case '6': /* IPv6 address. */ if (!parse_ip6_addr(cfile, &addr)) { return 0; -@@ -5378,6 +5425,13 @@ int parse_option_decl (oc, cfile) +@@ -5401,6 +5448,13 @@ int parse_option_decl (oc, cfile) goto exit; len = ip_addr.len; dp = ip_addr.iabuf; @@ -368,7 +367,7 @@ index 3ac4ebf..f17bc0b 100644 alloc: if (hunkix + len > sizeof hunkbuf) { diff --git a/common/tables.c b/common/tables.c -index d2294c0..f1be07d 100644 +index ce12fcd..96521a6 100644 --- a/common/tables.c +++ b/common/tables.c @@ -45,6 +45,7 @@ HASH_FUNCTIONS (option_code, const unsigned *, struct option, @@ -379,7 +378,7 @@ index d2294c0..f1be07d 100644 6 - IPv6 address l - 32-bit signed integer L - 32-bit unsigned integer -@@ -216,6 +217,7 @@ static struct option dhcp_options[] = { +@@ -223,6 +224,7 @@ static struct option dhcp_options[] = { #endif { "subnet-selection", "I", &dhcp_universe, 118, 1 }, { "domain-search", "D", &dhcp_universe, 119, 1 }, @@ -388,11 +387,11 @@ index d2294c0..f1be07d 100644 { "vivso", "Evendor.", &dhcp_universe, 125, 1 }, #if 0 diff --git a/includes/dhcp.h b/includes/dhcp.h -index 0a74137..95bf539 100644 +index cafe172..5a73129 100644 --- a/includes/dhcp.h +++ b/includes/dhcp.h -@@ -158,6 +158,7 @@ struct dhcp_packet { - #define DHO_ASSOCIATED_IP 92 +@@ -159,6 +159,7 @@ struct dhcp_packet { + #define DHO_V6_ONLY_PREFERRED 108 /* RFC8925 */ #define DHO_SUBNET_SELECTION 118 /* RFC3011! */ #define DHO_DOMAIN_SEARCH 119 /* RFC3397 */ +#define DHO_CLASSLESS_STATIC_ROUTES 121 /* RFC3442 */ @@ -400,10 +399,10 @@ index 0a74137..95bf539 100644 #define DHO_VIVSO_SUBOPTIONS 125 diff --git a/includes/dhcpd.h b/includes/dhcpd.h -index 3632a6b..2ac39ae 100644 +index 4a57002..25e1c72 100644 --- a/includes/dhcpd.h +++ b/includes/dhcpd.h -@@ -2951,6 +2951,7 @@ isc_result_t range2cidr(struct iaddrcidrnetlist **result, +@@ -2967,6 +2967,7 @@ isc_result_t range2cidr(struct iaddrcidrnetlist **result, const struct iaddr *lo, const struct iaddr *hi); isc_result_t free_iaddrcidrnetlist(struct iaddrcidrnetlist **result); const char *piaddr (struct iaddr); @@ -411,7 +410,7 @@ index 3632a6b..2ac39ae 100644 char *piaddrmask(struct iaddr *, struct iaddr *); char *piaddrcidr(const struct iaddr *, unsigned int); u_int16_t validate_port(char *); -@@ -3169,6 +3170,7 @@ void parse_client_lease_declaration (struct parse *, +@@ -3189,6 +3190,7 @@ void parse_client_lease_declaration (struct parse *, int parse_option_decl (struct option_cache **, struct parse *); void parse_string_list (struct parse *, struct string_list **, int); int parse_ip_addr (struct parse *, struct iaddr *); @@ -420,21 +419,19 @@ index 3632a6b..2ac39ae 100644 void parse_reject_statement (struct parse *, struct client_config *); diff --git a/includes/dhctoken.h b/includes/dhctoken.h -index 7e7215a..b4d93ba 100644 +index 6daa422..3f5334e 100644 --- a/includes/dhctoken.h +++ b/includes/dhctoken.h -@@ -376,8 +376,9 @@ enum dhcp_token { - LEASE_ID_FORMAT = 676, - TOKEN_HEX = 677, +@@ -378,7 +378,8 @@ enum dhcp_token { TOKEN_OCTAL = 678, -- KEY_ALGORITHM = 679 -- BOOTP_BROADCAST_ALWAYS = 680 -+ KEY_ALGORITHM = 679, -+ BOOTP_BROADCAST_ALWAYS = 680, -+ DESTINATION_DESCRIPTOR = 681 + KEY_ALGORITHM = 679, + BOOTP_BROADCAST_ALWAYS = 680, +- DISCONNECT = 681 ++ DESTINATION_DESCRIPTOR = 681, ++ DISCONNECT = 682 }; #define is_identifier(x) ((x) >= FIRST_TOKEN && \ -- -2.14.5 +2.35.1 diff --git a/backport-0013-DHCPv6-over-PPP-support-626514.patch b/backport-0013-DHCPv6-over-PPP-support-626514.patch index 4784dd0eee8c4d17f82089e476e5a701f61d5a9b..66ddef2f64bd6ea4d1acd470693c5072cb77e49c 100644 --- a/backport-0013-DHCPv6-over-PPP-support-626514.patch +++ b/backport-0013-DHCPv6-over-PPP-support-626514.patch @@ -1,9 +1,8 @@ Reference: https://src.fedoraproject.org/rpms/dhcp/blob/rawhide/f/0013-DHCPv6-over-PPP-support-626514.patch -From 234747fbfd6c6429619ba843713d5b39fb4a513d Mon Sep 17 00:00:00 2001 +From fe89d58ea8627c66feffa81997daa024834eeb15 Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Thu, 21 Feb 2019 10:33:06 +0100 -Subject: [PATCH 13/26] DHCPv6 over PPP support (#626514) -Cc: pzhukov@redhat.com +Subject: [PATCH 13/28] DHCPv6 over PPP support (#626514) --- client/dhc6.c | 3 ++- @@ -16,10 +15,10 @@ Cc: pzhukov@redhat.com 7 files changed, 54 insertions(+), 5 deletions(-) diff --git a/client/dhc6.c b/client/dhc6.c -index 16a0838..3171828 100644 +index 35cf3d0..88fd07d 100644 --- a/client/dhc6.c +++ b/client/dhc6.c -@@ -5744,7 +5744,8 @@ make_client6_options(struct client_state *client, struct option_state **op, +@@ -5737,7 +5737,8 @@ make_client6_options(struct client_state *client, struct option_state **op, */ if ((oc = lookup_option(&dhcpv6_universe, *op, D6O_CLIENTID)) == NULL) { @@ -30,10 +29,10 @@ index 16a0838..3171828 100644 log_fatal("Failure assembling a DUID."); diff --git a/client/dhclient.c b/client/dhclient.c -index 5d3f5bc..301132c 100644 +index b49fcb3..a99e21f 100644 --- a/client/dhclient.c +++ b/client/dhclient.c -@@ -1202,8 +1202,8 @@ main(int argc, char **argv) { +@@ -1223,8 +1223,8 @@ main(int argc, char **argv) { if (default_duid.buffer != NULL) data_string_forget(&default_duid, MDL); @@ -44,7 +43,7 @@ index 5d3f5bc..301132c 100644 } } -@@ -3956,7 +3956,7 @@ write_options(struct client_state *client, struct option_state *options, +@@ -4202,7 +4202,7 @@ write_options(struct client_state *client, struct option_state *options, * is not how it is intended. Upcoming rearchitecting the client should * address this "one daemon model." */ @@ -53,7 +52,7 @@ index 5d3f5bc..301132c 100644 form_duid(struct data_string *duid, const char *file, int line) { struct interface_info *ip; -@@ -3969,6 +3969,15 @@ form_duid(struct data_string *duid, const char *file, int line) +@@ -4215,6 +4215,15 @@ form_duid(struct data_string *duid, const char *file, int line) if (ip == NULL) log_fatal("Impossible condition at %s:%d.", MDL); @@ -69,7 +68,7 @@ index 5d3f5bc..301132c 100644 if ((ip->hw_address.hlen == 0) || (ip->hw_address.hlen > sizeof(ip->hw_address.hbuf))) log_fatal("Impossible hardware address length at %s:%d.", MDL); -@@ -4014,6 +4023,8 @@ form_duid(struct data_string *duid, const char *file, int line) +@@ -4260,6 +4269,8 @@ form_duid(struct data_string *duid, const char *file, int line) log_info("Created duid %s.", str); dfree(str, MDL); } @@ -79,7 +78,7 @@ index 5d3f5bc..301132c 100644 /* Write the default DUID to the lease store. */ diff --git a/common/bpf.c b/common/bpf.c -index 67b6d64..ffbd09a 100644 +index d2a0549..aede242 100644 --- a/common/bpf.c +++ b/common/bpf.c @@ -650,6 +650,22 @@ get_hw_addr(const char *name, struct hardware *hw) { @@ -106,7 +105,7 @@ index 67b6d64..ffbd09a 100644 log_fatal("Unsupported device type %d for \"%s\"", sa->sdl_type, name); diff --git a/common/lpf.c b/common/lpf.c -index 82a279b..b0ed01c 100644 +index bd20b3f..bb8822a 100644 --- a/common/lpf.c +++ b/common/lpf.c @@ -563,6 +563,22 @@ get_hw_addr(const char *name, struct hardware *hw) { @@ -133,7 +132,7 @@ index 82a279b..b0ed01c 100644 log_fatal("Unsupported device type %ld for \"%s\"", (long int)sa->sa_family, name); diff --git a/includes/dhcp.h b/includes/dhcp.h -index 95bf539..4cc547a 100644 +index 5a73129..7202f1d 100644 --- a/includes/dhcp.h +++ b/includes/dhcp.h @@ -80,6 +80,8 @@ struct dhcp_packet { @@ -146,10 +145,10 @@ index 95bf539..4cc547a 100644 extensions field). */ #define DHCP_OPTIONS_COOKIE "\143\202\123\143" diff --git a/includes/dhcpd.h b/includes/dhcpd.h -index 2ac39ae..faa9251 100644 +index 25e1c72..4c5e877 100644 --- a/includes/dhcpd.h +++ b/includes/dhcpd.h -@@ -3051,7 +3051,7 @@ void client_dns_remove(struct client_state *client, struct iaddr *addr); +@@ -3071,7 +3071,7 @@ void client_dns_remove(struct client_state *client, struct iaddr *addr); void dhcpv4_client_assignments(void); void dhcpv6_client_assignments(void); @@ -159,7 +158,7 @@ index 2ac39ae..faa9251 100644 void dhcp4o6_start(void); diff --git a/server/dhcpv6.c b/server/dhcpv6.c -index a7110f9..c5ce7e8 100644 +index 0ea0532..7d61dc5 100644 --- a/server/dhcpv6.c +++ b/server/dhcpv6.c @@ -482,6 +482,9 @@ generate_new_server_duid(void) { @@ -173,5 +172,5 @@ index a7110f9..c5ce7e8 100644 if (p == NULL) { return ISC_R_UNEXPECTED; -- -2.14.5 +2.35.1 diff --git a/backport-0014-IPoIB-support-660681.patch b/backport-0014-IPoIB-support-660681.patch index ad4766ea7cd61906b6b38358f868d44f4f4eb01f..639f1968c6eeea96b94c56523ce57c3d33a61d9a 100644 --- a/backport-0014-IPoIB-support-660681.patch +++ b/backport-0014-IPoIB-support-660681.patch @@ -1,25 +1,24 @@ Reference: https://src.fedoraproject.org/rpms/dhcp/blob/rawhide/f/0014-IPoIB-support-660681.patch -From 6d74c2d0ceadef2eb1c43c2da47f1d5b732adf8c Mon Sep 17 00:00:00 2001 +From 90d64318e17df066c27b8e99ba6ab7f51154917b Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Thu, 21 Feb 2019 10:34:21 +0100 -Subject: [PATCH 14/26] IPoIB support (#660681) -Cc: pzhukov@redhat.com +Subject: [PATCH 14/28] IPoIB support (#660681) (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #24249]) --- - client/dhclient.c | 32 +++++++ - common/bpf.c | 32 +++++++ + client/dhclient.c | 33 ++++++ + common/bpf.c | 32 ++++++ common/discover.c | 4 +- - common/lpf.c | 262 +++++++++++++++++++++++++++++++++++++++++++++++++----- + common/lpf.c | 274 ++++++++++++++++++++++++++++++++++++++++++---- common/socket.c | 8 +- includes/dhcpd.h | 6 +- - 6 files changed, 315 insertions(+), 29 deletions(-) + 6 files changed, 329 insertions(+), 28 deletions(-) diff --git a/client/dhclient.c b/client/dhclient.c -index 301132c..dc9080e 100644 +index a99e21f..48edddf 100644 --- a/client/dhclient.c +++ b/client/dhclient.c -@@ -205,6 +205,8 @@ static const char use_v6command[] = "Command not used for DHCPv4: %s"; +@@ -211,6 +211,8 @@ static const char use_v6command[] = "Command not used for DHCPv4: %s"; #define DHCLIENT_USAGEH "{--version|--help|-h}" @@ -28,9 +27,9 @@ index 301132c..dc9080e 100644 static void usage(const char *sfmt, const char *sarg) { -@@ -1191,6 +1193,13 @@ main(int argc, char **argv) { +@@ -1213,6 +1215,14 @@ main(int argc, char **argv) { } - srandom(seed + cur_time + (unsigned)getpid()); + srandom(seed); + /* Setup specific Infiniband options */ + for (ip = interfaces; ip; ip = ip->next) { @@ -39,10 +38,11 @@ index 301132c..dc9080e 100644 + setup_ib_interface(ip); + } + } - ++ /* * Establish a default DUID. We always do so for v6 and -@@ -1486,6 +1495,29 @@ int find_subnet (struct subnet **sp, + * do so if desired for v4 via the -D or -i options +@@ -1507,6 +1517,29 @@ int find_subnet (struct subnet **sp, return 0; } @@ -73,7 +73,7 @@ index 301132c..dc9080e 100644 * * Each routine is called from the dhclient_state_machine() in one of diff --git a/common/bpf.c b/common/bpf.c -index ffbd09a..568e3d9 100644 +index aede242..812cac3 100644 --- a/common/bpf.c +++ b/common/bpf.c @@ -237,11 +237,43 @@ int dhcp_bpf_relay_filter_len = @@ -121,10 +121,10 @@ index ffbd09a..568e3d9 100644 struct bpf_insn dhcp_bpf_tr_filter [] = { /* accept all token ring packets due to variable length header */ diff --git a/common/discover.c b/common/discover.c -index 6ef8852..65881fc 100644 +index ed338b4..e562225 100644 --- a/common/discover.c +++ b/common/discover.c -@@ -894,7 +894,7 @@ discover_interfaces(int state) { +@@ -899,7 +899,7 @@ discover_interfaces(int state) { if_register_send(tmp); } else { /* get_hw_addr() was called by register. */ @@ -133,7 +133,7 @@ index 6ef8852..65881fc 100644 } break; #ifdef DHCPv6 -@@ -907,7 +907,7 @@ discover_interfaces(int state) { +@@ -912,7 +912,7 @@ discover_interfaces(int state) { so now we have to call it explicitly to not leave the hardware address unknown (some code expects it cannot be. */ @@ -143,7 +143,7 @@ index 6ef8852..65881fc 100644 if_register_linklocal6(tmp); } diff --git a/common/lpf.c b/common/lpf.c -index b0ed01c..b732a86 100644 +index bb8822a..fcaa13d 100644 --- a/common/lpf.c +++ b/common/lpf.c @@ -45,6 +45,17 @@ @@ -231,7 +231,35 @@ index b0ed01c..b732a86 100644 } } } -@@ -330,6 +353,54 @@ static void lpf_tr_filter_setup (info) +@@ -253,6 +276,18 @@ static void lpf_gen_filter_setup (info) + + memset(&p, 0, sizeof(p)); + ++ if (info->hw_address.hbuf[0] == HTYPE_INFINIBAND) { ++ p.len = dhcp_ib_bpf_filter_len; ++ p.filter = dhcp_ib_bpf_filter; ++ ++ /* Patch the server port into the LPF program... ++ XXX ++ changes to filter program may require changes ++ to the insn number(s) used below! ++ XXX */ ++ dhcp_ib_bpf_filter[6].k = ntohs (local_port); ++ } else { ++ + /* Set up the bpf filter program structure. This is defined in + bpf.c */ + p.len = dhcp_bpf_filter_len; +@@ -275,6 +310,8 @@ static void lpf_gen_filter_setup (info) + #endif + dhcp_bpf_filter [8].k = ntohs (local_port); + ++ } ++ + if (setsockopt (info -> rfdesc, SOL_SOCKET, SO_ATTACH_FILTER, &p, + sizeof p) < 0) { + if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT || +@@ -330,6 +367,54 @@ static void lpf_tr_filter_setup (info) #endif /* USE_LPF_RECEIVE */ #ifdef USE_LPF_SEND @@ -286,7 +314,7 @@ index b0ed01c..b732a86 100644 ssize_t send_packet (interface, packet, raw, len, from, to, hto) struct interface_info *interface; struct packet *packet; -@@ -350,6 +421,11 @@ ssize_t send_packet (interface, packet, raw, len, from, to, hto) +@@ -350,6 +435,11 @@ ssize_t send_packet (interface, packet, raw, len, from, to, hto) return send_fallback (interface, packet, raw, len, from, to, hto); @@ -298,7 +326,7 @@ index b0ed01c..b732a86 100644 if (hto == NULL && interface->anycast_mac_addr.hlen) hto = &interface->anycast_mac_addr; -@@ -370,6 +446,42 @@ ssize_t send_packet (interface, packet, raw, len, from, to, hto) +@@ -370,6 +460,42 @@ ssize_t send_packet (interface, packet, raw, len, from, to, hto) #endif /* USE_LPF_SEND */ #ifdef USE_LPF_RECEIVE @@ -341,7 +369,7 @@ index b0ed01c..b732a86 100644 ssize_t receive_packet (interface, buf, len, from, hfrom) struct interface_info *interface; unsigned char *buf; -@@ -408,6 +520,10 @@ ssize_t receive_packet (interface, buf, len, from, hfrom) +@@ -408,6 +534,10 @@ ssize_t receive_packet (interface, buf, len, from, hfrom) }; #endif /* PACKET_AUXDATA */ @@ -352,7 +380,7 @@ index b0ed01c..b732a86 100644 length = recvmsg (interface->rfdesc, &msg, 0); if (length <= 0) return length; -@@ -521,11 +637,33 @@ void maybe_setup_fallback () +@@ -521,11 +651,33 @@ void maybe_setup_fallback () #endif #if defined (USE_LPF_RECEIVE) || defined (USE_LPF_HWADDR) @@ -389,12 +417,8 @@ index b0ed01c..b732a86 100644 if (strlen(name) >= sizeof(tmp.ifr_name)) { log_fatal("Device name too long: \"%s\"", name); -@@ -539,16 +677,61 @@ get_hw_addr(const char *name, struct hardware *hw) { - memset(&tmp, 0, sizeof(tmp)); - strcpy(tmp.ifr_name, name); - if (ioctl(sock, SIOCGIFHWADDR, &tmp) < 0) { -- log_fatal("Error getting hardware address for \"%s\": %m", -+ log_fatal("Error getting hardware address for \"%s\": %m", +@@ -542,13 +694,58 @@ get_hw_addr(const char *name, struct hardware *hw) { + log_fatal("Error getting hardware address for \"%s\": %m", name); } + close(sock); @@ -454,7 +478,7 @@ index b0ed01c..b732a86 100644 break; case ARPHRD_IEEE802: #ifdef ARPHRD_IEEE802_TR -@@ -556,18 +739,50 @@ get_hw_addr(const char *name, struct hardware *hw) { +@@ -556,18 +753,50 @@ get_hw_addr(const char *name, struct hardware *hw) { #endif /* ARPHRD_IEEE802_TR */ hw->hlen = 7; hw->hbuf[0] = HTYPE_IEEE802; @@ -509,7 +533,7 @@ index b0ed01c..b732a86 100644 hw->hlen = 0; hw->hbuf[0] = HTYPE_RESERVED; /* 0xdeadbeef should never occur on the wire, -@@ -580,10 +795,13 @@ get_hw_addr(const char *name, struct hardware *hw) { +@@ -580,10 +809,13 @@ get_hw_addr(const char *name, struct hardware *hw) { break; #endif default: @@ -527,10 +551,10 @@ index b0ed01c..b732a86 100644 } #endif diff --git a/common/socket.c b/common/socket.c -index 483eb9c..6e1caac 100644 +index 3953eac..903d034 100644 --- a/common/socket.c +++ b/common/socket.c -@@ -350,7 +350,7 @@ void if_register_send (info) +@@ -358,7 +358,7 @@ void if_register_send (info) info->wfdesc = if_register_socket(info, AF_INET, 0, NULL); /* If this is a normal IPv4 address, get the hardware address. */ if (strcmp(info->name, "fallback") != 0) @@ -539,7 +563,7 @@ index 483eb9c..6e1caac 100644 #if defined (USE_SOCKET_FALLBACK) /* Fallback only registers for send, but may need to receive as well. */ -@@ -413,7 +413,7 @@ void if_register_receive (info) +@@ -421,7 +421,7 @@ void if_register_receive (info) #endif /* IP_PKTINFO... */ /* If this is a normal IPv4 address, get the hardware address. */ if (strcmp(info->name, "fallback") != 0) @@ -548,7 +572,7 @@ index 483eb9c..6e1caac 100644 if (!quiet_interface_discovery) log_info ("Listening on Socket/%s%s%s", -@@ -567,7 +567,7 @@ if_register6(struct interface_info *info, int do_multicast) { +@@ -577,7 +577,7 @@ if_register6(struct interface_info *info, int do_multicast) { if (req_multi) if_register_multicast(info); @@ -557,7 +581,7 @@ index 483eb9c..6e1caac 100644 if (!quiet_interface_discovery) { if (info->shared_network != NULL) { -@@ -623,7 +623,7 @@ if_register_linklocal6(struct interface_info *info) { +@@ -633,7 +633,7 @@ if_register_linklocal6(struct interface_info *info) { info->rfdesc = sock; info->wfdesc = sock; @@ -567,7 +591,7 @@ index 483eb9c..6e1caac 100644 if (!quiet_interface_discovery) { if (info->shared_network != NULL) { diff --git a/includes/dhcpd.h b/includes/dhcpd.h -index faa9251..0c1a0aa 100644 +index 4c5e877..e9e52e7 100644 --- a/includes/dhcpd.h +++ b/includes/dhcpd.h @@ -485,6 +485,9 @@ struct packet { @@ -580,7 +604,7 @@ index faa9251..0c1a0aa 100644 struct hardware { u_int8_t hlen; u_int8_t hbuf[HARDWARE_ADDR_LEN + 1]; -@@ -1365,6 +1368,7 @@ struct interface_info { +@@ -1380,6 +1383,7 @@ struct interface_info { struct shared_network *shared_network; /* Networks connected to this interface. */ struct hardware hw_address; /* Its physical address. */ @@ -588,7 +612,7 @@ index faa9251..0c1a0aa 100644 struct in_addr *addresses; /* Addresses associated with this * interface. */ -@@ -2633,7 +2637,7 @@ void print_dns_status (int, struct dhcp_ddns_cb *, isc_result_t); +@@ -2649,7 +2653,7 @@ void print_dns_status (int, struct dhcp_ddns_cb *, isc_result_t); #endif const char *print_time(TIME); @@ -598,5 +622,5 @@ index faa9251..0c1a0aa 100644 const char *file, int line); char *format_lease_id(const unsigned char *s, unsigned len, int format, -- -2.14.5 +2.35.1 diff --git a/backport-0015-Add-GUID-DUID-to-dhcpd-logs-1064416.patch b/backport-0015-Add-GUID-DUID-to-dhcpd-logs-1064416.patch index 407a2ba2fff6980e04bcf08afe07e456cff248c0..5c83360c9a492aa5b13f3ce7355bce0e56671c58 100644 --- a/backport-0015-Add-GUID-DUID-to-dhcpd-logs-1064416.patch +++ b/backport-0015-Add-GUID-DUID-to-dhcpd-logs-1064416.patch @@ -1,20 +1,20 @@ -Reference: https://src.fedoraproject.org/rpms/dhcp/blob/rawhide/f/0015-Add-GUID-DUID-to-dhcpd-logs-1064416.patch -From 3d3e442ed1316930a5360e4d5a56b46a42a29419 Mon Sep 17 00:00:00 2001 +Reference: +https://src.fedoraproject.org/rpms/dhcp/blob/rawhide/f/0015-Add-GUID-DUID-to-dhcpd-logs-1064416.patch +From 3baf35269555e2223dbd1733cb1c475cb7f2ed7a Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Thu, 21 Feb 2019 10:35:47 +0100 -Subject: [PATCH 15/26] Add GUID/DUID to dhcpd logs (#1064416) -Cc: pzhukov@redhat.com +Subject: [PATCH 15/28] Add GUID/DUID to dhcpd logs (#1064416) --- - client/dhclient.c | 75 ++++++++++++++++++++++++++++++++++++++++++---------- - server/dhcp.c | 78 +++++++++++++++++++++++++++++++++---------------------- - 2 files changed, 108 insertions(+), 45 deletions(-) + client/dhclient.c | 70 ++++++++++++++++++++++++++++++++++-------- + server/dhcp.c | 78 ++++++++++++++++++++++++++++------------------- + 2 files changed, 105 insertions(+), 43 deletions(-) diff --git a/client/dhclient.c b/client/dhclient.c -index dc9080e..8e57da9 100644 +index 48edddf..181f6e1 100644 --- a/client/dhclient.c +++ b/client/dhclient.c -@@ -1170,6 +1170,26 @@ main(int argc, char **argv) { +@@ -1176,6 +1176,26 @@ main(int argc, char **argv) { } } @@ -41,60 +41,56 @@ index dc9080e..8e57da9 100644 /* At this point, all the interfaces that the script thinks are relevant should be running, so now we once again call discover_interfaces(), and this time ask it to actually set -@@ -1184,14 +1204,36 @@ main(int argc, char **argv) { - Not much entropy, but we're booting, so we're not likely to - find anything better. */ - seed = 0; -+ int seed_flag = 0; - for (ip = interfaces; ip; ip = ip->next) { - int junk; -+ if ( ip -> hw_address.hlen <= sizeof seed ) -+ continue; - memcpy(&junk, - &ip->hw_address.hbuf[ip->hw_address.hlen - - sizeof seed], sizeof seed); - seed += junk; -+ seed_flag = 1; - } -- srandom(seed + cur_time + (unsigned)getpid()); -+ if ( seed_flag == 0 ) { -+ if ( backup_seed != 0 ) { -+ seed = backup_seed; -+ log_info ("xid: rand init seed (0x%x) built using all" -+ " available interfaces",seed); -+ } -+ else { -+ seed = cur_time^((unsigned) gethostid()) ; -+ log_info ("xid: warning: no netdev with useable HWADDR found" -+ " for seed's uniqueness enforcement"); -+ log_info ("xid: rand init seed (0x%x) built using gethostid", -+ seed); +@@ -1204,14 +1224,34 @@ main(int argc, char **argv) { + Not much entropy, but we're booting, so we're not likely to + find anything better. */ + ++ int seed_flag = 0; + for (ip = interfaces; ip; ip = ip->next) { + int junk; ++ if ( ip -> hw_address.hlen <= sizeof seed ) ++ continue; + memcpy(&junk, + &ip->hw_address.hbuf[ip->hw_address.hlen - + sizeof seed], sizeof seed); + seed += junk; ++ seed_flag = 1; + } +- seed += cur_time + (unsigned)getpid(); ++ if ( seed_flag == 0 ) { ++ if ( backup_seed != 0 ) { ++ seed = backup_seed; ++ log_info ("xid: rand init seed (0x%x) built using all" ++ " available interfaces",seed); ++ } ++ else { ++ seed = cur_time^((unsigned) gethostid()) ; ++ log_info ("xid: warning: no netdev with useable HWADDR found" ++ " for seed's uniqueness enforcement"); ++ log_info ("xid: rand init seed (0x%x) built using gethostid", ++ seed); ++ } ++ /* we only use seed and no current time as a broadcast reply */ ++ /* will certainly be used by the hwaddrless interface */ + } -+ /* we only use seed and no current time as a broadcast reply */ -+ /* will certainly be used by the hwaddrless interface */ -+ srandom(seed + ((unsigned)(cur_tv.tv_usec * 1000000)) + (unsigned)getpid()); -+ } -+ else -+ srandom(seed + ((unsigned)(cur_tv.tv_usec * 1000000)) + (unsigned)getpid()); ++ seed += ((unsigned)(cur_tv.tv_usec * 1000000)) + (unsigned)getpid(); + } + srandom(seed); - /* Setup specific Infiniband options */ - for (ip = interfaces; ip; ip = ip->next) { -@@ -1746,10 +1788,10 @@ void dhcpack (packet) - #endif +@@ -1869,9 +1909,10 @@ void dhcpack (packet) return; } -- + - log_info ("DHCPACK of %s from %s", -- inet_ntoa(packet->raw->yiaddr), -- piaddr (packet->client_addr)); + log_info ("DHCPACK of %s from %s (xid=0x%x)", -+ inet_ntoa(packet->raw->yiaddr), -+ piaddr (packet -> client_addr), -+ ntohl(client -> xid)); + inet_ntoa(packet->raw->yiaddr), +- piaddr (packet->client_addr)); ++ piaddr (packet -> client_addr), ++ ntohl(client -> xid)); - lease = packet_to_lease (packet, client); - if (!lease) { -@@ -2669,7 +2711,7 @@ void dhcpnak (packet) + /* Check v6only first. */ + v6only_wait = check_v6only(packet, client); +@@ -2825,7 +2866,7 @@ void dhcpnak (packet) return; } @@ -103,7 +99,7 @@ index dc9080e..8e57da9 100644 if (!client -> active) { #if defined (DEBUG) -@@ -2802,10 +2844,10 @@ void send_discover (cpp) +@@ -2958,10 +2999,10 @@ void send_discover (cpp) (long)(client -> interval)); } else #endif @@ -116,7 +112,7 @@ index dc9080e..8e57da9 100644 /* Send out a packet. */ #if defined(DHCPv6) && defined(DHCP4o6) -@@ -3108,10 +3150,12 @@ void send_request (cpp) +@@ -3355,10 +3396,12 @@ void send_request (cpp) } strncpy(rip_buf, rip_str, sizeof(rip_buf)-1); @@ -131,7 +127,7 @@ index dc9080e..8e57da9 100644 #if defined(DHCPv6) && defined(DHCP4o6) if (dhcpv4_over_dhcpv6) { -@@ -3168,11 +3212,13 @@ void send_decline (cpp) +@@ -3415,11 +3458,13 @@ void send_decline (cpp) log_info ("DHCPDECLINE"); } else #endif @@ -147,7 +143,7 @@ index dc9080e..8e57da9 100644 /* Send out a packet. */ #if defined(DHCPv6) && defined(DHCP4o6) -@@ -3231,11 +3277,12 @@ void send_release (cpp) +@@ -3478,11 +3523,12 @@ void send_release (cpp) log_info ("DHCPRELEASE"); } else #endif @@ -163,10 +159,10 @@ index dc9080e..8e57da9 100644 #if defined(DHCPv6) && defined(DHCP4o6) if (dhcpv4_over_dhcpv6) { diff --git a/server/dhcp.c b/server/dhcp.c -index 20f2a62..0582c4c 100644 +index ae805a6..8363840 100644 --- a/server/dhcp.c +++ b/server/dhcp.c -@@ -87,6 +87,42 @@ const int dhcp_type_name_max = ((sizeof dhcp_type_names) / sizeof (char *)); +@@ -93,6 +93,42 @@ const int dhcp_type_name_max = ((sizeof dhcp_type_names) / sizeof (char *)); static TIME leaseTimeCheck(TIME calculated, TIME alternate); @@ -209,7 +205,7 @@ index 20f2a62..0582c4c 100644 void dhcp (struct packet *packet) { int ms_nulltp = 0; -@@ -129,9 +165,7 @@ dhcp (struct packet *packet) { +@@ -135,9 +171,7 @@ dhcp (struct packet *packet) { log_info("%s from %s via %s: %s", s, (packet->raw->htype @@ -220,7 +216,7 @@ index 20f2a62..0582c4c 100644 : ""), packet->raw->giaddr.s_addr ? inet_ntoa(packet->raw->giaddr) -@@ -328,9 +362,7 @@ void dhcpdiscover (packet, ms_nulltp) +@@ -334,9 +368,7 @@ void dhcpdiscover (packet, ms_nulltp) #endif snprintf (msgbuf, sizeof msgbuf, "DHCPDISCOVER from %s %s%s%svia %s", (packet -> raw -> htype @@ -231,7 +227,7 @@ index 20f2a62..0582c4c 100644 : (lease ? print_hex_1(lease->uid_len, lease->uid, 60) : "")), -@@ -542,9 +574,7 @@ void dhcprequest (packet, ms_nulltp, ip_lease) +@@ -548,9 +580,7 @@ void dhcprequest (packet, ms_nulltp, ip_lease) "DHCPREQUEST for %s%s from %s %s%s%svia %s", piaddr (cip), smbuf, (packet -> raw -> htype @@ -242,7 +238,7 @@ index 20f2a62..0582c4c 100644 : (lease ? print_hex_1(lease->uid_len, lease->uid, 60) : "")), -@@ -785,9 +815,7 @@ void dhcprelease (packet, ms_nulltp) +@@ -791,9 +821,7 @@ void dhcprelease (packet, ms_nulltp) if ((oc = lookup_option (&dhcp_universe, packet -> options, DHO_DHCP_REQUESTED_ADDRESS))) { log_info ("DHCPRELEASE from %s specified requested-address.", @@ -253,7 +249,7 @@ index 20f2a62..0582c4c 100644 } oc = lookup_option (&dhcp_universe, packet -> options, -@@ -879,9 +907,7 @@ void dhcprelease (packet, ms_nulltp) +@@ -885,9 +913,7 @@ void dhcprelease (packet, ms_nulltp) "DHCPRELEASE of %s from %s %s%s%svia %s (%sfound)", cstr, (packet -> raw -> htype @@ -264,7 +260,7 @@ index 20f2a62..0582c4c 100644 : (lease ? print_hex_1(lease->uid_len, lease->uid, 60) : "")), -@@ -986,9 +1012,7 @@ void dhcpdecline (packet, ms_nulltp) +@@ -992,9 +1018,7 @@ void dhcpdecline (packet, ms_nulltp) "DHCPDECLINE of %s from %s %s%s%svia %s", piaddr (cip), (packet -> raw -> htype @@ -275,7 +271,7 @@ index 20f2a62..0582c4c 100644 : (lease ? print_hex_1(lease->uid_len, lease->uid, 60) : "")), -@@ -1732,8 +1756,7 @@ void dhcpinform (packet, ms_nulltp) +@@ -1740,8 +1764,7 @@ void dhcpinform (packet, ms_nulltp) /* Report what we're sending. */ snprintf(msgbuf, sizeof msgbuf, "DHCPACK to %s (%s) via", piaddr(cip), (packet->raw->htype && packet->raw->hlen) ? @@ -285,7 +281,7 @@ index 20f2a62..0582c4c 100644 ""); log_info("%s %s", msgbuf, gip.len ? piaddr(gip) : packet->interface->name); -@@ -1918,9 +1941,7 @@ void nak_lease (packet, cip, network_group) +@@ -1926,9 +1949,7 @@ void nak_lease (packet, cip, network_group) #endif log_info ("DHCPNAK on %s to %s via %s", piaddr (*cip), @@ -296,7 +292,7 @@ index 20f2a62..0582c4c 100644 packet -> raw -> giaddr.s_addr ? inet_ntoa (packet -> raw -> giaddr) : packet -> interface -> name); -@@ -3936,7 +3957,7 @@ void dhcp_reply (lease) +@@ -4044,7 +4065,7 @@ void dhcp_reply (lease) ? (state -> offer == DHCPACK ? "DHCPACK" : "DHCPOFFER") : "BOOTREPLY"), piaddr (lease -> ip_addr), @@ -305,7 +301,7 @@ index 20f2a62..0582c4c 100644 ? print_hw_addr (lease -> hardware_addr.hbuf [0], lease -> hardware_addr.hlen - 1, &lease -> hardware_addr.hbuf [1]) -@@ -4497,10 +4518,7 @@ int find_lease (struct lease **lp, +@@ -4605,10 +4626,7 @@ int find_lease (struct lease **lp, if (uid_lease) { if (uid_lease->binding_state == FTS_ACTIVE) { log_error ("client %s has duplicate%s on %s", @@ -317,7 +313,7 @@ index 20f2a62..0582c4c 100644 " leases", (ip_lease -> subnet -> shared_network -> name)); -@@ -4667,9 +4685,7 @@ int find_lease (struct lease **lp, +@@ -4775,9 +4793,7 @@ int find_lease (struct lease **lp, log_error("uid lease %s for client %s is duplicate " "on %s", piaddr(uid_lease->ip_addr), @@ -329,5 +325,5 @@ index 20f2a62..0582c4c 100644 if (!packet -> raw -> ciaddr.s_addr && -- -2.14.5 +2.35.1 diff --git a/backport-0016-Turn-on-creating-sending-of-DUID.patch b/backport-0016-Turn-on-creating-sending-of-DUID.patch index d8f18884dd81c1fd6a75852fbb92776c3acb779d..40e7a6d0123971846f185562ccbf8a104b7a2e26 100644 --- a/backport-0016-Turn-on-creating-sending-of-DUID.patch +++ b/backport-0016-Turn-on-creating-sending-of-DUID.patch @@ -1,20 +1,19 @@ Reference: https://src.fedoraproject.org/rpms/dhcp/blob/rawhide/f/0016-Turn-on-creating-sending-of-DUID.patch -From 2f6b827e89305adcff45288c632785ac054adb8e Mon Sep 17 00:00:00 2001 +From 0a0a7e1afa171289b9e9d855c519101bbd71b5fe Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Thu, 21 Feb 2019 10:36:30 +0100 -Subject: [PATCH 16/26] Turn on creating/sending of DUID -Cc: pzhukov@redhat.com +Subject: [PATCH 16/28] Turn on creating/sending of DUID as client identifier with DHCPv4 clients (#560361c#40, rfc4361) --- - client/dhclient.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- + client/dhclient.c | 74 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 70 insertions(+), 4 deletions(-) diff --git a/client/dhclient.c b/client/dhclient.c -index 8e57da9..ccc98e4 100644 +index 181f6e1..444d251 100644 --- a/client/dhclient.c +++ b/client/dhclient.c -@@ -4021,6 +4021,59 @@ write_options(struct client_state *client, struct option_state *options, +@@ -4267,6 +4267,59 @@ write_options(struct client_state *client, struct option_state *options, } } @@ -74,7 +73,7 @@ index 8e57da9..ccc98e4 100644 /* * The "best" default DUID, since we cannot predict any information * about the system (such as whether or not the hardware addresses are -@@ -4041,6 +4094,7 @@ form_duid(struct data_string *duid, const char *file, int line) +@@ -4287,6 +4340,7 @@ form_duid(struct data_string *duid, const char *file, int line) struct interface_info *ip; int len; char *str; @@ -82,7 +81,7 @@ index 8e57da9..ccc98e4 100644 /* For now, just use the first interface on the list. */ ip = interfaces; -@@ -4061,9 +4115,16 @@ form_duid(struct data_string *duid, const char *file, int line) +@@ -4307,9 +4361,16 @@ form_duid(struct data_string *duid, const char *file, int line) (ip->hw_address.hlen > sizeof(ip->hw_address.hbuf))) log_fatal("Impossible hardware address length at %s:%d.", MDL); @@ -102,7 +101,7 @@ index 8e57da9..ccc98e4 100644 /* * 2 bytes for the 'duid type' field. * 2 bytes for the 'htype' field. -@@ -4074,13 +4135,18 @@ form_duid(struct data_string *duid, const char *file, int line) +@@ -4320,13 +4381,18 @@ form_duid(struct data_string *duid, const char *file, int line) len = 4 + (ip->hw_address.hlen - 1); if (duid_type == DUID_LLT) len += 4; @@ -123,5 +122,5 @@ index 8e57da9..ccc98e4 100644 putUShort(duid->buffer->data + 2, ip->hw_address.hbuf[0]); putULong(duid->buffer->data + 4, cur_time - DUID_TIME_EPOCH); -- -2.14.5 +2.35.1 diff --git a/backport-0017-Send-unicast-request-release-via-correct-interface.patch b/backport-0017-Send-unicast-request-release-via-correct-interface.patch index 0c023f4885d23dadf167ec3c79bfbfccb330fe5f..e6c19d0ca5dd84c29dd221a13a9a04fefc82212c 100644 --- a/backport-0017-Send-unicast-request-release-via-correct-interface.patch +++ b/backport-0017-Send-unicast-request-release-via-correct-interface.patch @@ -1,9 +1,8 @@ Reference: https://src.fedoraproject.org/rpms/dhcp/blob/rawhide/f/0017-Send-unicast-request-release-via-correct-interface.patch -From 193c4d7631fd623efa601f52fdab6018bf8be771 Mon Sep 17 00:00:00 2001 +From d45463c2007a78623f2c90c250bb8e2f3e34a852 Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Thu, 21 Feb 2019 10:39:36 +0100 -Subject: [PATCH 17/26] Send unicast request/release via correct interface -Cc: pzhukov@redhat.com +Subject: [PATCH 17/28] Send unicast request/release via correct interface (#800561, #1177351) (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #30544]) @@ -12,10 +11,10 @@ Cc: pzhukov@redhat.com 1 file changed, 30 insertions(+) diff --git a/client/dhclient.c b/client/dhclient.c -index ccc98e4..27fde69 100644 +index 444d251..d607975 100644 --- a/client/dhclient.c +++ b/client/dhclient.c -@@ -3171,6 +3171,14 @@ void send_request (cpp) +@@ -3417,6 +3417,14 @@ void send_request (cpp) #endif if (destination.sin_addr.s_addr != INADDR_BROADCAST && fallback_interface) { @@ -30,7 +29,7 @@ index ccc98e4..27fde69 100644 result = send_packet(fallback_interface, NULL, &client->packet, client->packet_length, from, &destination, NULL); -@@ -3180,6 +3188,13 @@ void send_request (cpp) +@@ -3426,6 +3434,13 @@ void send_request (cpp) client->packet_length, fallback_interface->name); } @@ -44,7 +43,7 @@ index ccc98e4..27fde69 100644 } else { /* Send out a packet. */ -@@ -3297,6 +3312,14 @@ void send_release (cpp) +@@ -3543,6 +3558,14 @@ void send_release (cpp) } else #endif if (fallback_interface) { @@ -59,7 +58,7 @@ index ccc98e4..27fde69 100644 result = send_packet(fallback_interface, NULL, &client->packet, client->packet_length, from, &destination, NULL); -@@ -3306,6 +3329,13 @@ void send_release (cpp) +@@ -3552,6 +3575,13 @@ void send_release (cpp) client->packet_length, fallback_interface->name); } @@ -74,5 +73,5 @@ index ccc98e4..27fde69 100644 /* Send out a packet. */ result = send_packet(client->interface, NULL, &client->packet, -- -2.14.5 +2.35.1 diff --git a/backport-0018-No-subnet-declaration-for-iface-should-be-info-not-e.patch b/backport-0018-No-subnet-declaration-for-iface-should-be-info-not-e.patch index e2b30eb3e28f1b3cf1cb446d9f7aa0748b79a179..fd3da1d958b79418db559a62d8c875d8ebab991d 100644 --- a/backport-0018-No-subnet-declaration-for-iface-should-be-info-not-e.patch +++ b/backport-0018-No-subnet-declaration-for-iface-should-be-info-not-e.patch @@ -1,20 +1,19 @@ Reference: https://src.fedoraproject.org/rpms/dhcp/blob/rawhide/f/0018-No-subnet-declaration-for-iface-should-be-info-not-e.patch -From 2277d041692b8ebdf6b86d41e3a0bc0381cd1e47 Mon Sep 17 00:00:00 2001 +From 840c4f2175d14fa485f2a5e50a005847940b7e1f Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Thu, 21 Feb 2019 10:40:51 +0100 -Subject: [PATCH 18/26] No subnet declaration for ' should be info, not +Subject: [PATCH 18/28] No subnet declaration for ' should be info, not error. -Cc: pzhukov@redhat.com --- common/discover.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/common/discover.c b/common/discover.c -index 65881fc..056342c 100644 +index e562225..b4b1959 100644 --- a/common/discover.c +++ b/common/discover.c -@@ -801,9 +801,9 @@ discover_interfaces(int state) { +@@ -806,9 +806,9 @@ discover_interfaces(int state) { /* We must have a subnet declaration for each interface. */ if (!tmp->shared_network && (state == DISCOVER_SERVER)) { @@ -23,10 +22,10 @@ index 65881fc..056342c 100644 if (local_family == AF_INET) { - log_error("No subnet declaration for %s (%s).", + log_info("No subnet declaration for %s (%s).", - tmp->name, + tmp->name, (tmp->addresses == NULL) ? "no IPv4 addresses" : -@@ -818,26 +818,26 @@ discover_interfaces(int state) { +@@ -823,26 +823,26 @@ discover_interfaces(int state) { } else { strcpy(abuf, "no IPv6 addresses"); } @@ -60,5 +59,5 @@ index 65881fc..056342c 100644 } else { log_error ("You must write a %s", -- -2.14.5 +2.35.1 diff --git a/backport-0019-dhclient-write-DUID_LLT-even-in-stateless-mode-11563.patch b/backport-0019-dhclient-write-DUID_LLT-even-in-stateless-mode-11563.patch index 82073ef5018e97c1fde3eca860aefb2b5f747960..6353d774f20d4f09767f18ad4faa445eee66391d 100644 --- a/backport-0019-dhclient-write-DUID_LLT-even-in-stateless-mode-11563.patch +++ b/backport-0019-dhclient-write-DUID_LLT-even-in-stateless-mode-11563.patch @@ -1,10 +1,9 @@ Reference: https://src.fedoraproject.org/rpms/dhcp/blob/rawhide/f/0019-dhclient-write-DUID_LLT-even-in-stateless-mode-11563.patch -From 6ea56e988df1da51f7d0bdd8984b38e40102c17b Mon Sep 17 00:00:00 2001 +From eeb2e5bcedd62f21472da165b80741f8072420cf Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Thu, 21 Feb 2019 10:41:14 +0100 -Subject: [PATCH 19/26] dhclient: write DUID_LLT even in stateless mode +Subject: [PATCH 19/28] dhclient: write DUID_LLT even in stateless mode (#1156356) -Cc: pzhukov@redhat.com (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #38144]) --- @@ -12,10 +11,10 @@ Cc: pzhukov@redhat.com 1 file changed, 3 insertions(+) diff --git a/client/dhclient.c b/client/dhclient.c -index 27fde69..4e5546a 100644 +index d607975..6bbefc7 100644 --- a/client/dhclient.c +++ b/client/dhclient.c -@@ -1442,6 +1442,9 @@ void run_stateless(int exit_mode, u_int16_t port) +@@ -1462,6 +1462,9 @@ void run_stateless(int exit_mode, u_int16_t port) data_string_forget(&default_duid, MDL); form_duid(&default_duid, MDL); @@ -26,5 +25,5 @@ index 27fde69..4e5546a 100644 #ifdef DHCP4o6 -- -2.14.5 +2.35.1 diff --git a/backport-0020-Discover-all-hwaddress-for-xid-uniqueness.patch b/backport-0020-Discover-all-hwaddress-for-xid-uniqueness.patch index da7d3aac4f6a5dfb9a354e2608cf9f2aaffc3fe8..7423cbfbef1a659767971d8be8e699a73293f69b 100644 --- a/backport-0020-Discover-all-hwaddress-for-xid-uniqueness.patch +++ b/backport-0020-Discover-all-hwaddress-for-xid-uniqueness.patch @@ -1,9 +1,8 @@ Reference: https://src.fedoraproject.org/rpms/dhcp/blob/rawhide/f/0020-Discover-all-hwaddress-for-xid-uniqueness.patch -From 01ce61b8a0331a2f068ca2191bfb897b505c1b9d Mon Sep 17 00:00:00 2001 +From 908ea5f3a45a050a878de16d5acde6eda1b77d9f Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Thu, 21 Feb 2019 10:42:50 +0100 -Subject: [PATCH 20/26] Discover all hwaddress for xid uniqueness -Cc: pzhukov@redhat.com +Subject: [PATCH 20/28] Discover all hwaddress for xid uniqueness --- common/discover.c | 2 ++ @@ -12,10 +11,10 @@ Cc: pzhukov@redhat.com 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/common/discover.c b/common/discover.c -index 056342c..e66e1c5 100644 +index b4b1959..96dcdcf 100644 --- a/common/discover.c +++ b/common/discover.c -@@ -648,6 +648,8 @@ discover_interfaces(int state) { +@@ -653,6 +653,8 @@ discover_interfaces(int state) { interface_dereference(&tmp, MDL); tmp = interfaces; /* XXX */ } @@ -25,10 +24,10 @@ index 056342c..e66e1c5 100644 if (dhcp_interface_discovery_hook) { (*dhcp_interface_discovery_hook)(tmp); diff --git a/common/lpf.c b/common/lpf.c -index b732a86..a708a5d 100644 +index fcaa13d..77a5668 100644 --- a/common/lpf.c +++ b/common/lpf.c -@@ -699,8 +699,22 @@ ioctl_get_ll(char *name) +@@ -713,8 +713,22 @@ ioctl_get_ll(char *name) return sll; } @@ -51,7 +50,7 @@ index b732a86..a708a5d 100644 { struct hardware *hw = &info->hw_address; char *name = info->name; -@@ -710,7 +724,8 @@ get_hw_addr(struct interface_info *info) +@@ -724,7 +738,8 @@ get_hw_addr(struct interface_info *info) int sll_allocated = 0; char *dup = NULL; char *colon = NULL; @@ -61,7 +60,7 @@ index b732a86..a708a5d 100644 if (getifaddrs(&ifaddrs) == -1) log_fatal("Failed to get interfaces"); -@@ -794,14 +809,16 @@ get_hw_addr(struct interface_info *info) +@@ -808,14 +823,16 @@ get_hw_addr(struct interface_info *info) hw->hbuf[4] = 0xef; break; #endif @@ -83,10 +82,10 @@ index b732a86..a708a5d 100644 } #endif diff --git a/includes/dhcpd.h b/includes/dhcpd.h -index 0c1a0aa..635c510 100644 +index e9e52e7..fabad01 100644 --- a/includes/dhcpd.h +++ b/includes/dhcpd.h -@@ -2637,7 +2637,10 @@ void print_dns_status (int, struct dhcp_ddns_cb *, isc_result_t); +@@ -2653,7 +2653,10 @@ void print_dns_status (int, struct dhcp_ddns_cb *, isc_result_t); #endif const char *print_time(TIME); @@ -98,5 +97,5 @@ index 0c1a0aa..635c510 100644 const char *file, int line); char *format_lease_id(const unsigned char *s, unsigned len, int format, -- -2.14.5 +2.35.1 diff --git a/backport-0021-Load-leases-DB-in-non-replay-mode-only.patch b/backport-0021-Load-leases-DB-in-non-replay-mode-only.patch index 03c78cb680571552dd25100399e0698b5b03fcad..51767006b12610d9fba864bc18d143bbe8567a91 100644 --- a/backport-0021-Load-leases-DB-in-non-replay-mode-only.patch +++ b/backport-0021-Load-leases-DB-in-non-replay-mode-only.patch @@ -1,12 +1,15 @@ Reference: https://src.fedoraproject.org/rpms/dhcp/blob/rawhide/f/0021-Load-leases-DB-in-non-replay-mode-only.patch -commit 50c2b3ba8ce030a47b55dd707bb8a6ab20444a05 -Author: Pavel Zhukov -Date: Thu Feb 21 10:44:06 2019 +0100 +From bdbbb4be07bb33fe083baef2bd0ef38b91c11120 Mon Sep 17 00:00:00 2001 +From: Pavel Zhukov +Date: Thu, 21 Feb 2019 10:44:06 +0100 +Subject: [PATCH 21/28] Load leases DB in non-replay mode only - Load leases DB in non-replay mode only +--- + server/confpars.c | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/server/confpars.c b/server/confpars.c -index 2743979..6b61964 100644 +index 5a6396b..6e08ad7 100644 --- a/server/confpars.c +++ b/server/confpars.c @@ -134,6 +134,11 @@ isc_result_t read_conf_file (const char *filename, struct group *group, @@ -49,3 +52,6 @@ index 2743979..6b61964 100644 #endif return status; } +-- +2.35.1 + diff --git a/backport-0022-dhclient-make-sure-link-local-address-is-ready-in-st.patch b/backport-0022-dhclient-make-sure-link-local-address-is-ready-in-st.patch index 6ad2466048e2417674cad9dddd2ef478cd6b8c14..e547ae05b953fc71d254d4dd92f4c38cfef59b37 100644 --- a/backport-0022-dhclient-make-sure-link-local-address-is-ready-in-st.patch +++ b/backport-0022-dhclient-make-sure-link-local-address-is-ready-in-st.patch @@ -1,10 +1,9 @@ Reference: https://src.fedoraproject.org/rpms/dhcp/blob/rawhide/f/0022-dhclient-make-sure-link-local-address-is-ready-in-st.patch -From 9975d198a2c02e32c31c3e0f43d2aa79dfa7f508 Mon Sep 17 00:00:00 2001 +From 1f8681acba9ab70fbe17c85e5a1f4ce6a648b55d Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Thu, 28 Feb 2019 15:30:21 +0100 -Subject: [PATCH 22/26] dhclient: make sure link-local address is ready in +Subject: [PATCH 22/28] dhclient: make sure link-local address is ready in stateless mode -Cc: pzhukov@redhat.com Bug-url: https://bugzilla.redhat.com/1263466 --- @@ -12,10 +11,10 @@ Bug-url: https://bugzilla.redhat.com/1263466 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/client/dhclient.c b/client/dhclient.c -index 4e5546a..9b65438 100644 +index 6bbefc7..60836b4 100644 --- a/client/dhclient.c +++ b/client/dhclient.c -@@ -937,6 +937,12 @@ main(int argc, char **argv) { +@@ -943,6 +943,12 @@ main(int argc, char **argv) { inaddr_any.s_addr = INADDR_ANY; @@ -28,7 +27,7 @@ index 4e5546a..9b65438 100644 /* Stateless special case. */ if (stateless) { if (release_mode || (wanted_ia_na > 0) || -@@ -953,12 +959,6 @@ main(int argc, char **argv) { +@@ -959,12 +965,6 @@ main(int argc, char **argv) { finish(0); } @@ -41,7 +40,7 @@ index 4e5546a..9b65438 100644 /* Parse any extra command line configuration arguments: */ if ((dhcp_client_identifier_arg != NULL) && (*dhcp_client_identifier_arg != '\0')) { arg_conf_len = asprintf(&arg_conf, "send dhcp-client-identifier \"%s\";", dhcp_client_identifier_arg); -@@ -1413,20 +1413,30 @@ void run_stateless(int exit_mode, u_int16_t port) +@@ -1433,20 +1433,30 @@ void run_stateless(int exit_mode, u_int16_t port) IGNORE_UNUSED(port); #endif @@ -77,5 +76,5 @@ index 4e5546a..9b65438 100644 /* Parse the lease database. */ read_client_leases(); -- -2.14.5 +2.35.1 diff --git a/backport-0023-option-97-pxe-client-id.patch b/backport-0023-option-97-pxe-client-id.patch index 9d3d6fc3cdfb4bb527d6446bd47adee5929acc98..d6b0e219a3ba19b6cdd0216aef952676a7466970 100644 --- a/backport-0023-option-97-pxe-client-id.patch +++ b/backport-0023-option-97-pxe-client-id.patch @@ -1,9 +1,8 @@ Reference: https://src.fedoraproject.org/rpms/dhcp/blob/rawhide/f/0023-option-97-pxe-client-id.patch -From 6fd7894ea57791c8eee16c21d19da34b909e016e Mon Sep 17 00:00:00 2001 +From f01a29a90269c98a86accb0923d65aecf5f59b44 Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Thu, 28 Feb 2019 16:40:38 +0100 -Subject: [PATCH 23/26] option 97 - pxe-client-id -Cc: pzhukov@redhat.com +Subject: [PATCH 23/28] option 97 - pxe-client-id Bug-url: https://bugzilla.redhat.com/1058674 ISC-Bugs #38110 @@ -19,10 +18,10 @@ ISC-Bugs #38110 8 files changed, 69 insertions(+), 16 deletions(-) diff --git a/common/options.c b/common/options.c -index 3034cf0..686dd12 100644 +index 66433c4..4e26094 100644 --- a/common/options.c +++ b/common/options.c -@@ -4465,13 +4465,26 @@ int validate_packet(struct packet *packet) +@@ -4551,13 +4551,26 @@ int validate_packet(struct packet *packet) "a future version of ISC DHCP will reject this"); } } else { @@ -57,10 +56,10 @@ index 3034cf0..686dd12 100644 } diff --git a/common/tables.c b/common/tables.c -index f1be07d..4419220 100644 +index 96521a6..8034d94 100644 --- a/common/tables.c +++ b/common/tables.c -@@ -196,8 +196,9 @@ static struct option dhcp_options[] = { +@@ -200,8 +200,9 @@ static struct option dhcp_options[] = { /* Defined by RFC 4578 */ { "pxe-system-type", "Sa", &dhcp_universe, 93, 1 }, { "pxe-interface-id", "BBB", &dhcp_universe, 94, 1 }, @@ -72,7 +71,7 @@ index f1be07d..4419220 100644 #if defined(RFC4776_OPTIONS) { "geoconf-civic", "X", &dhcp_universe, 99, 1 }, diff --git a/includes/dhcp.h b/includes/dhcp.h -index 4cc547a..4eb9791 100644 +index 7202f1d..4ad3874 100644 --- a/includes/dhcp.h +++ b/includes/dhcp.h @@ -158,6 +158,7 @@ struct dhcp_packet { @@ -80,14 +79,14 @@ index 4cc547a..4eb9791 100644 #define DHO_CLIENT_LAST_TRANSACTION_TIME 91 #define DHO_ASSOCIATED_IP 92 +#define DHO_PXE_CLIENT_ID 97 /* RFC4578 */ + #define DHO_V6_ONLY_PREFERRED 108 /* RFC8925 */ #define DHO_SUBNET_SELECTION 118 /* RFC3011! */ #define DHO_DOMAIN_SEARCH 119 /* RFC3397 */ - #define DHO_CLASSLESS_STATIC_ROUTES 121 /* RFC3442 */ diff --git a/server/dhcp.c b/server/dhcp.c -index 0582c4c..4e86262 100644 +index 8363840..29d9c69 100644 --- a/server/dhcp.c +++ b/server/dhcp.c -@@ -222,6 +222,10 @@ dhcp (struct packet *packet) { +@@ -228,6 +228,10 @@ dhcp (struct packet *packet) { if (lease -> uid_len) { oc = lookup_option (&dhcp_universe, packet -> options, DHO_DHCP_CLIENT_IDENTIFIER); @@ -98,7 +97,7 @@ index 0582c4c..4e86262 100644 if (!oc) goto nolease; -@@ -820,6 +824,9 @@ void dhcprelease (packet, ms_nulltp) +@@ -826,6 +830,9 @@ void dhcprelease (packet, ms_nulltp) oc = lookup_option (&dhcp_universe, packet -> options, DHO_DHCP_CLIENT_IDENTIFIER); @@ -108,7 +107,7 @@ index 0582c4c..4e86262 100644 memset (&data, 0, sizeof data); if (oc && evaluate_option_cache (&data, packet, (struct lease *)0, -@@ -1331,6 +1338,9 @@ void dhcpinform (packet, ms_nulltp) +@@ -1338,6 +1345,9 @@ void dhcpinform (packet, ms_nulltp) */ oc = lookup_option(&dhcp_universe, packet->options, DHO_DHCP_CLIENT_IDENTIFIER); @@ -118,7 +117,7 @@ index 0582c4c..4e86262 100644 memset(&d1, 0, sizeof(d1)); if (oc && evaluate_option_cache(&d1, packet, NULL, NULL, -@@ -2441,6 +2451,9 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp) +@@ -2448,6 +2458,9 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp) can be used. */ oc = lookup_option (&dhcp_universe, packet -> options, DHO_DHCP_CLIENT_IDENTIFIER); @@ -128,7 +127,7 @@ index 0582c4c..4e86262 100644 if (oc && evaluate_option_cache (&d1, packet, lease, (struct client_state *)0, -@@ -3033,6 +3046,9 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp) +@@ -3040,6 +3053,9 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp) /* Record the uid, if given... */ oc = lookup_option (&dhcp_universe, packet -> options, DHO_DHCP_CLIENT_IDENTIFIER); @@ -138,7 +137,7 @@ index 0582c4c..4e86262 100644 if (oc && evaluate_option_cache(&d1, packet, lease, NULL, packet->options, state->options, -@@ -4150,6 +4166,9 @@ int find_lease (struct lease **lp, +@@ -4258,6 +4274,9 @@ int find_lease (struct lease **lp, specified unique client identifier. */ oc = lookup_option (&dhcp_universe, packet -> options, DHO_DHCP_CLIENT_IDENTIFIER); @@ -149,7 +148,7 @@ index 0582c4c..4e86262 100644 if (oc && evaluate_option_cache (&client_identifier, diff --git a/server/dhcpd.conf.5 b/server/dhcpd.conf.5 -index 89b5540..4751a8b 100644 +index b7e79ea..2354b1d 100644 --- a/server/dhcpd.conf.5 +++ b/server/dhcpd.conf.5 @@ -1664,10 +1664,12 @@ should be a name identifying the host. If a \fIhostname\fR option is @@ -178,7 +177,7 @@ index 89b5540..4751a8b 100644 parameter for DHCPv6 servers. For example, it is not possible to match a host declaration to a \fIhost-name\fR option. This is diff --git a/server/dhcpleasequery.c b/server/dhcpleasequery.c -index 7be0788..2fee698 100644 +index 0f1d4f7..dae4ae7 100644 --- a/server/dhcpleasequery.c +++ b/server/dhcpleasequery.c @@ -276,7 +276,7 @@ dhcpleasequery(struct packet *packet, int ms_nulltp) { @@ -214,7 +213,7 @@ index 7be0788..2fee698 100644 sizeof(dbg_info), "client-id %s", diff --git a/server/failover.c b/server/failover.c -index 72f7b00..40fa691 100644 +index 5b36d3a..a641e86 100644 --- a/server/failover.c +++ b/server/failover.c @@ -5988,6 +5988,9 @@ int load_balance_mine (struct packet *packet, dhcp_failover_state_t *state) @@ -228,7 +227,7 @@ index 72f7b00..40fa691 100644 if (oc && evaluate_option_cache(&ds, packet, NULL, NULL, diff --git a/server/mdb.c b/server/mdb.c -index 052df67..8851366 100644 +index 60a40e1..2cd5605 100644 --- a/server/mdb.c +++ b/server/mdb.c @@ -129,8 +129,9 @@ static int find_uid_statement (struct executable_statement *esp, @@ -244,5 +243,5 @@ index 052df67..8851366 100644 log_error ("dhcp client identifier may not be %s", "specified conditionally."); -- -2.14.5 +2.35.1 diff --git a/backport-0024-Detect-system-time-changes.patch b/backport-0024-Detect-system-time-changes.patch index 8929866227417b038730c62ec1a8860c71189cac..e31fa1d1c48b2f8b3001464a248239ce45a6c805 100644 --- a/backport-0024-Detect-system-time-changes.patch +++ b/backport-0024-Detect-system-time-changes.patch @@ -1,9 +1,8 @@ Reference: https://src.fedoraproject.org/rpms/dhcp/blob/rawhide/f/0024-Detect-system-time-changes.patch -From 41c6032ace65119e6a400365f7e90283c930afd4 Mon Sep 17 00:00:00 2001 +From a2fb8759ab48c88e3f8df94ae6e156c357d932a2 Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Tue, 22 Oct 2019 16:23:01 +0200 -Subject: [PATCH 24/26] Detect system time changes -Cc: pzhukov@redhat.com +Subject: [PATCH 24/28] Detect system time changes --- client/dhclient.c | 6 ++++++ @@ -13,10 +12,10 @@ Cc: pzhukov@redhat.com 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/client/dhclient.c b/client/dhclient.c -index 9b65438..44d508a 100644 +index 60836b4..fd18813 100644 --- a/client/dhclient.c +++ b/client/dhclient.c -@@ -5408,6 +5408,12 @@ isc_result_t dhcp_set_control_state (control_object_state_t oldstate, +@@ -5665,6 +5665,12 @@ isc_result_t dhcp_set_control_state (control_object_state_t oldstate, case server_awaken: state_reboot (client); break; @@ -30,7 +29,7 @@ index 9b65438..44d508a 100644 } } diff --git a/common/dispatch.c b/common/dispatch.c -index d7fe200..8a24499 100644 +index 9741ff5..11c1787 100644 --- a/common/dispatch.c +++ b/common/dispatch.c @@ -118,7 +118,6 @@ dispatch(void) @@ -59,7 +58,7 @@ index d7fe200..8a24499 100644 log_fatal ("Dispatch routine failed: %s -- exiting", diff --git a/includes/dhcpd.h b/includes/dhcpd.h -index 635c510..ec6c227 100644 +index fabad01..9663508 100644 --- a/includes/dhcpd.h +++ b/includes/dhcpd.h @@ -524,7 +524,8 @@ typedef enum { @@ -73,7 +72,7 @@ index 635c510..ec6c227 100644 typedef struct { diff --git a/server/dhcpd.c b/server/dhcpd.c -index 530a923..4aef16b 100644 +index 845d0cc..3b3bd3b 100644 --- a/server/dhcpd.c +++ b/server/dhcpd.c @@ -1767,6 +1767,12 @@ isc_result_t dhcp_set_control_state (control_object_state_t oldstate, @@ -90,5 +89,5 @@ index 530a923..4aef16b 100644 return DHCP_R_INVALIDARG; /* Re-entry. */ -- -2.14.5 +2.35.1 diff --git a/backport-0025-bind-Detect-system-time-changes.patch b/backport-0025-bind-Detect-system-time-changes.patch index 4ce13345db8522648d4eee47d7656379b7677cf7..cb1f134e991311c096630ef25a50317ed9fd3677 100644 --- a/backport-0025-bind-Detect-system-time-changes.patch +++ b/backport-0025-bind-Detect-system-time-changes.patch @@ -1,23 +1,22 @@ Reference: https://src.fedoraproject.org/rpms/dhcp/blob/rawhide/f/0025-bind-Detect-system-time-changes.patch -From ef4f5e80d8a1ea1507829ea6f5214f276478f475 Mon Sep 17 00:00:00 2001 +From 8e49f4b460ad20890c63a385c17d3e5decd45a82 Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Tue, 22 Oct 2019 16:23:24 +0200 -Subject: [PATCH 25/27] bind: Detect system time changes -Cc: pzhukov@redhat.com +Subject: [PATCH 25/28] bind: Detect system time changes --- - bind/bind/lib/isc/include/isc/result.h | 4 ++- - bind/bind/lib/isc/include/isc/util.h | 4 +++ - bind/bind/lib/isc/result.c | 2 ++ - bind/bind/lib/isc/unix/app.c | 41 ++++++++++++++++++++++++++++--- - bind/bind/lib/isc/unix/include/isc/time.h | 20 +++++++++++++++ - bind/bind/lib/isc/unix/time.c | 22 +++++++++++++++++ + .../bind-9.11.36/lib/isc/include/isc/result.h | 4 +- + bind/bind-9.11.36/lib/isc/include/isc/util.h | 4 ++ + bind/bind-9.11.36/lib/isc/result.c | 2 + + bind/bind-9.11.36/lib/isc/unix/app.c | 41 +++++++++++++++++-- + .../lib/isc/unix/include/isc/time.h | 20 +++++++++ + bind/bind-9.11.36/lib/isc/unix/time.c | 22 ++++++++++ 6 files changed, 89 insertions(+), 4 deletions(-) -diff --git a/bind/bind/lib/isc/include/isc/result.h b/bind/bind/lib/isc/include/isc/result.h -index 0389efa..0e35f98 100644 ---- a/bind/bind/lib/isc/include/isc/result.h -+++ b/bind/bind/lib/isc/include/isc/result.h +diff --git a/bind/bind-9.11.36/lib/isc/include/isc/result.h b/bind/bind-9.11.36/lib/isc/include/isc/result.h +index 916641f..51c2468 100644 +--- a/bind/bind-9.11.36/lib/isc/include/isc/result.h ++++ b/bind/bind-9.11.36/lib/isc/include/isc/result.h @@ -89,7 +89,9 @@ #define ISC_R_DISCFULL 67 /*%< disc full */ #define ISC_R_DEFAULT 68 /*%< default */ @@ -29,11 +28,11 @@ index 0389efa..0e35f98 100644 ISC_LANG_BEGINDECLS -diff --git a/bind/bind/lib/isc/include/isc/util.h b/bind/bind/lib/isc/include/isc/util.h -index 973c348..cceeb5e 100644 ---- a/bind/bind/lib/isc/include/isc/util.h -+++ b/bind/bind/lib/isc/include/isc/util.h -@@ -289,6 +289,10 @@ extern void mock_assert(const int result, const char* const expression, +diff --git a/bind/bind-9.11.36/lib/isc/include/isc/util.h b/bind/bind-9.11.36/lib/isc/include/isc/util.h +index 9111c2a..20a05b4 100644 +--- a/bind/bind-9.11.36/lib/isc/include/isc/util.h ++++ b/bind/bind-9.11.36/lib/isc/include/isc/util.h +@@ -325,6 +325,10 @@ extern void mock_assert(const int result, const char* const expression, * Time */ #define TIME_NOW(tp) RUNTIME_CHECK(isc_time_now((tp)) == ISC_R_SUCCESS) @@ -44,10 +43,10 @@ index 973c348..cceeb5e 100644 /*% * Alignment -diff --git a/bind/bind/lib/isc/result.c b/bind/bind/lib/isc/result.c -index a9db132..7c04831 100644 ---- a/bind/bind/lib/isc/result.c -+++ b/bind/bind/lib/isc/result.c +diff --git a/bind/bind-9.11.36/lib/isc/result.c b/bind/bind-9.11.36/lib/isc/result.c +index 887b08c..2106a3a 100644 +--- a/bind/bind-9.11.36/lib/isc/result.c ++++ b/bind/bind-9.11.36/lib/isc/result.c @@ -105,6 +105,7 @@ static const char *description[ISC_R_NRESULTS] = { "disc full", /*%< 67 */ "default", /*%< 68 */ @@ -64,10 +63,10 @@ index a9db132..7c04831 100644 }; #define ISC_RESULT_RESULTSET 2 -diff --git a/bind/bind/lib/isc/unix/app.c b/bind/bind/lib/isc/unix/app.c -index a6e9882..dbd23f7 100644 ---- a/bind/bind/lib/isc/unix/app.c -+++ b/bind/bind/lib/isc/unix/app.c +diff --git a/bind/bind-9.11.36/lib/isc/unix/app.c b/bind/bind-9.11.36/lib/isc/unix/app.c +index 8189c63..4aabaa4 100644 +--- a/bind/bind-9.11.36/lib/isc/unix/app.c ++++ b/bind/bind-9.11.36/lib/isc/unix/app.c @@ -442,15 +442,51 @@ isc__app_ctxonrun(isc_appctx_t *ctx0, isc_mem_t *mctx, isc_task_t *task, static isc_result_t evloop(isc__appctx_t *ctx) { @@ -132,10 +131,10 @@ index a6e9882..dbd23f7 100644 us = isc_time_microdiff(&when, &now); if (us == 0) call_timer_dispatch = true; -diff --git a/bind/bind/lib/isc/unix/include/isc/time.h b/bind/bind/lib/isc/unix/include/isc/time.h -index b864c29..5dd43c9 100644 ---- a/bind/bind/lib/isc/unix/include/isc/time.h -+++ b/bind/bind/lib/isc/unix/include/isc/time.h +diff --git a/bind/bind-9.11.36/lib/isc/unix/include/isc/time.h b/bind/bind-9.11.36/lib/isc/unix/include/isc/time.h +index 03512c1..99e0dfa 100644 +--- a/bind/bind-9.11.36/lib/isc/unix/include/isc/time.h ++++ b/bind/bind-9.11.36/lib/isc/unix/include/isc/time.h @@ -132,6 +132,26 @@ isc_time_isepoch(const isc_time_t *t); *\li 't' is a valid pointer. */ @@ -163,10 +162,10 @@ index b864c29..5dd43c9 100644 isc_result_t isc_time_now(isc_time_t *t); /*%< -diff --git a/bind/bind/lib/isc/unix/time.c b/bind/bind/lib/isc/unix/time.c -index 8edc9df..fe0bb91 100644 ---- a/bind/bind/lib/isc/unix/time.c -+++ b/bind/bind/lib/isc/unix/time.c +diff --git a/bind/bind-9.11.36/lib/isc/unix/time.c b/bind/bind-9.11.36/lib/isc/unix/time.c +index bcca41b..af6ea7f 100644 +--- a/bind/bind-9.11.36/lib/isc/unix/time.c ++++ b/bind/bind-9.11.36/lib/isc/unix/time.c @@ -498,3 +498,25 @@ isc_time_formatISO8601ms(const isc_time_t *t, char *buf, unsigned int len) { t->nanoseconds / NS_PER_MS); } @@ -194,5 +193,5 @@ index 8edc9df..fe0bb91 100644 +}; +#endif -- -2.14.5 +2.35.1 diff --git a/backport-0026-Add-dhclient-5-B-option-description.patch b/backport-0026-Add-dhclient-5-B-option-description.patch index 16ea89ae0d68fd285743fc44e38fce6e52fb4749..826b531906c324ce60ccb575d69e8f624c3d9896 100644 --- a/backport-0026-Add-dhclient-5-B-option-description.patch +++ b/backport-0026-Add-dhclient-5-B-option-description.patch @@ -1,17 +1,19 @@ Reference: https://src.fedoraproject.org/rpms/dhcp/blob/rawhide/f/0026-Add-dhclient-5-B-option-description.patch -commit 6acfd3125546a0e5db8fae8a9964cd2f88bf68c0 -Author: Pavel Zhukov -Date: Tue Oct 22 16:28:04 2019 +0200 +From aa328eef58ff93110f2a52cb3a80002ab8cee36e Mon Sep 17 00:00:00 2001 +From: Pavel Zhukov +Date: Tue, 22 Oct 2019 16:28:04 +0200 +Subject: [PATCH 26/28] Add dhclient(5) -B option description - Add dhclient(5) -B option description - - Bug-Url: https://bugzilla.redhat.com/1764088 +Bug-Url: https://bugzilla.redhat.com/1764088 +--- + client/dhclient.8 | 5 +++++ + 1 file changed, 5 insertions(+) diff --git a/client/dhclient.8 b/client/dhclient.8 -index 0145b9f..5226de5 100644 +index bacf3bc..76f0cc0 100644 --- a/client/dhclient.8 +++ b/client/dhclient.8 -@@ -552,6 +552,11 @@ Path to the network configuration script invoked by +@@ -553,6 +553,11 @@ Path to the network configuration script invoked by when it gets a lease. If unspecified, the default .B CLIENTBINDIR/dhclient-script is used. See \fBdhclient-script(8)\fR for a description of this file. @@ -23,3 +25,6 @@ index 0145b9f..5226de5 100644 .PP .SH PORTS During operations the client may use multiple UDP ports +-- +2.35.1 + diff --git a/backport-0027-Add-missed-sd-notify-patch-to-manage-dhcpd-with-syst.patch b/backport-0027-Add-missed-sd-notify-patch-to-manage-dhcpd-with-syst.patch index b2f02c6b5cafef23bd3bfcd82346110de439c880..f98658aedf6f7fac6211db59d0d255bd1023f692 100644 --- a/backport-0027-Add-missed-sd-notify-patch-to-manage-dhcpd-with-syst.patch +++ b/backport-0027-Add-missed-sd-notify-patch-to-manage-dhcpd-with-syst.patch @@ -1,9 +1,8 @@ Reference: https://src.fedoraproject.org/rpms/dhcp/blob/rawhide/f/0027-Add-missed-sd-notify-patch-to-manage-dhcpd-with-syst.patch -From 8d974fd1f667e1b957ad4092fe66a8bb94f5f8fd Mon Sep 17 00:00:00 2001 +From d1b1f91a7982be28acdfb580996c93aafcc76cc2 Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Thu, 7 Nov 2019 14:47:45 +0100 -Subject: [PATCH 1/1] Add missed sd notify patch to manage dhcpd with systemd -Cc: pzhukov@redhat.com +Subject: [PATCH 27/28] Add missed sd notify patch to manage dhcpd with systemd --- configure.ac | 11 +++++++++++ @@ -12,10 +11,10 @@ Cc: pzhukov@redhat.com 3 files changed, 35 insertions(+) diff --git a/configure.ac b/configure.ac -index 15fc0d7..0c08000 100644 +index 300117f..f644e71 100644 --- a/configure.ac +++ b/configure.ac -@@ -1014,6 +1014,17 @@ if test x$ldap = xyes || test x$ldapcrypto = xyes || test x$ldap_gssapi = xyes; +@@ -1005,6 +1005,17 @@ if test x$ldap = xyes || test x$ldapcrypto = xyes || test x$ldap_gssapi = xyes; AC_SUBST(LDAP_CFLAGS, [$LDAP_CFLAGS]) fi @@ -34,7 +33,7 @@ index 15fc0d7..0c08000 100644 # AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[],[]) & etc). CFLAGS="$CFLAGS $STD_CWARNINGS" diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c -index 7b4f4f1..9eb5bfd 100644 +index 0dc17d6..d3ad31e 100644 --- a/relay/dhcrelay.c +++ b/relay/dhcrelay.c @@ -37,6 +37,10 @@ @@ -48,7 +47,7 @@ index 7b4f4f1..9eb5bfd 100644 TIME default_lease_time = 43200; /* 12 hours... */ TIME max_lease_time = 86400; /* 24 hours... */ struct tree_cache *global_options[256]; -@@ -845,6 +849,14 @@ main(int argc, char **argv) { +@@ -869,6 +873,14 @@ main(int argc, char **argv) { } #endif @@ -64,7 +63,7 @@ index 7b4f4f1..9eb5bfd 100644 dispatch(); diff --git a/server/dhcpd.c b/server/dhcpd.c -index 4aef16b..778ef8d 100644 +index 3b3bd3b..9223d5b 100644 --- a/server/dhcpd.c +++ b/server/dhcpd.c @@ -60,6 +60,10 @@ gid_t set_gid = 0; @@ -94,5 +93,5 @@ index 4aef16b..778ef8d 100644 * Receive packets and dispatch them... * dispatch() will never return. -- -2.14.5 +2.35.1 diff --git a/backport-CVE-2021-25217.patch b/backport-CVE-2021-25217.patch deleted file mode 100644 index 422b49dc6727543aab12c596ec1fea8fdd32998f..0000000000000000000000000000000000000000 --- a/backport-CVE-2021-25217.patch +++ /dev/null @@ -1,34 +0,0 @@ -Reference: https://downloads.isc.org/isc/dhcp/4.4.2-P1/patches/4.4.2.CVE-2021-25217.patch -diff --git a/common/parse.c b/common/parse.c -index 3329657..8772540 100644 ---- a/common/parse.c -+++ b/common/parse.c -@@ -3,7 +3,7 @@ - Common parser code for dhcpd and dhclient. */ - - /* -- * Copyright (c) 2004-2019 by Internet Systems Consortium, Inc. ("ISC") -+ * Copyright (c) 2004-2021 by Internet Systems Consortium, Inc. ("ISC") - * Copyright (c) 1995-2003 by Internet Software Consortium - * - * This Source Code Form is subject to the terms of the Mozilla Public -@@ -5613,13 +5613,14 @@ int parse_X (cfile, buf, max) - skip_to_semi (cfile); - return 0; - } -- convert_num (cfile, &buf [len], val, 16, 8); -- if (len++ > max) { -+ if (len >= max) { - parse_warn (cfile, - "hexadecimal constant too long."); - skip_to_semi (cfile); - return 0; - } -+ convert_num (cfile, &buf [len], val, 16, 8); -+ len++; - token = peek_token (&val, (unsigned *)0, cfile); - if (token == COLON) - token = next_token (&val, --- -1.8.3.1 - diff --git a/backport-Fix-CVE-2021-25214.patch b/backport-Fix-CVE-2021-25214.patch deleted file mode 100644 index 65267f466244539749f343716eda184065d5982e..0000000000000000000000000000000000000000 --- a/backport-Fix-CVE-2021-25214.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 813a1d0f943f7b4ecf43c449a08762a8d8557a45 Mon Sep 17 00:00:00 2001 -From: UNKNOWN <> -Date: Tue, 27 Apr 2021 12:02:53 +0800 -Subject: [PATCH v2 1/2] Fix CVE-2021-25214 - -Conflict:NA -Reference:https://downloads.isc.org/isc/bind9/private/40732ca6e4fcc9d0/patches/CVE-2021-25214.patch - - -diff --git a/bind/bind-9.11.14/lib/dns/xfrin.c b/bind/bind-9.11.14/lib/dns/xfrin.c -index 558f40c..bae6d41 100644 ---- a/bind/bind-9.11.14/lib/dns/xfrin.c -+++ b/bind/bind-9.11.14/lib/dns/xfrin.c -@@ -477,6 +477,20 @@ xfr_rr(dns_xfrin_ctx_t *xfr, dns_name_t *name, isc_uint32_t ttl, - dns_rdatatype_ismeta(rdata->type)) - FAIL(DNS_R_FORMERR); - -+ /* -+ * Immediately reject the entire transfer if the RR that is currently -+ * being processed is an SOA record that is not placed at the zone -+ * apex. -+ */ -+ if (rdata->type == dns_rdatatype_soa && -+ !dns_name_equal(&xfr->name, name)) { -+ char namebuf[DNS_NAME_FORMATSIZE]; -+ dns_name_format(name, namebuf, sizeof(namebuf)); -+ xfrin_log(xfr, ISC_LOG_DEBUG(3), "SOA name mismatch: '%s'", -+ namebuf); -+ FAIL(DNS_R_NOTZONETOP); -+ } -+ - redo: - switch (xfr->state) { - case XFRST_SOAQUERY: --- -1.8.3.1 diff --git a/backport-Fix-CVE-2021-25215.patch b/backport-Fix-CVE-2021-25215.patch deleted file mode 100644 index a78c7921232afe5da5e5cad0403c9d83749db52a..0000000000000000000000000000000000000000 --- a/backport-Fix-CVE-2021-25215.patch +++ /dev/null @@ -1,36 +0,0 @@ -From c42cc79ef9a23d8273b273bb86a1c8c9995b28a0 Mon Sep 17 00:00:00 2001 -From: UNKNOWN <> -Date: Tue, 27 Apr 2021 12:12:24 +0800 -Subject: [PATCH v2 2/2] Fix CVE-2021-25215 - -Conflict:NA -Reference:https://downloads.isc.org/isc/bind9/private/40732ca6e4fcc9d0/patches/CVE-2021-25215.patch - - -diff --git a/bind/bind-9.11.14/bin/named/query.c b/bind/bind-9.11.14/bin/named/query.c -index 6e988f5..2e7700a 100644 ---- a/bind/bind-9.11.14/bin/named/query.c -+++ b/bind/bind-9.11.14/bin/named/query.c -@@ -9139,10 +9139,17 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype) - if (noqname != NULL) - query_addnoqnameproof(client, noqname); - /* -- * We shouldn't ever fail to add 'rdataset' -- * because it's already in the answer. -+ * 'rdataset' will only be non-NULL here if the ANSWER section -+ * of the message to be sent to the client already contains an -+ * RRset with the same owner name and the same type as -+ * 'rdataset'. This should never happen, with one exception: -+ * when chasing DNAME records, one of the DNAME records placed -+ * in the ANSWER section may turn out to be the final answer to -+ * the client's query, but we have no way of knowing that until -+ * now. In such a case, 'rdataset' will be freed later, so we -+ * do not need to free it here. - */ -- INSIST(rdataset == NULL); -+ INSIST(rdataset == NULL || qtype == dns_rdatatype_dname); - } - - addauth: --- -1.8.3.1 diff --git a/backport-Fix-CVE-2021-25219.patch b/backport-Fix-CVE-2021-25219.patch deleted file mode 100644 index 65c012ab28c57fa7a470ad0cfd62442ef8396483..0000000000000000000000000000000000000000 --- a/backport-Fix-CVE-2021-25219.patch +++ /dev/null @@ -1,69 +0,0 @@ -Conflict: NA -Reference : https://downloads.isc.org/isc/bind9/9.11.36/patches/CVE-2021-25219.patch -diff --git a/bind/bind-9.11.14/bin/named/config.c b/bind/bind-9.11.14/bin/named/config.c -index fbd2f2126c..d24e4f8a26 100644 ---- a/bind/bind-9.11.14/bin/named/config.c -+++ b/bind/bind-9.11.14/bin/named/config.c -@@ -175,7 +175,7 @@ options {\n\ - #if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2) - " geoip-use-ecs yes;\n" - #endif --" lame-ttl 600;\n" -+" lame-ttl 0;\n" - #ifdef HAVE_LMDB - " lmdb-mapsize 32M;\n" - #endif -diff --git a/bind/bind-9.11.14/bin/named/server.c b/bind/bind-9.11.14/bin/named/server.c -index 6ff95e3bcc..9826588e6d 100644 ---- a/bind/bind-9.11.14/bin/named/server.c -+++ b/bind/bind-9.11.14/bin/named/server.c -@@ -3986,8 +3986,12 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, - result = ns_config_get(maps, "lame-ttl", &obj); - INSIST(result == ISC_R_SUCCESS); - lame_ttl = cfg_obj_asuint32(obj); -- if (lame_ttl > 1800) -- lame_ttl = 1800; -+ if (lame_ttl > 0) { -+ cfg_obj_log(obj, ns_g_lctx, ISC_LOG_WARNING, -+ "disabling lame cache despite lame-ttl > 0 as it " -+ "may cause performance issues"); -+ lame_ttl = 0; -+ } - dns_resolver_setlamettl(view->resolver, lame_ttl); - - /* -diff --git a/bind/bind-9.11.14/lib/dns/resolver.c b/bind/bind-9.11.14/lib/dns/resolver.c -index 8175f7918b..b34cb12b73 100644 ---- a/bind/bind-9.11.14/lib/dns/resolver.c -+++ b/bind/bind-9.11.14/lib/dns/resolver.c -@@ -8396,18 +8396,20 @@ resquery_response(isc_task_t *task, isc_event_t *event) { - /* - * Is the server lame? - */ -- if (res->lame_ttl != 0 && !ISFORWARDER(query->addrinfo) && -- is_lame(fctx)) { -+ if (!ISFORWARDER(query->addrinfo) && is_lame(fctx)) { - inc_stats(res, dns_resstatscounter_lame); - log_lame(fctx, query->addrinfo); -- result = dns_adb_marklame(fctx->adb, query->addrinfo, -- &fctx->name, fctx->type, -- now + res->lame_ttl); -- if (result != ISC_R_SUCCESS) -- isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER, -- DNS_LOGMODULE_RESOLVER, ISC_LOG_ERROR, -- "could not mark server as lame: %s", -- isc_result_totext(result)); -+ if (res->lame_ttl != 0) { -+ result = dns_adb_marklame(fctx->adb, query->addrinfo, -+ &fctx->name, fctx->type, -+ now + res->lame_ttl); -+ if (result != ISC_R_SUCCESS) { -+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER, -+ DNS_LOGMODULE_RESOLVER, ISC_LOG_ERROR, -+ "could not mark server as lame: %s", -+ isc_result_totext(result)); -+ } -+ } - broken_server = DNS_R_LAME; - keep_trying = true; - FCTXTRACE("lame server"); diff --git a/backport-Fix-CVE-2021-25220.patch b/backport-Fix-CVE-2021-25220.patch index 2c8de1993ca399a6865c4a25827132496406e5b8..72af872d0b9b45b7ecc5565439df9cabe0b503a2 100644 --- a/backport-Fix-CVE-2021-25220.patch +++ b/backport-Fix-CVE-2021-25220.patch @@ -1,14 +1,8 @@ -Conflict: rmessage to fctx->rmessage -Reference: -https://gitlab.isc.org/isc-projects/bind9/-/commit/fc9cb6cf91c1a36b797ffef0a277dbb3989d43dc ---- - bind/bind-9.11.14/lib/dns/resolver.c | 130 +++++++++++++++++++++++++-- - 1 file changed, 125 insertions(+), 5 deletions(-) - -diff --git a/bind/bind-9.11.14/lib/dns/resolver.c b/bind/bind-9.11.14/lib/dns/resolver.c -index cff130c..45faf19 100644 ---- a/bind/bind-9.11.14/lib/dns/resolver.c -+++ b/bind/bind-9.11.14/lib/dns/resolver.c +Reference: https://src.fedoraproject.org/rpms/dhcp/blob/rawhide/f/CVE-2021-25220.patch +diff --git a/bind/bind-9.11.36/lib/dns/resolver.c b/bind/bind-9.11.36/lib/dns/resolver.c +index b34cb12..8ae9a99 100644 +--- a/bind/bind-9.11.36/lib/dns/resolver.c ++++ b/bind/bind-9.11.36/lib/dns/resolver.c @@ -63,6 +63,7 @@ #include #include @@ -17,7 +11,7 @@ index cff130c..45faf19 100644 #ifdef WANT_QUERYTRACE #define RTRACE(m) isc_log_write(dns_lctx, \ -@@ -303,6 +304,8 @@ struct fetchctx { +@@ -311,6 +312,8 @@ struct fetchctx { bool ns_ttl_ok; uint32_t ns_ttl; isc_counter_t * qc; @@ -26,7 +20,7 @@ index cff130c..45faf19 100644 /*% * The number of events we're waiting for. -@@ -3344,6 +3347,7 @@ fctx_getaddresses(fetchctx_t *fctx, bool badcache) { +@@ -3389,6 +3392,7 @@ fctx_getaddresses(fetchctx_t *fctx, bool badcache) { if (result == ISC_R_SUCCESS) { fwd = ISC_LIST_HEAD(forwarders->fwdrs); fctx->fwdpolicy = forwarders->fwdpolicy; @@ -34,7 +28,7 @@ index cff130c..45faf19 100644 if (fctx->fwdpolicy == dns_fwdpolicy_only && isstrictsubdomain(domain, &fctx->domain)) { fcount_decr(fctx); -@@ -4368,6 +4372,9 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type, +@@ -4418,6 +4422,9 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type, fctx->restarts = 0; fctx->querysent = 0; fctx->referrals = 0; @@ -44,7 +38,7 @@ index cff130c..45faf19 100644 TIME_NOW(&fctx->start); fctx->timeouts = 0; fctx->lamecount = 0; -@@ -4421,8 +4428,10 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type, +@@ -4476,8 +4483,10 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type, domain = dns_fixedname_initname(&fixed); result = dns_fwdtable_find2(fctx->res->view->fwdtable, fwdname, domain, &forwarders); @@ -56,7 +50,7 @@ index cff130c..45faf19 100644 if (fctx->fwdpolicy != dns_fwdpolicy_only) { /* -@@ -6175,6 +6184,112 @@ mark_related(dns_name_t *name, dns_rdataset_t *rdataset, +@@ -6226,6 +6235,112 @@ mark_related(dns_name_t *name, dns_rdataset_t *rdataset, rdataset->attributes |= DNS_RDATASETATTR_EXTERNAL; } @@ -169,8 +163,8 @@ index cff130c..45faf19 100644 static isc_result_t check_section(void *arg, dns_name_t *addname, dns_rdatatype_t type, dns_section_t section) -@@ -6201,7 +6316,7 @@ check_section(void *arg, dns_name_t *addname, dns_rdatatype_t type, - result = dns_message_findname(fctx->rmessage, section, addname, +@@ -6254,7 +6369,7 @@ check_section(void *arg, dns_name_t *addname, dns_rdatatype_t type, + result = dns_message_findname(rmessage, section, addname, dns_rdatatype_any, 0, &name, NULL); if (result == ISC_R_SUCCESS) { - external = !dns_name_issubdomain(name, &fctx->domain); @@ -178,7 +172,7 @@ index cff130c..45faf19 100644 if (type == dns_rdatatype_a) { for (rdataset = ISC_LIST_HEAD(name->list); rdataset != NULL; -@@ -7071,6 +7186,13 @@ answer_response(fetchctx_t *fctx) { +@@ -7136,6 +7251,13 @@ answer_response(fetchctx_t *fctx, dns_message_t *message) { break; case dns_namereln_subdomain: @@ -192,7 +186,7 @@ index cff130c..45faf19 100644 /* * In-scope DNAME records must have at least * as many labels as the domain being queried. -@@ -7299,11 +7421,9 @@ answer_response(fetchctx_t *fctx) { +@@ -7371,11 +7493,9 @@ answer_response(fetchctx_t *fctx, dns_message_t *message) { */ result = dns_message_firstname(message, DNS_SECTION_AUTHORITY); while (!done && result == ISC_R_SUCCESS) { @@ -205,6 +199,3 @@ index cff130c..45faf19 100644 /* * We expect to find NS or SIG NS rdatasets, and * nothing else. --- -2.23.0 - diff --git a/backport-Fix-CVE-2022-2928.patch b/backport-Fix-CVE-2022-2928.patch index 8dea3b37ccabb163f7d335669113fad8959f75cf..ab0961dc0bf2e94810d349774388f6ffd6e2266f 100644 --- a/backport-Fix-CVE-2022-2928.patch +++ b/backport-Fix-CVE-2022-2928.patch @@ -6,7 +6,7 @@ Reference:https://downloads.isc.org/isc/dhcp/4.4.3-P1/patches/CVE-2022-2928.4-4- 2 files changed, 61 insertions(+) diff --git a/common/options.c b/common/options.c -index a53484e..40238f7 100644 +index 4e26094..8e5dfb1 100644 --- a/common/options.c +++ b/common/options.c @@ -4499,6 +4499,8 @@ add_option(struct option_state *options, @@ -38,10 +38,10 @@ index a53484e..40238f7 100644 } diff --git a/common/tests/option_unittest.c b/common/tests/option_unittest.c -index 0bb6517..c35feee 100644 +index 688762d..afd041c 100644 --- a/common/tests/option_unittest.c +++ b/common/tests/option_unittest.c -@@ -199,6 +199,59 @@ ATF_TC_BODY(parse_code93_option, tc) +@@ -283,6 +283,59 @@ ATF_TC_BODY(parse_code93_option, tc) } } @@ -101,14 +101,14 @@ index 0bb6517..c35feee 100644 /* This macro defines main() method that will call specified test cases. tp and simple_test_case names can be whatever you want as long as it is a valid variable identifier. */ -@@ -207,6 +260,7 @@ ATF_TP_ADD_TCS(tp) - ATF_TP_ADD_TC(tp, option_refcnt); +@@ -292,6 +345,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, pretty_print_option); + ATF_TP_ADD_TC(tp, parse_X); ATF_TP_ADD_TC(tp, parse_code93_option); + ATF_TP_ADD_TC(tp, add_option_ref_cnt); return (atf_no_error()); } -- -2.27.0 +2.23.0 diff --git a/dhcp-4.4.2.tar.gz b/dhcp-4.4.3.tar.gz similarity index 55% rename from dhcp-4.4.2.tar.gz rename to dhcp-4.4.3.tar.gz index 4c027d3fdb0767a8f91fa1e118da735488761317..e4d59147133ff1acfc16322a7143f4bf3a7a7636 100644 Binary files a/dhcp-4.4.2.tar.gz and b/dhcp-4.4.3.tar.gz differ diff --git a/dhcp.spec b/dhcp.spec index de9c6949692dbbba753ab0636bd35bff57dcb2d0..160d4dd7608105b241464587728e8acaad6a551c 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -2,8 +2,8 @@ %global dhcpconfdir %{_sysconfdir}/dhcp Name: dhcp -Version: 4.4.2 -Release: 15 +Version: 4.4.3 +Release: 1 Summary: Dynamic host configuration protocol software #Please don't change the epoch on this package Epoch: 12 @@ -45,28 +45,19 @@ Patch24: backport-0024-Detect-system-time-changes.patch Patch25: backport-0025-bind-Detect-system-time-changes.patch Patch26: backport-0026-Add-dhclient-5-B-option-description.patch Patch27: backport-0027-Add-missed-sd-notify-patch-to-manage-dhcpd-with-syst.patch - Patch28: bugfix-dhcp-4.2.5-check-dhclient-pid.patch Patch29: bugfix-reduce-getifaddr-calls.patch - Patch30: bugfix-dhcpd-2038-problem.patch Patch31: dhcpd-coredump-infiniband.patch Patch32: bugfix-dhclient-check-if-pid-was-held.patch Patch33: bugfix-dhcp-64-bit-lease-parse.patch -Patch34: backport-CVE-2021-25217.patch -Patch35: fix-multiple-definition-with-gcc-10-1.patch -Patch36: fix-multiple-definition-with-gcc-10-2.patch - -Patch37: fix-coredump-when-client-active-is-NULL.patch -Patch38: feature-lease-time-config-ipv6.patch -Patch39: add-a-test-case-to-parse-code93-in-option_unittest.patch -Patch40: bugfix-error-message-display.patch -Patch41: backport-Fix-CVE-2021-25214.patch -Patch42: backport-Fix-CVE-2021-25215.patch -Patch43: backport-Fix-CVE-2021-25219.patch -Patch44: backport-Fix-CVE-2021-25220.patch -Patch45: backport-Fix-CVE-2022-2928.patch -Patch46: backport-Fix-CVE-2022-2929.patch +Patch34: fix-coredump-when-client-active-is-NULL.patch +Patch35: feature-lease-time-config-ipv6.patch +Patch36: add-a-test-case-to-parse-code93-in-option_unittest.patch +Patch37: bugfix-error-message-display.patch +Patch38: backport-Fix-CVE-2021-25220.patch +Patch39: backport-Fix-CVE-2022-2928.patch +Patch40: backport-Fix-CVE-2022-2929.patch BuildRequires: gcc autoconf automake libtool openldap-devel krb5-devel libcap-ng-devel BuildRequires: systemd systemd-devel @@ -311,6 +302,12 @@ exit 0 %{_mandir}/man3/omapi.3.gz %changelog +* Tue Oct 25 2022 renmingshuai - 12:4.4.3-1 +- Type:requirement +- ID: +- SUG:restart +- DESC:update to 4.4.3 + * Mon Oct 17 2022 renmingshuai - 12:4.4.2-15 - Type:cves - ID:CVE-2022-2928,CVE-2022-2929 diff --git a/feature-lease-time-config-ipv6.patch b/feature-lease-time-config-ipv6.patch index 0bcd4315e82a5605f4a3769d9021b85e6a4b2976..d2f7c87ec547e391f80da07fd68ff581e698e1d5 100644 --- a/feature-lease-time-config-ipv6.patch +++ b/feature-lease-time-config-ipv6.patch @@ -2,7 +2,7 @@ From 8fb8c0fcd63917fc500fe6f14436234edc6677ed Mon Sep 17 00:00:00 2001 From: majun Date: Tue, 1 Sep 2020 11:50:17 +0800 Subject: [PATCH] lease-time-config -Signed-off-by: majun +Signed-off-by: majun --- client/clparse.c | 5 +++++ @@ -11,7 +11,7 @@ Signed-off-by: majun 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/client/clparse.c b/client/clparse.c -index d445bae..d43e8ae 100644 +index 57f6456..b548ff0 100644 --- a/client/clparse.c +++ b/client/clparse.c @@ -453,6 +453,11 @@ void parse_client_statement (cfile, ip, config) @@ -27,10 +27,10 @@ index d445bae..d43e8ae 100644 skip_token(&val, (unsigned *)0, cfile); token = next_token (&val, (unsigned *)0, cfile); diff --git a/common/conflex.c b/common/conflex.c -index 71c0bf5..fa3acb8 100644 +index 1fa2be3..a83cf47 100644 --- a/common/conflex.c +++ b/common/conflex.c -@@ -1146,6 +1146,9 @@ intern(char *atom, enum dhcp_token dfv) { +@@ -1148,6 +1148,9 @@ intern(char *atom, enum dhcp_token dfv) { if (!strcasecmp (atom + 1, "ease-id-format")) { return LEASE_ID_FORMAT; } @@ -41,16 +41,16 @@ index 71c0bf5..fa3acb8 100644 case 'm': if (!strncasecmp (atom + 1, "ax", 2)) { diff --git a/includes/dhctoken.h b/includes/dhctoken.h -index b4d93ba..0bc31ca 100644 +index 3f5334e..b23d8ce 100644 --- a/includes/dhctoken.h +++ b/includes/dhctoken.h -@@ -378,7 +378,8 @@ enum dhcp_token { - TOKEN_OCTAL = 678, +@@ -379,7 +379,8 @@ enum dhcp_token { KEY_ALGORITHM = 679, - BOOTP_BROADCAST_ALWAYS = 680, -- DESTINATION_DESCRIPTOR = 681 -+ DESTINATION_DESCRIPTOR = 681, -+ LEASE_TIME_IPV6 = 682 + BOOTP_BROADCAST_ALWAYS = 680, + DESTINATION_DESCRIPTOR = 681, +- DISCONNECT = 682 ++ DISCONNECT = 682, ++ LEASE_TIME_IPV6 = 683 }; #define is_identifier(x) ((x) >= FIRST_TOKEN && \ diff --git a/fix-multiple-definition-with-gcc-10-1.patch b/fix-multiple-definition-with-gcc-10-1.patch deleted file mode 100644 index 71b05b05834ecd4a1851822ecec02367bdbfe3b8..0000000000000000000000000000000000000000 --- a/fix-multiple-definition-with-gcc-10-1.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 49cbb576f142032e1fb687a58284a1d032d87770 Mon Sep 17 00:00:00 2001 -From: renmingshuai -Date: Fri, 30 Jul 2021 21:35:20 +0800 -Subject: [PATCH] fix multiple definition with gcc 10 - ---- - client/dhclient.c | 4 ++-- - relay/dhcrelay.c | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/client/dhclient.c b/client/dhclient.c -index 2a17bfd..f2c2630 100644 ---- a/client/dhclient.c -+++ b/client/dhclient.c -@@ -93,8 +93,8 @@ static const char message [] = "Internet Systems Consortium DHCP Client"; - static const char url [] = "For info, please visit https://www.isc.org/software/dhcp/"; - #endif /* UNIT_TEST */ - --u_int16_t local_port = 0; --u_int16_t remote_port = 0; -+extern u_int16_t local_port; -+extern u_int16_t remote_port; - #if defined(DHCPv6) && defined(DHCP4o6) - int dhcp4o6_state = -1; /* -1 = stopped, 0 = polling, 1 = started */ - #endif -diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c -index 155dd37..b487373 100644 ---- a/relay/dhcrelay.c -+++ b/relay/dhcrelay.c -@@ -104,8 +104,8 @@ enum { forward_and_append, /* Forward and append our own relay option. */ - forward_untouched, /* Forward without changes. */ - discard } agent_relay_mode = forward_and_replace; - --u_int16_t local_port; --u_int16_t remote_port; -+extern u_int16_t local_port; -+extern u_int16_t remote_port; - - /* Relay agent server list. */ - struct server_list { --- -1.8.3.1 - diff --git a/fix-multiple-definition-with-gcc-10-2.patch b/fix-multiple-definition-with-gcc-10-2.patch deleted file mode 100644 index d38aa6afb25e8a356bd7d752acf1960e84a332c9..0000000000000000000000000000000000000000 --- a/fix-multiple-definition-with-gcc-10-2.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 2f366470c90387ffae73b34390f6b8e61acb2b3b Mon Sep 17 00:00:00 2001 -From: renmingshuai -Date: Fri, 30 Jul 2021 21:52:55 +0800 -Subject: [PATCH] fix multiple definition with gcc 10 - ---- - server/omapi.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/server/omapi.c b/server/omapi.c -index f741131..a6a3651 100644 ---- a/server/omapi.c -+++ b/server/omapi.c -@@ -47,7 +47,7 @@ omapi_object_type_t *dhcp_type_lease; - omapi_object_type_t *dhcp_type_pool; - omapi_object_type_t *dhcp_type_class; - omapi_object_type_t *dhcp_type_subclass; --omapi_object_type_t *dhcp_type_host; -+extern omapi_object_type_t *dhcp_type_host; - #if defined (FAILOVER_PROTOCOL) - omapi_object_type_t *dhcp_type_failover_state; - omapi_object_type_t *dhcp_type_failover_link; --- -1.8.3.1 -