New version 4.4.3

Add keama migration utility
This commit is contained in:
Martin Osvald 2022-03-10 18:06:31 +01:00
parent fea3ac58b8
commit fa1179c358
31 changed files with 464 additions and 463 deletions

2
.gitignore vendored
View File

@ -6,3 +6,5 @@
/dhcp-4.4.2b1.tar.gz
/dhcp-4.4.2-P1.tar.gz
/dhcp-4.4.2-P1.tar.gz.asc
/dhcp-4.4.3.tar.gz
/dhcp-4.4.3.tar.gz.asc

View File

@ -1,15 +1,14 @@
From 23dfbc560028bf7429196db1a3826f8b80c19d3e Mon Sep 17 00:00:00 2001
From 5e9162c5ad7aa98f7f673ac7a7f46905ba2deea4 Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pzhukov@redhat.com>
Date: Thu, 21 Feb 2019 10:09:57 +0100
Subject: [PATCH 01/26] change bug url
Cc: pzhukov@redhat.com
Subject: [PATCH 01/28] change bug url
---
omapip/errwarn.c | 47 ++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 42 insertions(+), 5 deletions(-)
diff --git a/omapip/errwarn.c b/omapip/errwarn.c
index e30f8a0..09a3004 100644
index 38dd9c5..d88e392 100644
--- a/omapip/errwarn.c
+++ b/omapip/errwarn.c
@@ -48,6 +48,41 @@ void (*log_cleanup) (void);
@ -74,5 +73,5 @@ index e30f8a0..09a3004 100644
log_error ("exiting.");
--
2.14.5
2.35.1

View File

@ -1,23 +1,22 @@
From a26161b0fd45cdbeed3038ac63ff04e3b727248f Mon Sep 17 00:00:00 2001
From af18c830fe55f6be0b89997a36b611d981e3c25d Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pzhukov@redhat.com>
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;
@ -25,7 +24,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 |
@ -35,7 +34,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;
@ -49,10 +48,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
]
[
@ -87,7 +86,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 @@
@ -103,7 +102,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;
@ -114,7 +113,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" \
@ -129,7 +128,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
@ -146,7 +145,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;
@ -236,7 +235,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();
@ -393,7 +392,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. */
@ -403,7 +402,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);
@ -414,7 +413,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. */
@ -425,7 +424,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) {
@ -438,10 +437,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 */
@ -452,17 +451,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

View File

@ -1,18 +1,17 @@
From af504e99abde04b881768d18eaa0054b36b16303 Mon Sep 17 00:00:00 2001
From be8f73c399c0f89192e57453db153aaa48fcbb2e Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pzhukov@redhat.com>
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);
@ -95,5 +94,5 @@ index 26a333c..2a2e9e6 100644
log_info("%s %s", message, PACKAGE_VERSION);
log_info(copyright);
--
2.14.5
2.35.1

View File

@ -1,9 +1,8 @@
From 7e8cc8388ac31c5c2b1a423c6b2da0491b19f6f9 Mon Sep 17 00:00:00 2001
From 0a640394cb6f4a97fb87e53f049fba23523035c8 Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pzhukov@redhat.com>
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 +++++++++++-
@ -11,7 +10,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)
@ -48,10 +47,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;
@ -59,7 +58,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) {
@ -89,7 +88,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;
@ -101,7 +100,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);
@ -114,5 +113,5 @@ index 6f3a91f..20f2a62 100644
/* Otherwise, fail. */
--
2.14.5
2.35.1

View File

@ -1,8 +1,7 @@
From a2a3554ff9e05d1a8e2c8aa843f1b6a33fce87e3 Mon Sep 17 00:00:00 2001
From f994c4d208a8fe88cbf78d4374c8d44793f0598e Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pzhukov@redhat.com>
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
@ -11,7 +10,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 @@
@ -23,7 +22,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);
@ -56,5 +55,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

View File

@ -1,8 +1,7 @@
From 846779467f7393b19e8d206405116e1e26e16efc Mon Sep 17 00:00:00 2001
From d359a7dc30e0423f9b90129291538cad1ee6a6d9 Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pzhukov@redhat.com>
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 +++++++++++++++++++++-
@ -12,7 +11,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
@ -52,7 +51,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
@ -84,10 +83,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.
@ -110,7 +109,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 {
@ -153,7 +152,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
@ -164,5 +163,5 @@ index 17330d4..89b5540 100644
.PP
The
--
2.14.5
2.35.1

View File

@ -1,8 +1,7 @@
From ac65289663532db0bc1de449ca2a0eb4c8c2ca6f Mon Sep 17 00:00:00 2001
From d8da92991d93a3d1c9fc474696aee25b99623c42 Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pzhukov@redhat.com>
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 +-
@ -23,10 +22,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
@ -35,7 +34,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
@ -50,5 +49,5 @@ index 018fa34..3632a6b 100644
#ifndef _PATH_DHCLIENT_PID
--
2.14.5
2.35.1

View File

@ -1,9 +1,8 @@
From d2da34706f140101c34f6a9806c258411806a939 Mon Sep 17 00:00:00 2001
From 39ce1ca26128f4a5d018a567157320ba1f68f4ea Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pzhukov@redhat.com>
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
---
@ -23,10 +22,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;
@ -35,7 +34,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. */
@ -45,10 +44,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. */
@ -63,7 +62,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;
@ -72,7 +71,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);
@ -81,7 +80,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] = "";
@ -90,7 +89,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);
@ -99,7 +98,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? */
@ -108,7 +107,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 */
@ -117,7 +116,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. */
@ -130,7 +129,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;
}
@ -148,7 +147,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)
@ -161,7 +160,7 @@ 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) {
@ -174,7 +173,7 @@ index 3990bf1..a941258 100644
/*
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)
@ -187,7 +186,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)
@ -200,7 +199,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)
@ -213,7 +212,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,
@ -239,10 +238,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. */
@ -257,7 +256,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,
@ -274,7 +273,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,
@ -287,7 +286,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)
@ -309,7 +308,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) {
@ -350,10 +349,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)
{
@ -363,5 +362,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

View File

@ -1,8 +1,7 @@
From a0a2186ce52a31357d4eb3c32d7d6887e4603814 Mon Sep 17 00:00:00 2001
From cfe6414644b68d5b6b5ba150bf57cff0a709a59e Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pzhukov@redhat.com>
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
---
@ -10,10 +9,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 },
@ -23,5 +22,5 @@ index c1aa214..d2294c0 100644
{ "vivso", "Evendor.", &dhcp_universe, 125, 1 },
#if 0
--
2.14.5
2.35.1

View File

@ -1,8 +1,7 @@
From ed7610cdb2e8ebdbaee618e477879e7e008d4f29 Mon Sep 17 00:00:00 2001
From 7653f3ea80230d4b38bff1c65164aa18c6e51519 Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pzhukov@redhat.com>
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
@ -13,7 +12,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)
@ -28,5 +27,5 @@ index 0207ad3..d7fe200 100644
t = (struct timeout *)0;
for (q = timeouts; q; q = q->next) {
--
2.14.5
2.35.1

View File

@ -1,7 +1,7 @@
From 3863afcdfc5996f25741a41272c1a3bea0476692 Mon Sep 17 00:00:00 2001
From 7ea2433d716172f160c9380ed0bb852fafe845a2 Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pzhukov@redhat.com>
Date: Thu, 21 Feb 2019 10:30:28 +0100
Subject: [PATCH] Drop unnecessary capabilities
Subject: [PATCH 11/28] Drop unnecessary capabilities
dhclient (#517649, #546765), dhcpd/dhcrelay (#699713)
---
@ -28,10 +28,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.
@ -49,7 +49,7 @@ 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 7155cc5..9f1e435 100644
index 5029dac..bacf3bc 100644
--- a/client/dhclient.8
+++ b/client/dhclient.8
@@ -135,6 +135,9 @@ dhclient - Dynamic Host Configuration Protocol Client
@ -96,7 +96,7 @@ index 7155cc5..9f1e435 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 adcce50..7f202f9 100644
index aefc119..b49fcb3 100644
--- a/client/dhclient.c
+++ b/client/dhclient.c
@@ -41,6 +41,10 @@
@ -110,7 +110,7 @@ index adcce50..7f202f9 100644
/*
* Defined in stdio.h when _GNU_SOURCE is set, but we don't want to define
* that when building ISC code.
@@ -271,6 +275,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;
@ -120,7 +120,7 @@ index adcce50..7f202f9 100644
/* Initialize client globals. */
memset(&default_duid, 0, sizeof(default_duid));
@@ -670,6 +677,10 @@ main(int argc, char **argv) {
@@ -671,6 +678,10 @@ main(int argc, char **argv) {
dhclient_request_options = argv[i];
@ -131,7 +131,7 @@ index adcce50..7f202f9 100644
} else if (argv[i][0] == '-') {
usage("Unknown command: %s", argv[i]);
} else if (interfaces_requested < 0) {
@@ -730,6 +741,19 @@ main(int argc, char **argv) {
@@ -731,6 +742,19 @@ main(int argc, char **argv) {
path_dhclient_script = s;
}
@ -152,7 +152,7 @@ index adcce50..7f202f9 100644
initialize_common_option_spaces();
diff --git a/configure.ac b/configure.ac
index 2ca53ff..3276888 100644
index b2c306b..300117f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -603,6 +603,41 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[void foo() __attribute__((noreturn));
@ -211,7 +211,7 @@ index 5562b69..4c5cfa6 100644
man_MANS = dhcrelay.8
EXTRA_DIST = $(man_MANS)
diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c
index 5e4a6a9..4c472a9 100644
index a7b1286..0dc17d6 100644
--- a/relay/dhcrelay.c
+++ b/relay/dhcrelay.c
@@ -32,6 +32,11 @@
@ -226,7 +226,7 @@ index 5e4a6a9..4c472a9 100644
TIME default_lease_time = 43200; /* 12 hours... */
TIME max_lease_time = 86400; /* 24 hours... */
struct tree_cache *global_options[256];
@@ -597,6 +602,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];
@ -237,7 +237,7 @@ index 5e4a6a9..4c472a9 100644
#endif
} else if (!strcmp(argv[i], "-pf")) {
if (++i == argc)
@@ -667,6 +676,17 @@ main(int argc, char **argv) {
@@ -684,6 +693,17 @@ main(int argc, char **argv) {
#endif
}
@ -255,7 +255,7 @@ index 5e4a6a9..4c472a9 100644
if (!quiet) {
log_info("%s %s", message, PACKAGE_VERSION);
log_info(copyright);
@@ -823,6 +843,15 @@ main(int argc, char **argv) {
@@ -840,6 +860,15 @@ main(int argc, char **argv) {
signal(SIGTERM, dhcp_signal_handler); /* kill */
#endif
@ -272,5 +272,5 @@ index 5e4a6a9..4c472a9 100644
dispatch();
--
2.31.1
2.35.1

View File

@ -1,25 +1,24 @@
From 01b1dcfef129a4eccfaf0f63a216774019f82dca Mon Sep 17 00:00:00 2001
From 7e6299e72feaaf7e8bd499614999ba8a07dd1a8a Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pzhukov@redhat.com>
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 @@
@ -31,7 +30,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 */
@ -44,7 +43,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);
@ -57,10 +56,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
@ -87,7 +86,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
@ -118,7 +117,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) {
@ -183,10 +182,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;
@ -199,7 +198,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;
@ -207,7 +206,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);
@ -215,7 +214,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;
@ -249,7 +248,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;
@ -271,7 +270,7 @@ 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)
@ -336,7 +335,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;
@ -352,7 +351,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;
@ -367,7 +366,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,
@ -378,7 +377,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 },
@ -387,11 +386,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 */
@ -399,10 +398,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);
@ -410,7 +409,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 *);
@ -419,21 +418,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

View File

@ -1,8 +1,7 @@
From 234747fbfd6c6429619ba843713d5b39fb4a513d Mon Sep 17 00:00:00 2001
From fe89d58ea8627c66feffa81997daa024834eeb15 Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pzhukov@redhat.com>
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 ++-
@ -15,10 +14,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) {
@ -29,10 +28,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);
@ -43,7 +42,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."
*/
@ -52,7 +51,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);
@ -68,7 +67,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);
}
@ -78,7 +77,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) {
@ -105,7 +104,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) {
@ -132,7 +131,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 {
@ -145,10 +144,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);
@ -158,7 +157,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) {
@ -172,5 +171,5 @@ index a7110f9..c5ce7e8 100644
if (p == NULL) {
return ISC_R_UNEXPECTED;
--
2.14.5
2.35.1

View File

@ -1,24 +1,23 @@
From 042082b4410f158ec86ca8478689b34bc12518e6 Mon Sep 17 00:00:00 2001
From 90d64318e17df066c27b8e99ba6ab7f51154917b Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pzhukov@redhat.com>
Date: Thu, 21 Feb 2019 10:34:21 +0100
Subject: [PATCH 14/27] 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 ++++++
client/dhclient.c | 33 ++++++
common/bpf.c | 32 ++++++
common/discover.c | 4 +-
common/lpf.c | 276 ++++++++++++++++++++++++++++++++++++++++++----
common/lpf.c | 274 ++++++++++++++++++++++++++++++++++++++++++----
common/socket.c | 8 +-
includes/dhcpd.h | 6 +-
6 files changed, 329 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}"
@ -27,9 +26,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) {
@ -38,10 +37,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;
}
@ -72,7 +72,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 =
@ -120,10 +120,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. */
@ -132,7 +132,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. */
@ -142,7 +142,7 @@ index 6ef8852..65881fc 100644
if_register_linklocal6(tmp);
}
diff --git a/common/lpf.c b/common/lpf.c
index b0ed01c..a9e19f4 100644
index bb8822a..fcaa13d 100644
--- a/common/lpf.c
+++ b/common/lpf.c
@@ -45,6 +45,17 @@
@ -416,12 +416,8 @@ index b0ed01c..a9e19f4 100644
if (strlen(name) >= sizeof(tmp.ifr_name)) {
log_fatal("Device name too long: \"%s\"", name);
@@ -539,16 +691,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);
@ -554,10 +550,10 @@ index b0ed01c..a9e19f4 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)
@ -566,7 +562,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)
@ -575,7 +571,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);
@ -584,7 +580,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;
@ -594,7 +590,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 {
@ -607,7 +603,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. */
@ -615,7 +611,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);
@ -625,5 +621,5 @@ index faa9251..0c1a0aa 100644
const char *file, int line);
char *format_lease_id(const unsigned char *s, unsigned len, int format,
--
2.26.2
2.35.1

View File

@ -1,19 +1,18 @@
From 3d3e442ed1316930a5360e4d5a56b46a42a29419 Mon Sep 17 00:00:00 2001
From 3baf35269555e2223dbd1733cb1c475cb7f2ed7a Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pzhukov@redhat.com>
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) {
}
}
@ -40,10 +39,10 @@ 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) {
@@ -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. */
seed = 0;
+ int seed_flag = 0;
for (ip = interfaces; ip; ip = ip->next) {
int junk;
@ -55,7 +54,7 @@ index dc9080e..8e57da9 100644
seed += junk;
+ seed_flag = 1;
}
- srandom(seed + cur_time + (unsigned)getpid());
- seed += cur_time + (unsigned)getpid();
+ if ( seed_flag == 0 ) {
+ if ( backup_seed != 0 ) {
+ seed = backup_seed;
@ -71,29 +70,25 @@ index dc9080e..8e57da9 100644
+ }
+ /* 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),
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;
}
@ -102,7 +97,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
@ -115,7 +110,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);
@ -130,7 +125,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
@ -146,7 +141,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
@ -162,10 +157,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);
@ -208,7 +203,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
@ -219,7 +214,7 @@ index 20f2a62..0582c4c 100644
: "<no identifier>"),
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
@ -230,7 +225,7 @@ index 20f2a62..0582c4c 100644
: (lease
? print_hex_1(lease->uid_len, lease->uid, 60)
: "<no identifier>")),
@@ -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
@ -241,7 +236,7 @@ index 20f2a62..0582c4c 100644
: (lease
? print_hex_1(lease->uid_len, lease->uid, 60)
: "<no identifier>")),
@@ -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.",
@ -252,7 +247,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
@ -263,7 +258,7 @@ index 20f2a62..0582c4c 100644
: (lease
? print_hex_1(lease->uid_len, lease->uid, 60)
: "<no identifier>")),
@@ -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
@ -274,7 +269,7 @@ index 20f2a62..0582c4c 100644
: (lease
? print_hex_1(lease->uid_len, lease->uid, 60)
: "<no identifier>")),
@@ -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) ?
@ -284,7 +279,7 @@ index 20f2a62..0582c4c 100644
"<no client hardware address>");
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),
@ -295,7 +290,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),
@ -304,7 +299,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",
@ -316,7 +311,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),
@ -328,5 +323,5 @@ index 20f2a62..0582c4c 100644
if (!packet -> raw -> ciaddr.s_addr &&
--
2.14.5
2.35.1

View File

@ -1,19 +1,18 @@
From 2f6b827e89305adcff45288c632785ac054adb8e Mon Sep 17 00:00:00 2001
From 0a0a7e1afa171289b9e9d855c519101bbd71b5fe Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pzhukov@redhat.com>
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,
}
}
@ -73,7 +72,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;
@ -81,7 +80,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);
@ -101,7 +100,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;
@ -122,5 +121,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

View File

@ -1,8 +1,7 @@
From 193c4d7631fd623efa601f52fdab6018bf8be771 Mon Sep 17 00:00:00 2001
From d45463c2007a78623f2c90c250bb8e2f3e34a852 Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pzhukov@redhat.com>
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])
@ -11,10 +10,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) {
@ -29,7 +28,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);
}
@ -43,7 +42,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) {
@ -58,7 +57,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);
}
@ -73,5 +72,5 @@ index ccc98e4..27fde69 100644
/* Send out a packet. */
result = send_packet(client->interface, NULL, &client->packet,
--
2.14.5
2.35.1

View File

@ -1,19 +1,18 @@
From 2277d041692b8ebdf6b86d41e3a0bc0381cd1e47 Mon Sep 17 00:00:00 2001
From 840c4f2175d14fa485f2a5e50a005847940b7e1f Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pzhukov@redhat.com>
Date: Thu, 21 Feb 2019 10:40:51 +0100
Subject: [PATCH 18/26] No subnet declaration for <iface>' should be info, not
Subject: [PATCH 18/28] No subnet declaration for <iface>' 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)) {
@ -25,7 +24,7 @@ index 65881fc..056342c 100644
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");
}
@ -59,5 +58,5 @@ index 65881fc..056342c 100644
} else {
log_error ("You must write a %s",
--
2.14.5
2.35.1

View File

@ -1,9 +1,8 @@
From 6ea56e988df1da51f7d0bdd8984b38e40102c17b Mon Sep 17 00:00:00 2001
From eeb2e5bcedd62f21472da165b80741f8072420cf Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pzhukov@redhat.com>
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])
---
@ -11,10 +10,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);
@ -25,5 +24,5 @@ index 27fde69..4e5546a 100644
#ifdef DHCP4o6
--
2.14.5
2.35.1

View File

@ -1,8 +1,7 @@
From 01ce61b8a0331a2f068ca2191bfb897b505c1b9d Mon Sep 17 00:00:00 2001
From 908ea5f3a45a050a878de16d5acde6eda1b77d9f Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pzhukov@redhat.com>
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 ++
@ -11,10 +10,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 */
}
@ -24,10 +23,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;
}
@ -50,7 +49,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;
@ -60,7 +59,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
@ -82,10 +81,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);
@ -97,5 +96,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

View File

@ -1,11 +1,14 @@
commit 50c2b3ba8ce030a47b55dd707bb8a6ab20444a05
Author: Pavel Zhukov <pzhukov@redhat.com>
Date: Thu Feb 21 10:44:06 2019 +0100
From bdbbb4be07bb33fe083baef2bd0ef38b91c11120 Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pzhukov@redhat.com>
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,
@ -48,3 +51,6 @@ index 2743979..6b61964 100644
#endif
return status;
}
--
2.35.1

View File

@ -1,9 +1,8 @@
From 9975d198a2c02e32c31c3e0f43d2aa79dfa7f508 Mon Sep 17 00:00:00 2001
From 1f8681acba9ab70fbe17c85e5a1f4ce6a648b55d Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pzhukov@redhat.com>
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
---
@ -11,10 +10,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;
@ -27,7 +26,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);
}
@ -40,7 +39,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
@ -76,5 +75,5 @@ index 4e5546a..9b65438 100644
/* Parse the lease database. */
read_client_leases();
--
2.14.5
2.35.1

View File

@ -1,8 +1,7 @@
From 6fd7894ea57791c8eee16c21d19da34b909e016e Mon Sep 17 00:00:00 2001
From f01a29a90269c98a86accb0923d65aecf5f59b44 Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pzhukov@redhat.com>
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
@ -18,10 +17,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 {
@ -56,10 +55,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 },
@ -71,7 +70,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 {
@ -79,14 +78,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);
@ -97,7 +96,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);
@ -107,7 +106,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);
@ -117,7 +116,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);
@ -127,7 +126,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);
@ -137,7 +136,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);
@ -148,7 +147,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
@ -177,7 +176,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) {
@ -213,7 +212,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)
@ -227,7 +226,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,
@ -243,5 +242,5 @@ index 052df67..8851366 100644
log_error ("dhcp client identifier may not be %s",
"specified conditionally.");
--
2.14.5
2.35.1

View File

@ -1,8 +1,7 @@
From 41c6032ace65119e6a400365f7e90283c930afd4 Mon Sep 17 00:00:00 2001
From a2fb8759ab48c88e3f8df94ae6e156c357d932a2 Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pzhukov@redhat.com>
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 ++++++
@ -12,10 +11,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;
@ -29,7 +28,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)
@ -58,7 +57,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 {
@ -72,7 +71,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,
@ -89,5 +88,5 @@ index 530a923..4aef16b 100644
return DHCP_R_INVALIDARG;
/* Re-entry. */
--
2.14.5
2.35.1

View File

@ -1,22 +1,21 @@
From ef4f5e80d8a1ea1507829ea6f5214f276478f475 Mon Sep 17 00:00:00 2001
From 8e49f4b460ad20890c63a385c17d3e5decd45a82 Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pzhukov@redhat.com>
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 */
@ -28,11 +27,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)
@ -43,10 +42,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 */
@ -63,10 +62,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) {
@ -131,10 +130,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.
*/
@ -162,10 +161,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);
}
@ -193,5 +192,5 @@ index 8edc9df..fe0bb91 100644
+};
+#endif
--
2.14.5
2.35.1

View File

@ -1,16 +1,18 @@
commit 6acfd3125546a0e5db8fae8a9964cd2f88bf68c0
Author: Pavel Zhukov <pzhukov@redhat.com>
Date: Tue Oct 22 16:28:04 2019 +0200
Add dhclient(5) -B option description
From aa328eef58ff93110f2a52cb3a80002ab8cee36e Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pzhukov@redhat.com>
Date: Tue, 22 Oct 2019 16:28:04 +0200
Subject: [PATCH 26/28] Add dhclient(5) -B option description
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.
@ -22,3 +24,6 @@ index 0145b9f..5226de5 100644
.PP
.SH PORTS
During operations the client may use multiple UDP ports
--
2.35.1

View File

@ -1,8 +1,7 @@
From 8d974fd1f667e1b957ad4092fe66a8bb94f5f8fd Mon Sep 17 00:00:00 2001
From d1b1f91a7982be28acdfb580996c93aafcc76cc2 Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pzhukov@redhat.com>
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 +++++++++++
@ -11,10 +10,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
@ -33,7 +32,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 @@
@ -47,7 +46,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
@ -63,7 +62,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;
@ -93,5 +92,5 @@ index 4aef16b..778ef8d 100644
* Receive packets and dispatch them...
* dispatch() will never return.
--
2.14.5
2.35.1

View File

@ -1,18 +1,17 @@
From 019021caa791c254a319c71b4f634142dc14b37d Mon Sep 17 00:00:00 2001
From 9970114f558927564d9c19be969c3c35db3b0edf Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pzhukov@redhat.com>
Date: Tue, 22 Jun 2021 06:58:40 +0200
Subject: [PATCH 29/29] Use system getaddrinfo for dhcp
Cc: pzhukov@redhat.com
Subject: [PATCH 28/28] Use system getaddrinfo for dhcp
---
bind/bind/lib/irs/include/irs/netdb.h.in | 94 ++++++++++++++++++++++++
.../lib/irs/include/irs/netdb.h.in | 94 +++++++++++++++++++
1 file changed, 94 insertions(+)
diff --git a/bind/bind/lib/irs/include/irs/netdb.h.in b/bind/bind/lib/irs/include/irs/netdb.h.in
index 23dcd37..f36113d 100644
--- a/bind/bind/lib/irs/include/irs/netdb.h.in
+++ b/bind/bind/lib/irs/include/irs/netdb.h.in
@@ -149,6 +149,100 @@ struct addrinfo {
diff --git a/bind/bind-9.11.36/lib/irs/include/irs/netdb.h.in b/bind/bind-9.11.36/lib/irs/include/irs/netdb.h.in
index 427fef8..74069b5 100644
--- a/bind/bind-9.11.36/lib/irs/include/irs/netdb.h.in
+++ b/bind/bind-9.11.36/lib/irs/include/irs/netdb.h.in
@@ -150,6 +150,100 @@ struct addrinfo {
#define NI_NUMERICSERV 0x00000008
#define NI_DGRAM 0x00000010
@ -114,5 +113,5 @@ index 23dcd37..f36113d 100644
* Tell Emacs to use C mode on this file.
* Local variables:
--
2.26.3
2.35.1

View File

@ -9,13 +9,13 @@
#global prever b1
%global patchver P1
#global patchver P1
%global DHCPVERSION %{version}%{?prever}%{?patchver:-%{patchver}}
Summary: Dynamic host configuration protocol software
Name: dhcp
Version: 4.4.2
Release: 18%{?prever:.%prever}%{?patchver:.%patchver}%{?dist}
Version: 4.4.3
Release: 1%{?prever:.%prever}%{?patchver:.%patchver}%{?dist}
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
# dcantrell maintaining the package) made incorrect use of the epoch and
@ -62,7 +62,7 @@ Patch24 : 0024-Detect-system-time-changes.patch
Patch25 : 0025-bind-Detect-system-time-changes.patch
Patch26 : 0026-Add-dhclient-5-B-option-description.patch
Patch27: 0027-Add-missed-sd-notify-patch-to-manage-dhcpd-with-syst.patch
Patch29: 0029-Use-system-getaddrinfo-for-dhcp.patch
Patch28: 0028-Use-system-getaddrinfo-for-dhcp.patch
BuildRequires: autoconf
BuildRequires: automake
@ -131,7 +131,6 @@ easier to administer a large network.
This package provides the ISC DHCP relay agent.
%package client
Summary: Provides the ISC DHCP client daemon and dhclient-script
Provides: dhclient = %{epoch}:%{version}-%{release}
@ -156,8 +155,6 @@ Summary: Common files used by ISC dhcp client, server and relay agent
BuildArch: noarch
Obsoletes: dhcp-libs < %{epoch}:%{version}
%description common
DHCP (Dynamic Host Configuration Protocol) is a protocol which allows
individual devices on an IP network to get their own network
@ -177,7 +174,6 @@ Provides: bundled(bind)
%description libs-static
This package contains shared libraries used by ISC dhcp client and server
%package devel
Summary: Development headers and libraries for interfacing to the DHCP server
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
@ -198,6 +194,14 @@ programmers that are interested in internal operation of the code.
This package contains doxygen-generated documentation.
%endif
%package keama
Summary: Experimental migration assistant for Kea
%description keama
The KEA Migration Assistant is an experimental tool which helps to translate
ISC DHCP configurations to Kea.
%prep
%if 0%{?fedora}
%{gpgverify} --keyring='%{SOURCE10}' --signature='%{SOURCE9}' --data='%{SOURCE0}'
@ -263,9 +267,17 @@ make %{?_smp_mflags} devel
popd
%endif
pushd keama
make -j1
popd
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
pushd keama
make DESTDIR=%{buildroot} install %{?_smp_mflags}
popd
# We don't want example conf files in /etc
rm -f %{buildroot}%{_sysconfdir}/dhclient.conf.example
rm -f %{buildroot}%{_sysconfdir}/dhcpd.conf.example
@ -517,7 +529,15 @@ done
%doc doc/html/
%endif
%files keama
%{_sbindir}/keama
%attr(0644,root,root) %{_mandir}/man8/keama.8.gz
%changelog
* Thu Mar 10 2022 Martin Osvald <mosvald@redhat.com> - 12:4.4.3-1
- New version 4.4.3
- Add keama migration utility
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 12:4.4.2-18.P1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

View File

@ -1,2 +1,2 @@
SHA512 (dhcp-4.4.2-P1.tar.gz) = 924e8b44f288361dbe837987869e57b929c73cb5e4af37cb2d7b19bca5ea8594048fb41c0792fede003188185f61b25befbc2ccda42f1f68e6b6bc22ef44b040
SHA512 (dhcp-4.4.2-P1.tar.gz.asc) = a8ef21efe9488785010b393f2cfa212cc4fe11d1e62f807eef52e929833b358676721960d996f57f03082ca300173ef12cb01152244d7ab22a6643ff85953416
SHA512 (dhcp-4.4.3.tar.gz) = 4472d6794af80b482560956cee6895889cc1aca39980f851faf56824627e95731f2983cf7c7454bc3decb0a12c874fcbd29bd6c5a9695412def6bc14c6df17e0
SHA512 (dhcp-4.4.3.tar.gz.asc) = d6555cb2454062676f6450008ba0a45b761871a71e62e84d155aa458508655a565f8d2a9690f56d905c951a94633204800941a0e71e3230a86deae2655e38d8b