New version 4.4.1
- Drop executable flag from NM dispatcher script to avoid dhcpd restart
This commit is contained in:
parent
21108f4b78
commit
7c09728712
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@
|
|||||||
/dhcp-4.3.5.tar.gz
|
/dhcp-4.3.5.tar.gz
|
||||||
/dhcp-4.3.6b1.tar.gz
|
/dhcp-4.3.6b1.tar.gz
|
||||||
/dhcp-4.3.6.tar.gz
|
/dhcp-4.3.6.tar.gz
|
||||||
|
/dhcp-4.4.1.tar.gz
|
||||||
|
@ -1,7 +1,18 @@
|
|||||||
diff -up dhcp-4.3.5/omapip/errwarn.c.errwarn dhcp-4.3.5/omapip/errwarn.c
|
From 31ef6eadb15c3773b81256a8617eccc7657fd2fd Mon Sep 17 00:00:00 2001
|
||||||
--- dhcp-4.3.5/omapip/errwarn.c.errwarn 2016-09-27 21:16:50.000000000 +0200
|
From: Pavel Zhukov <pzhukov@redhat.com>
|
||||||
+++ dhcp-4.3.5/omapip/errwarn.c 2016-11-29 19:44:03.515031147 +0100
|
Date: Thu, 21 Feb 2019 10:09:57 +0100
|
||||||
@@ -49,6 +49,41 @@ void (*log_cleanup) (void);
|
Subject: [PATCH 01/21] change bug url
|
||||||
|
Cc: pzhukov@redhat.com
|
||||||
|
|
||||||
|
---
|
||||||
|
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
|
||||||
|
--- a/omapip/errwarn.c
|
||||||
|
+++ b/omapip/errwarn.c
|
||||||
|
@@ -48,6 +48,41 @@ void (*log_cleanup) (void);
|
||||||
static char mbuf [CVT_BUF_MAX + 1];
|
static char mbuf [CVT_BUF_MAX + 1];
|
||||||
static char fbuf [CVT_BUF_MAX + 1];
|
static char fbuf [CVT_BUF_MAX + 1];
|
||||||
|
|
||||||
@ -43,7 +54,7 @@ diff -up dhcp-4.3.5/omapip/errwarn.c.errwarn dhcp-4.3.5/omapip/errwarn.c
|
|||||||
/* Log an error message, then exit... */
|
/* Log an error message, then exit... */
|
||||||
|
|
||||||
void log_fatal (const char * fmt, ... )
|
void log_fatal (const char * fmt, ... )
|
||||||
@@ -75,11 +110,13 @@ void log_fatal (const char * fmt, ... )
|
@@ -74,11 +109,13 @@ void log_fatal (const char * fmt, ... )
|
||||||
}
|
}
|
||||||
|
|
||||||
log_error ("%s", "");
|
log_error ("%s", "");
|
||||||
@ -62,3 +73,6 @@ diff -up dhcp-4.3.5/omapip/errwarn.c.errwarn dhcp-4.3.5/omapip/errwarn.c
|
|||||||
log_error ("%s", "");
|
log_error ("%s", "");
|
||||||
log_error ("exiting.");
|
log_error ("exiting.");
|
||||||
|
|
||||||
|
--
|
||||||
|
2.14.5
|
||||||
|
|
@ -1,5 +1,20 @@
|
|||||||
|
From 3a86bcb58a7c081df22b6f55e973d5e3c99065d8 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/21] additional dhclient options
|
||||||
|
Cc: pzhukov@redhat.com
|
||||||
|
|
||||||
|
---
|
||||||
|
client/clparse.c | 10 +-
|
||||||
|
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(-)
|
||||||
|
|
||||||
diff --git a/client/clparse.c b/client/clparse.c
|
diff --git a/client/clparse.c b/client/clparse.c
|
||||||
index 03190c3..2033427 100644
|
index eaf48a8..7212e3a 100644
|
||||||
--- a/client/clparse.c
|
--- a/client/clparse.c
|
||||||
+++ b/client/clparse.c
|
+++ b/client/clparse.c
|
||||||
@@ -189,6 +189,7 @@ isc_result_t read_client_conf ()
|
@@ -189,6 +189,7 @@ isc_result_t read_client_conf ()
|
||||||
@ -34,7 +49,7 @@ index 03190c3..2033427 100644
|
|||||||
default:
|
default:
|
||||||
lose = 0;
|
lose = 0;
|
||||||
diff --git a/client/dhclient.8 b/client/dhclient.8
|
diff --git a/client/dhclient.8 b/client/dhclient.8
|
||||||
index 24f8f12..aa2238d 100644
|
index ebc750f..6d7fbdb 100644
|
||||||
--- a/client/dhclient.8
|
--- a/client/dhclient.8
|
||||||
+++ b/client/dhclient.8
|
+++ b/client/dhclient.8
|
||||||
@@ -134,6 +134,33 @@ dhclient - Dynamic Host Configuration Protocol Client
|
@@ -134,6 +134,33 @@ dhclient - Dynamic Host Configuration Protocol Client
|
||||||
@ -72,12 +87,12 @@ index 24f8f12..aa2238d 100644
|
|||||||
.I seconds
|
.I seconds
|
||||||
]
|
]
|
||||||
diff --git a/client/dhclient.c b/client/dhclient.c
|
diff --git a/client/dhclient.c b/client/dhclient.c
|
||||||
index dcf3f1a..270a960 100644
|
index 825ab00..26a333c 100644
|
||||||
--- a/client/dhclient.c
|
--- a/client/dhclient.c
|
||||||
+++ b/client/dhclient.c
|
+++ b/client/dhclient.c
|
||||||
@@ -40,6 +40,12 @@
|
@@ -41,6 +41,12 @@
|
||||||
#include <isc/file.h>
|
#include <sys/wait.h>
|
||||||
#include <dns/result.h>
|
#include <limits.h>
|
||||||
|
|
||||||
+/*
|
+/*
|
||||||
+ * Defined in stdio.h when _GNU_SOURCE is set, but we don't want to define
|
+ * Defined in stdio.h when _GNU_SOURCE is set, but we don't want to define
|
||||||
@ -88,7 +103,7 @@ index dcf3f1a..270a960 100644
|
|||||||
TIME default_lease_time = 43200; /* 12 hours... */
|
TIME default_lease_time = 43200; /* 12 hours... */
|
||||||
TIME max_lease_time = 86400; /* 24 hours... */
|
TIME max_lease_time = 86400; /* 24 hours... */
|
||||||
|
|
||||||
@@ -101,6 +107,10 @@ char *mockup_relay = NULL;
|
@@ -110,6 +116,10 @@ char *mockup_relay = NULL;
|
||||||
|
|
||||||
char *progname = NULL;
|
char *progname = NULL;
|
||||||
|
|
||||||
@ -99,25 +114,27 @@ index dcf3f1a..270a960 100644
|
|||||||
void run_stateless(int exit_mode, u_int16_t port);
|
void run_stateless(int exit_mode, u_int16_t port);
|
||||||
|
|
||||||
static isc_result_t write_duid(struct data_string *duid);
|
static isc_result_t write_duid(struct data_string *duid);
|
||||||
@@ -179,7 +189,11 @@ usage(const char *sfmt, const char *sarg)
|
@@ -183,8 +193,12 @@ static const char use_v6command[] = "Command not used for DHCPv4: %s";
|
||||||
" [-s server-addr] [-cf config-file]\n"
|
" [-s server-addr] [-cf config-file]\n" \
|
||||||
" [-df duid-file] [-lf lease-file]\n"
|
" [-df duid-file] [-lf lease-file]\n" \
|
||||||
" [-pf pid-file] [--no-pid] [-e VAR=val]\n"
|
" [-pf pid-file] [--no-pid] [-e VAR=val]\n" \
|
||||||
- " [-sf script-file] [interface]*",
|
-" [-sf script-file] [interface]*"
|
||||||
+ " [-sf script-file] [interface]*\n"
|
-
|
||||||
+ " [-C <dhcp-client-identifier>] [-B]\n"
|
+" [-sf script-file] [interface]*\n" \
|
||||||
+ " [-H <host-name> | -F <fqdn.fqdn>] [--timeout <timeout>]\n"
|
+" [-C <dhcp-client-identifier>] [-B]\n" \
|
||||||
+ " [-V <vendor-class-identifier>]\n"
|
+" [-H <host-name> | -F <fqdn.fqdn>] [--timeout <timeout>]\n" \
|
||||||
+ " [--request-options <request option list>]",
|
+" [-V <vendor-class-identifier>]\n" \
|
||||||
isc_file_basename(progname));
|
+" [--request-options <request option list>]"
|
||||||
}
|
+
|
||||||
|
#define DHCLIENT_USAGEH "{--version|--help|-h}"
|
||||||
|
|
||||||
@@ -216,6 +230,16 @@ main(int argc, char **argv) {
|
static void
|
||||||
|
@@ -243,6 +257,16 @@ main(int argc, char **argv) {
|
||||||
|
#else
|
||||||
progname = argv[0];
|
progname = argv[0];
|
||||||
#endif
|
#endif
|
||||||
|
+ char *dhcp_client_identifier_arg = NULL;
|
||||||
+ char *dhcp_client_identifier_arg = NULL;
|
+ char *dhcp_host_name_arg = NULL;
|
||||||
+ char *dhcp_host_name_arg = NULL;
|
|
||||||
+ char *dhcp_fqdn_arg = NULL;
|
+ char *dhcp_fqdn_arg = NULL;
|
||||||
+ char *dhcp_vendor_class_identifier_arg = NULL;
|
+ char *dhcp_vendor_class_identifier_arg = NULL;
|
||||||
+ char *dhclient_request_options = NULL;
|
+ char *dhclient_request_options = NULL;
|
||||||
@ -129,10 +146,10 @@ index dcf3f1a..270a960 100644
|
|||||||
/* Initialize client globals. */
|
/* Initialize client globals. */
|
||||||
memset(&default_duid, 0, sizeof(default_duid));
|
memset(&default_duid, 0, sizeof(default_duid));
|
||||||
|
|
||||||
@@ -442,6 +466,88 @@ main(int argc, char **argv) {
|
@@ -558,6 +582,89 @@ main(int argc, char **argv) {
|
||||||
strlen(PACKAGE_VERSION)));
|
std_dhcid = 1;
|
||||||
IGNORE_RET(write(STDERR_FILENO, "\n", 1));
|
} else if (!strcmp(argv[i], "-v")) {
|
||||||
exit(0);
|
quiet = 0;
|
||||||
+ } else if (!strcmp(argv[i], "-C")) {
|
+ } else if (!strcmp(argv[i], "-C")) {
|
||||||
+ if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
|
+ if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
|
||||||
+ usage(use_noarg, argv[i-1]);
|
+ usage(use_noarg, argv[i-1]);
|
||||||
@ -215,10 +232,11 @@ index dcf3f1a..270a960 100644
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ dhclient_request_options = argv[i];
|
+ dhclient_request_options = argv[i];
|
||||||
|
+
|
||||||
} else if (argv[i][0] == '-') {
|
} else if (argv[i][0] == '-') {
|
||||||
usage("Unknown command: %s", argv[i]);
|
usage("Unknown command: %s", argv[i]);
|
||||||
} else if (interfaces_requested < 0) {
|
} else if (interfaces_requested < 0) {
|
||||||
@@ -641,6 +747,156 @@ main(int argc, char **argv) {
|
@@ -754,6 +861,156 @@ main(int argc, char **argv) {
|
||||||
/* Parse the dhclient.conf file. */
|
/* Parse the dhclient.conf file. */
|
||||||
read_client_conf();
|
read_client_conf();
|
||||||
|
|
||||||
@ -375,7 +393,7 @@ index dcf3f1a..270a960 100644
|
|||||||
/* Parse the lease database. */
|
/* Parse the lease database. */
|
||||||
read_client_leases();
|
read_client_leases();
|
||||||
|
|
||||||
@@ -3092,7 +3348,8 @@ void make_discover (client, lease)
|
@@ -3226,7 +3483,8 @@ void make_discover (client, lease)
|
||||||
client -> packet.xid = random ();
|
client -> packet.xid = random ();
|
||||||
client -> packet.secs = 0; /* filled in by send_discover. */
|
client -> packet.secs = 0; /* filled in by send_discover. */
|
||||||
|
|
||||||
@ -385,7 +403,7 @@ index dcf3f1a..270a960 100644
|
|||||||
client -> packet.flags = 0;
|
client -> packet.flags = 0;
|
||||||
else
|
else
|
||||||
client -> packet.flags = htons (BOOTP_BROADCAST);
|
client -> packet.flags = htons (BOOTP_BROADCAST);
|
||||||
@@ -3177,7 +3434,9 @@ void make_request (client, lease)
|
@@ -3311,7 +3569,9 @@ void make_request (client, lease)
|
||||||
} else {
|
} else {
|
||||||
memset (&client -> packet.ciaddr, 0,
|
memset (&client -> packet.ciaddr, 0,
|
||||||
sizeof client -> packet.ciaddr);
|
sizeof client -> packet.ciaddr);
|
||||||
@ -396,7 +414,7 @@ index dcf3f1a..270a960 100644
|
|||||||
client -> packet.flags = 0;
|
client -> packet.flags = 0;
|
||||||
else
|
else
|
||||||
client -> packet.flags = htons (BOOTP_BROADCAST);
|
client -> packet.flags = htons (BOOTP_BROADCAST);
|
||||||
@@ -3240,7 +3499,8 @@ void make_decline (client, lease)
|
@@ -3374,7 +3634,8 @@ void make_decline (client, lease)
|
||||||
client -> packet.hops = 0;
|
client -> packet.hops = 0;
|
||||||
client -> packet.xid = client -> xid;
|
client -> packet.xid = client -> xid;
|
||||||
client -> packet.secs = 0; /* Filled in by send_request. */
|
client -> packet.secs = 0; /* Filled in by send_request. */
|
||||||
@ -407,7 +425,7 @@ index dcf3f1a..270a960 100644
|
|||||||
else
|
else
|
||||||
client -> packet.flags = htons (BOOTP_BROADCAST);
|
client -> packet.flags = htons (BOOTP_BROADCAST);
|
||||||
diff --git a/common/conflex.c b/common/conflex.c
|
diff --git a/common/conflex.c b/common/conflex.c
|
||||||
index fe994ac..bdb4a52 100644
|
index 045b655..71c0bf5 100644
|
||||||
--- a/common/conflex.c
|
--- a/common/conflex.c
|
||||||
+++ b/common/conflex.c
|
+++ b/common/conflex.c
|
||||||
@@ -832,6 +832,8 @@ intern(char *atom, enum dhcp_token dfv) {
|
@@ -832,6 +832,8 @@ intern(char *atom, enum dhcp_token dfv) {
|
||||||
@ -420,10 +438,10 @@ index fe994ac..bdb4a52 100644
|
|||||||
case 'c':
|
case 'c':
|
||||||
if (!strcasecmp(atom + 1, "ase"))
|
if (!strcasecmp(atom + 1, "ase"))
|
||||||
diff --git a/includes/dhcpd.h b/includes/dhcpd.h
|
diff --git a/includes/dhcpd.h b/includes/dhcpd.h
|
||||||
index eab09a6..cfdac23 100644
|
index 5930e6a..018fa34 100644
|
||||||
--- a/includes/dhcpd.h
|
--- a/includes/dhcpd.h
|
||||||
+++ b/includes/dhcpd.h
|
+++ b/includes/dhcpd.h
|
||||||
@@ -1251,6 +1251,9 @@ struct client_config {
|
@@ -1269,6 +1269,9 @@ struct client_config {
|
||||||
|
|
||||||
int lease_id_format; /* format for IDs in lease file,
|
int lease_id_format; /* format for IDs in lease file,
|
||||||
TOKEN_OCTAL or TOKEN_HEX */
|
TOKEN_OCTAL or TOKEN_HEX */
|
||||||
@ -434,16 +452,17 @@ index eab09a6..cfdac23 100644
|
|||||||
|
|
||||||
/* Per-interface state used in the dhcp client... */
|
/* Per-interface state used in the dhcp client... */
|
||||||
diff --git a/includes/dhctoken.h b/includes/dhctoken.h
|
diff --git a/includes/dhctoken.h b/includes/dhctoken.h
|
||||||
index 15bbd1c..b312e7a 100644
|
index 5920f4f..7e7215a 100644
|
||||||
--- a/includes/dhctoken.h
|
--- a/includes/dhctoken.h
|
||||||
+++ b/includes/dhctoken.h
|
+++ b/includes/dhctoken.h
|
||||||
@@ -373,7 +373,8 @@ enum dhcp_token {
|
@@ -377,6 +377,7 @@ enum dhcp_token {
|
||||||
TOKEN_BIG_ENDIAN = 675,
|
|
||||||
LEASE_ID_FORMAT = 676,
|
|
||||||
TOKEN_HEX = 677,
|
TOKEN_HEX = 677,
|
||||||
- TOKEN_OCTAL = 678
|
TOKEN_OCTAL = 678,
|
||||||
+ TOKEN_OCTAL = 678,
|
KEY_ALGORITHM = 679
|
||||||
+ BOOTP_BROADCAST_ALWAYS = 679
|
+ BOOTP_BROADCAST_ALWAYS = 680
|
||||||
};
|
};
|
||||||
|
|
||||||
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
|
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
|
||||||
|
--
|
||||||
|
2.14.5
|
||||||
|
|
@ -1,7 +1,18 @@
|
|||||||
diff -up dhcp-4.3.0a1/client/dhclient.c.ifup dhcp-4.3.0a1/client/dhclient.c
|
From 692fd8b16ef6f12a57596351e930c65c68597bac Mon Sep 17 00:00:00 2001
|
||||||
--- dhcp-4.3.0a1/client/dhclient.c.ifup 2013-12-19 14:53:08.817760677 +0100
|
From: Pavel Zhukov <pzhukov@redhat.com>
|
||||||
+++ dhcp-4.3.0a1/client/dhclient.c 2013-12-19 15:05:16.290518574 +0100
|
Date: Thu, 21 Feb 2019 10:21:14 +0100
|
||||||
@@ -521,9 +521,81 @@ main(int argc, char **argv) {
|
Subject: [PATCH 03/21] Handle releasing interfaces requested by /sbin/ifup
|
||||||
|
Cc: pzhukov@redhat.com
|
||||||
|
|
||||||
|
---
|
||||||
|
client/dhclient.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
1 file changed, 72 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/client/dhclient.c b/client/dhclient.c
|
||||||
|
index 26a333c..2a2e9e6 100644
|
||||||
|
--- a/client/dhclient.c
|
||||||
|
+++ b/client/dhclient.c
|
||||||
|
@@ -787,9 +787,81 @@ main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fclose(pidfd);
|
fclose(pidfd);
|
||||||
@ -83,3 +94,6 @@ diff -up dhcp-4.3.0a1/client/dhclient.c.ifup dhcp-4.3.0a1/client/dhclient.c
|
|||||||
if (!quiet) {
|
if (!quiet) {
|
||||||
log_info("%s %s", message, PACKAGE_VERSION);
|
log_info("%s %s", message, PACKAGE_VERSION);
|
||||||
log_info(copyright);
|
log_info(copyright);
|
||||||
|
--
|
||||||
|
2.14.5
|
||||||
|
|
@ -1,6 +1,19 @@
|
|||||||
diff -up dhcp-4.3.4/server/bootp.c.unicast dhcp-4.3.4/server/bootp.c
|
From 9dc17d6086bf140efda84ce434664b60ce2191a1 Mon Sep 17 00:00:00 2001
|
||||||
--- dhcp-4.3.4/server/bootp.c.unicast 2016-03-22 14:16:51.000000000 +0100
|
From: Pavel Zhukov <pzhukov@redhat.com>
|
||||||
+++ dhcp-4.3.4/server/bootp.c 2016-05-02 15:09:40.023243008 +0200
|
Date: Thu, 21 Feb 2019 10:22:41 +0100
|
||||||
|
Subject: [PATCH 04/21] Support unicast BOOTP for IBM pSeries systems (and
|
||||||
|
maybe others)
|
||||||
|
Cc: pzhukov@redhat.com
|
||||||
|
|
||||||
|
---
|
||||||
|
server/bootp.c | 12 +++++++++++-
|
||||||
|
server/dhcp.c | 33 ++++++++++++++++++++++++++-------
|
||||||
|
2 files changed, 37 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/server/bootp.c b/server/bootp.c
|
||||||
|
index 26a7607..2212f31 100644
|
||||||
|
--- a/server/bootp.c
|
||||||
|
+++ b/server/bootp.c
|
||||||
@@ -52,6 +52,7 @@ void bootp (packet)
|
@@ -52,6 +52,7 @@ void bootp (packet)
|
||||||
char msgbuf [1024];
|
char msgbuf [1024];
|
||||||
int ignorep;
|
int ignorep;
|
||||||
@ -34,10 +47,11 @@ diff -up dhcp-4.3.4/server/bootp.c.unicast dhcp-4.3.4/server/bootp.c
|
|||||||
|
|
||||||
/* If it comes from a client that already knows its address
|
/* If it comes from a client that already knows its address
|
||||||
and is not requesting a broadcast response, and we can
|
and is not requesting a broadcast response, and we can
|
||||||
diff -up dhcp-4.3.4/server/dhcp.c.unicast dhcp-4.3.4/server/dhcp.c
|
diff --git a/server/dhcp.c b/server/dhcp.c
|
||||||
--- dhcp-4.3.4/server/dhcp.c.unicast 2016-03-22 14:16:51.000000000 +0100
|
index 6f3a91f..20f2a62 100644
|
||||||
+++ dhcp-4.3.4/server/dhcp.c 2016-05-02 15:10:13.255267511 +0200
|
--- a/server/dhcp.c
|
||||||
@@ -5132,6 +5132,7 @@ int locate_network (packet)
|
+++ b/server/dhcp.c
|
||||||
|
@@ -5224,6 +5224,7 @@ int locate_network (packet)
|
||||||
struct data_string data;
|
struct data_string data;
|
||||||
struct subnet *subnet = (struct subnet *)0;
|
struct subnet *subnet = (struct subnet *)0;
|
||||||
struct option_cache *oc;
|
struct option_cache *oc;
|
||||||
@ -45,7 +59,7 @@ diff -up dhcp-4.3.4/server/dhcp.c.unicast dhcp-4.3.4/server/dhcp.c
|
|||||||
|
|
||||||
#if defined(DHCPv6) && defined(DHCP4o6)
|
#if defined(DHCPv6) && defined(DHCP4o6)
|
||||||
if (dhcpv4_over_dhcpv6 && (packet->dhcp4o6_response != NULL)) {
|
if (dhcpv4_over_dhcpv6 && (packet->dhcp4o6_response != NULL)) {
|
||||||
@@ -5153,12 +5154,24 @@ int locate_network (packet)
|
@@ -5245,12 +5246,24 @@ int locate_network (packet)
|
||||||
from the interface, if there is one. If not, fail. */
|
from the interface, if there is one. If not, fail. */
|
||||||
if (!oc && !packet -> raw -> giaddr.s_addr) {
|
if (!oc && !packet -> raw -> giaddr.s_addr) {
|
||||||
if (packet -> interface -> shared_network) {
|
if (packet -> interface -> shared_network) {
|
||||||
@ -75,7 +89,7 @@ diff -up dhcp-4.3.4/server/dhcp.c.unicast dhcp-4.3.4/server/dhcp.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* If there's an option indicating link connection, and it's valid,
|
/* If there's an option indicating link connection, and it's valid,
|
||||||
@@ -5185,7 +5198,10 @@ int locate_network (packet)
|
@@ -5277,7 +5290,10 @@ int locate_network (packet)
|
||||||
data_string_forget (&data, MDL);
|
data_string_forget (&data, MDL);
|
||||||
} else {
|
} else {
|
||||||
ia.len = 4;
|
ia.len = 4;
|
||||||
@ -87,7 +101,7 @@ diff -up dhcp-4.3.4/server/dhcp.c.unicast dhcp-4.3.4/server/dhcp.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* If we know the subnet on which the IP address lives, use it. */
|
/* If we know the subnet on which the IP address lives, use it. */
|
||||||
@@ -5193,7 +5209,10 @@ int locate_network (packet)
|
@@ -5285,7 +5301,10 @@ int locate_network (packet)
|
||||||
shared_network_reference (&packet -> shared_network,
|
shared_network_reference (&packet -> shared_network,
|
||||||
subnet -> shared_network, MDL);
|
subnet -> shared_network, MDL);
|
||||||
subnet_dereference (&subnet, MDL);
|
subnet_dereference (&subnet, MDL);
|
||||||
@ -99,3 +113,6 @@ diff -up dhcp-4.3.4/server/dhcp.c.unicast dhcp-4.3.4/server/dhcp.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Otherwise, fail. */
|
/* Otherwise, fail. */
|
||||||
|
--
|
||||||
|
2.14.5
|
||||||
|
|
@ -1,6 +1,19 @@
|
|||||||
diff -up dhcp-4.3.4/client/clparse.c.requested dhcp-4.3.4/client/clparse.c
|
From ac21c8b966620cbe79be3508c024ae30f93d6266 Mon Sep 17 00:00:00 2001
|
||||||
--- dhcp-4.3.4/client/clparse.c.requested 2016-04-29 12:18:50.157151352 +0200
|
From: Pavel Zhukov <pzhukov@redhat.com>
|
||||||
+++ dhcp-4.3.4/client/clparse.c 2016-04-29 12:19:22.235137243 +0200
|
Date: Thu, 21 Feb 2019 10:24:24 +0100
|
||||||
|
Subject: [PATCH 05/21] Change default requested options
|
||||||
|
Cc: pzhukov@redhat.com
|
||||||
|
|
||||||
|
Add NIS domain, NIS servers, NTP servers, interface-mtu and domain-search
|
||||||
|
to the list of default requested DHCP options
|
||||||
|
---
|
||||||
|
client/clparse.c | 27 ++++++++++++++++++++++++++-
|
||||||
|
1 file changed, 26 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/client/clparse.c b/client/clparse.c
|
||||||
|
index 7212e3a..39b95a0 100644
|
||||||
|
--- a/client/clparse.c
|
||||||
|
+++ b/client/clparse.c
|
||||||
@@ -31,7 +31,7 @@
|
@@ -31,7 +31,7 @@
|
||||||
|
|
||||||
struct client_config top_level_config;
|
struct client_config top_level_config;
|
||||||
@ -42,3 +55,6 @@ diff -up dhcp-4.3.4/client/clparse.c.requested dhcp-4.3.4/client/clparse.c
|
|||||||
for (code = 0 ; code < NUM_DEFAULT_REQUESTED_OPTS ; code++) {
|
for (code = 0 ; code < NUM_DEFAULT_REQUESTED_OPTS ; code++) {
|
||||||
if (default_requested_options[code] == NULL)
|
if (default_requested_options[code] == NULL)
|
||||||
log_fatal("Unable to find option definition for "
|
log_fatal("Unable to find option definition for "
|
||||||
|
--
|
||||||
|
2.14.5
|
||||||
|
|
@ -1,38 +1,21 @@
|
|||||||
diff -up dhcp-4.3.5b1/client/dhclient.conf.5.man dhcp-4.3.5b1/client/dhclient.conf.5
|
From dd3053e6f45ac1f149869b7ded3f539d6c046114 Mon Sep 17 00:00:00 2001
|
||||||
--- dhcp-4.3.5b1/client/dhclient.conf.5.man 2016-08-26 20:19:53.000000000 +0200
|
From: Pavel Zhukov <pzhukov@redhat.com>
|
||||||
+++ dhcp-4.3.5b1/client/dhclient.conf.5 2016-09-12 17:09:23.243313514 +0200
|
Date: Thu, 21 Feb 2019 10:25:53 +0100
|
||||||
@@ -228,7 +228,8 @@ responding to the client send the client
|
Subject: [PATCH 06/21] Various man-page-only fixes
|
||||||
options. Only the option names should be specified in the request
|
Cc: pzhukov@redhat.com
|
||||||
statement - not option parameters. By default, the DHCPv4 client
|
|
||||||
requests the subnet-mask, broadcast-address, time-offset, routers,
|
---
|
||||||
-domain-name, domain-name-servers and host-name options while the DHCPv6
|
client/dhclient-script.8 | 22 +++++++++++++++++++++-
|
||||||
+domain-search, domain-name, domain-name-servers, host-name, nis-domain,
|
client/dhclient.conf.5 | 14 +++++++++++++-
|
||||||
+nis-servers, ntp-servers and interface-mtu options while the DHCPv6
|
common/dhcp-options.5 | 15 +++++++++++++++
|
||||||
client requests the dhcp6 name-servers and domain-search options. Note
|
server/dhcpd.conf.5 | 14 +++++++++-----
|
||||||
that if you enter a \'request\' statement, you over-ride these defaults
|
4 files changed, 58 insertions(+), 7 deletions(-)
|
||||||
and these options will not be requested.
|
|
||||||
@@ -736,6 +737,17 @@ know the DHCP service(s) anycast MAC add
|
diff --git a/client/dhclient-script.8 b/client/dhclient-script.8
|
||||||
client. The \fIlink-type\fR and \fImac-address\fR parameters are configured
|
index 3553afd..0db5516 100644
|
||||||
in a similar manner to the \fBhardware\fR statement.
|
--- a/client/dhclient-script.8
|
||||||
.PP
|
+++ b/client/dhclient-script.8
|
||||||
+ \fBbootp-broadcast-always;\fR
|
@@ -43,7 +43,7 @@ customizations are needed, they should be possible using the enter and
|
||||||
+.PP
|
|
||||||
+The
|
|
||||||
+.B bootp-broadcast-always
|
|
||||||
+statement instructs dhclient to always set the bootp broadcast flag in
|
|
||||||
+request packets, so that servers will always broadcast replies.
|
|
||||||
+This is equivalent to supplying the dhclient -B argument, and has
|
|
||||||
+the same effect as specifying 'always-broadcast' in the server's dhcpd.conf.
|
|
||||||
+This option is provided as an extension to enable dhclient to work
|
|
||||||
+on IBM s390 Linux guests.
|
|
||||||
+.PP
|
|
||||||
.SH SAMPLE
|
|
||||||
The following configuration file was used on a laptop running NetBSD
|
|
||||||
1.3, though the domains have been modified.
|
|
||||||
diff -up dhcp-4.3.5b1/client/dhclient-script.8.man dhcp-4.3.5b1/client/dhclient-script.8
|
|
||||||
--- dhcp-4.3.5b1/client/dhclient-script.8.man 2016-08-26 20:19:53.000000000 +0200
|
|
||||||
+++ dhcp-4.3.5b1/client/dhclient-script.8 2016-09-12 17:08:09.516254385 +0200
|
|
||||||
@@ -45,7 +45,7 @@ customizations are needed, they should b
|
|
||||||
exit hooks provided (see HOOKS for details). These hooks will allow the
|
exit hooks provided (see HOOKS for details). These hooks will allow the
|
||||||
user to override the default behaviour of the client in creating a
|
user to override the default behaviour of the client in creating a
|
||||||
.B /etc/resolv.conf
|
.B /etc/resolv.conf
|
||||||
@ -41,7 +24,7 @@ diff -up dhcp-4.3.5b1/client/dhclient-script.8.man dhcp-4.3.5b1/client/dhclient-
|
|||||||
.PP
|
.PP
|
||||||
No standard client script exists for some operating systems, even though
|
No standard client script exists for some operating systems, even though
|
||||||
the actual client may work, so a pioneering user may well need to create
|
the actual client may work, so a pioneering user may well need to create
|
||||||
@@ -89,6 +89,26 @@ present. The
|
@@ -87,6 +87,26 @@ present. The
|
||||||
.B ETCDIR/dhclient-exit-hooks
|
.B ETCDIR/dhclient-exit-hooks
|
||||||
script can modify the valid of exit_status to change the exit status
|
script can modify the valid of exit_status to change the exit status
|
||||||
of dhclient-script.
|
of dhclient-script.
|
||||||
@ -68,10 +51,43 @@ diff -up dhcp-4.3.5b1/client/dhclient-script.8.man dhcp-4.3.5b1/client/dhclient-
|
|||||||
.SH OPERATION
|
.SH OPERATION
|
||||||
When dhclient needs to invoke the client configuration script, it
|
When dhclient needs to invoke the client configuration script, it
|
||||||
defines a set of variables in the environment, and then invokes
|
defines a set of variables in the environment, and then invokes
|
||||||
diff -up dhcp-4.3.5b1/common/dhcp-options.5.man dhcp-4.3.5b1/common/dhcp-options.5
|
diff --git a/client/dhclient.conf.5 b/client/dhclient.conf.5
|
||||||
--- dhcp-4.3.5b1/common/dhcp-options.5.man 2016-08-26 20:19:53.000000000 +0200
|
index fa3b908..566a881 100644
|
||||||
+++ dhcp-4.3.5b1/common/dhcp-options.5 2016-09-12 17:08:09.517254386 +0200
|
--- a/client/dhclient.conf.5
|
||||||
@@ -1013,6 +1013,21 @@ classless IP routing - it does not inclu
|
+++ b/client/dhclient.conf.5
|
||||||
|
@@ -228,7 +228,8 @@ responding to the client send the client its values for the specified
|
||||||
|
options. Only the option names should be specified in the request
|
||||||
|
statement - not option parameters. By default, the DHCPv4 client
|
||||||
|
requests the subnet-mask, broadcast-address, time-offset, routers,
|
||||||
|
-domain-name, domain-name-servers and host-name options while the DHCPv6
|
||||||
|
+domain-search, domain-name, domain-name-servers, host-name, nis-domain,
|
||||||
|
+nis-servers, ntp-servers and interface-mtu options while the DHCPv6
|
||||||
|
client requests the dhcp6 name-servers and domain-search options. Note
|
||||||
|
that if you enter a \'request\' statement, you over-ride these defaults
|
||||||
|
and these options will not be requested.
|
||||||
|
@@ -735,6 +736,17 @@ broadcast packets transmitted by DHCP clients, but is only useful if you
|
||||||
|
know the DHCP service(s) anycast MAC address prior to configuring your
|
||||||
|
client. The \fIlink-type\fR and \fImac-address\fR parameters are configured
|
||||||
|
in a similar manner to the \fBhardware\fR statement.
|
||||||
|
+.PP
|
||||||
|
+ \fBbootp-broadcast-always;\fR
|
||||||
|
+.PP
|
||||||
|
+The
|
||||||
|
+.B bootp-broadcast-always
|
||||||
|
+statement instructs dhclient to always set the bootp broadcast flag in
|
||||||
|
+request packets, so that servers will always broadcast replies.
|
||||||
|
+This is equivalent to supplying the dhclient -B argument, and has
|
||||||
|
+the same effect as specifying 'always-broadcast' in the server's dhcpd.conf.
|
||||||
|
+This option is provided as an extension to enable dhclient to work
|
||||||
|
+on IBM s390 Linux guests.
|
||||||
|
.PP
|
||||||
|
.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
|
||||||
|
--- 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
|
||||||
classless IP routing is now the most widely deployed routing standard,
|
classless IP routing is now the most widely deployed routing standard,
|
||||||
this option is virtually useless, and is not implemented by any of the
|
this option is virtually useless, and is not implemented by any of the
|
||||||
popular DHCP clients, for example the Microsoft DHCP client.
|
popular DHCP clients, for example the Microsoft DHCP client.
|
||||||
@ -93,10 +109,11 @@ diff -up dhcp-4.3.5b1/common/dhcp-options.5.man dhcp-4.3.5b1/common/dhcp-options
|
|||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
.nf
|
.nf
|
||||||
diff -up dhcp-4.3.5b1/server/dhcpd.conf.5.man dhcp-4.3.5b1/server/dhcpd.conf.5
|
diff --git a/server/dhcpd.conf.5 b/server/dhcpd.conf.5
|
||||||
--- dhcp-4.3.5b1/server/dhcpd.conf.5.man 2016-08-26 20:19:53.000000000 +0200
|
index 17330d4..89b5540 100644
|
||||||
+++ dhcp-4.3.5b1/server/dhcpd.conf.5 2016-09-12 17:10:11.205351980 +0200
|
--- a/server/dhcpd.conf.5
|
||||||
@@ -528,6 +528,9 @@ pool {
|
+++ b/server/dhcpd.conf.5
|
||||||
|
@@ -527,6 +527,9 @@ pool {
|
||||||
};
|
};
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
@ -106,7 +123,7 @@ diff -up dhcp-4.3.5b1/server/dhcpd.conf.5.man dhcp-4.3.5b1/server/dhcpd.conf.5
|
|||||||
The server currently does very little sanity checking, so if you
|
The server currently does very little sanity checking, so if you
|
||||||
configure it wrong, it will just fail in odd ways. I would recommend
|
configure it wrong, it will just fail in odd ways. I would recommend
|
||||||
therefore that you either do failover or don't do failover, but don't
|
therefore that you either do failover or don't do failover, but don't
|
||||||
@@ -542,9 +545,9 @@ primary server might look like this:
|
@@ -541,9 +544,9 @@ primary server might look like this:
|
||||||
failover peer "foo" {
|
failover peer "foo" {
|
||||||
primary;
|
primary;
|
||||||
address anthrax.rc.example.com;
|
address anthrax.rc.example.com;
|
||||||
@ -118,7 +135,7 @@ diff -up dhcp-4.3.5b1/server/dhcpd.conf.5.man dhcp-4.3.5b1/server/dhcpd.conf.5
|
|||||||
max-response-delay 60;
|
max-response-delay 60;
|
||||||
max-unacked-updates 10;
|
max-unacked-updates 10;
|
||||||
mclt 3600;
|
mclt 3600;
|
||||||
@@ -1246,7 +1249,7 @@ the zone containing PTR records - for IS
|
@@ -1323,7 +1326,7 @@ the zone containing PTR records - for ISC BIND, something like this:
|
||||||
.PP
|
.PP
|
||||||
.nf
|
.nf
|
||||||
key DHCP_UPDATER {
|
key DHCP_UPDATER {
|
||||||
@ -127,7 +144,7 @@ diff -up dhcp-4.3.5b1/server/dhcpd.conf.5.man dhcp-4.3.5b1/server/dhcpd.conf.5
|
|||||||
secret pRP5FapFoJ95JEL06sv4PQ==;
|
secret pRP5FapFoJ95JEL06sv4PQ==;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1269,7 +1272,7 @@ dhcpd.conf file:
|
@@ -1346,7 +1349,7 @@ dhcpd.conf file:
|
||||||
.PP
|
.PP
|
||||||
.nf
|
.nf
|
||||||
key DHCP_UPDATER {
|
key DHCP_UPDATER {
|
||||||
@ -136,7 +153,7 @@ diff -up dhcp-4.3.5b1/server/dhcpd.conf.5.man dhcp-4.3.5b1/server/dhcpd.conf.5
|
|||||||
secret pRP5FapFoJ95JEL06sv4PQ==;
|
secret pRP5FapFoJ95JEL06sv4PQ==;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -2742,7 +2745,8 @@ statement
|
@@ -2912,7 +2915,8 @@ statement
|
||||||
The \fInext-server\fR statement is used to specify the host address of
|
The \fInext-server\fR statement is used to specify the host address of
|
||||||
the server from which the initial boot file (specified in the
|
the server from which the initial boot file (specified in the
|
||||||
\fIfilename\fR statement) is to be loaded. \fIServer-name\fR should
|
\fIfilename\fR statement) is to be loaded. \fIServer-name\fR should
|
||||||
@ -146,3 +163,6 @@ diff -up dhcp-4.3.5b1/server/dhcpd.conf.5.man dhcp-4.3.5b1/server/dhcpd.conf.5
|
|||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
The
|
The
|
||||||
|
--
|
||||||
|
2.14.5
|
||||||
|
|
54
0007-Change-paths-to-conform-to-our-standards.patch
Normal file
54
0007-Change-paths-to-conform-to-our-standards.patch
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
From bf4e3f1d181b5b4e6225fe5726c02420157433cc 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/21] Change paths to conform to our standards
|
||||||
|
Cc: pzhukov@redhat.com
|
||||||
|
|
||||||
|
---
|
||||||
|
doc/examples/dhcpd-dhcpv6.conf | 2 +-
|
||||||
|
includes/dhcpd.h | 6 +++---
|
||||||
|
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/doc/examples/dhcpd-dhcpv6.conf b/doc/examples/dhcpd-dhcpv6.conf
|
||||||
|
index 448a6a6..2357824 100644
|
||||||
|
--- a/doc/examples/dhcpd-dhcpv6.conf
|
||||||
|
+++ b/doc/examples/dhcpd-dhcpv6.conf
|
||||||
|
@@ -43,7 +43,7 @@ option dhcp6.domain-search "test.example.com","example.com";
|
||||||
|
option dhcp6.info-refresh-time 21600;
|
||||||
|
|
||||||
|
# The path of the lease file
|
||||||
|
-dhcpv6-lease-file-name "/usr/local/var/db/dhcpd6.leases";
|
||||||
|
+dhcpv6-lease-file-name "/var/lib/dhcpd/dhcpd6.leases";
|
||||||
|
|
||||||
|
# Static definition (must be global)
|
||||||
|
host myclient {
|
||||||
|
diff --git a/includes/dhcpd.h b/includes/dhcpd.h
|
||||||
|
index 018fa34..3632a6b 100644
|
||||||
|
--- a/includes/dhcpd.h
|
||||||
|
+++ b/includes/dhcpd.h
|
||||||
|
@@ -1545,7 +1545,7 @@ typedef unsigned char option_mask [16];
|
||||||
|
#else /* !DEBUG */
|
||||||
|
|
||||||
|
#ifndef _PATH_DHCPD_CONF
|
||||||
|
-#define _PATH_DHCPD_CONF "/etc/dhcpd.conf"
|
||||||
|
+#define _PATH_DHCPD_CONF "/etc/dhcp/dhcpd.conf"
|
||||||
|
#endif /* DEBUG */
|
||||||
|
|
||||||
|
#ifndef _PATH_DHCPD_DB
|
||||||
|
@@ -1567,11 +1567,11 @@ typedef unsigned char option_mask [16];
|
||||||
|
#endif /* DEBUG */
|
||||||
|
|
||||||
|
#ifndef _PATH_DHCLIENT_CONF
|
||||||
|
-#define _PATH_DHCLIENT_CONF "/etc/dhclient.conf"
|
||||||
|
+#define _PATH_DHCLIENT_CONF "/etc/dhcp/dhclient.conf"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _PATH_DHCLIENT_SCRIPT
|
||||||
|
-#define _PATH_DHCLIENT_SCRIPT "/sbin/dhclient-script"
|
||||||
|
+#define _PATH_DHCLIENT_SCRIPT "/usr/sbin/dhclient-script"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _PATH_DHCLIENT_PID
|
||||||
|
--
|
||||||
|
2.14.5
|
||||||
|
|
@ -1,7 +1,32 @@
|
|||||||
diff -up dhcp-4.3.3b1/client/clparse.c.cloexec dhcp-4.3.3b1/client/clparse.c
|
From 26d34bc8e55c39ef84d580b6453c65b5cbeab8ff Mon Sep 17 00:00:00 2001
|
||||||
--- dhcp-4.3.3b1/client/clparse.c.cloexec 2015-08-10 10:46:20.264755543 +0200
|
From: Pavel Zhukov <pzhukov@redhat.com>
|
||||||
+++ dhcp-4.3.3b1/client/clparse.c 2015-08-10 10:46:20.274755510 +0200
|
Date: Thu, 21 Feb 2019 10:27:18 +0100
|
||||||
@@ -247,7 +247,7 @@ int read_client_conf_file (const char *n
|
Subject: [PATCH 08/21] Make sure all open file descriptors are closed-on-exec
|
||||||
|
for SELinux
|
||||||
|
Cc: pzhukov@redhat.com
|
||||||
|
|
||||||
|
ISC-bug: #19148
|
||||||
|
---
|
||||||
|
client/clparse.c | 4 ++--
|
||||||
|
client/dhclient.c | 28 ++++++++++++++--------------
|
||||||
|
common/bpf.c | 2 +-
|
||||||
|
common/dlpi.c | 2 +-
|
||||||
|
common/nit.c | 2 +-
|
||||||
|
common/resolv.c | 2 +-
|
||||||
|
common/upf.c | 2 +-
|
||||||
|
omapip/trace.c | 6 +++---
|
||||||
|
relay/dhcrelay.c | 10 +++++-----
|
||||||
|
server/confpars.c | 2 +-
|
||||||
|
server/db.c | 4 ++--
|
||||||
|
server/dhcpd.c | 14 +++++++-------
|
||||||
|
server/ldap.c | 2 +-
|
||||||
|
13 files changed, 40 insertions(+), 40 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/client/clparse.c b/client/clparse.c
|
||||||
|
index 39b95a0..44387ed 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,
|
||||||
int token;
|
int token;
|
||||||
isc_result_t status;
|
isc_result_t status;
|
||||||
|
|
||||||
@ -10,7 +35,7 @@ diff -up dhcp-4.3.3b1/client/clparse.c.cloexec dhcp-4.3.3b1/client/clparse.c
|
|||||||
return uerr2isc (errno);
|
return uerr2isc (errno);
|
||||||
|
|
||||||
cfile = NULL;
|
cfile = NULL;
|
||||||
@@ -323,7 +323,7 @@ void read_client_leases ()
|
@@ -364,7 +364,7 @@ void read_client_leases ()
|
||||||
|
|
||||||
/* Open the lease file. If we can't open it, just return -
|
/* Open the lease file. If we can't open it, just return -
|
||||||
we can safely trust the server to remember our state. */
|
we can safely trust the server to remember our state. */
|
||||||
@ -19,10 +44,11 @@ diff -up dhcp-4.3.3b1/client/clparse.c.cloexec dhcp-4.3.3b1/client/clparse.c
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
cfile = NULL;
|
cfile = NULL;
|
||||||
diff -up dhcp-4.3.3b1/client/dhclient.c.cloexec dhcp-4.3.3b1/client/dhclient.c
|
diff --git a/client/dhclient.c b/client/dhclient.c
|
||||||
--- dhcp-4.3.3b1/client/dhclient.c.cloexec 2015-08-10 10:46:20.260755556 +0200
|
index 2a2e9e6..a86ab9e 100644
|
||||||
+++ dhcp-4.3.3b1/client/dhclient.c 2015-08-10 10:46:20.275755506 +0200
|
--- a/client/dhclient.c
|
||||||
@@ -153,11 +153,11 @@ main(int argc, char **argv) {
|
+++ b/client/dhclient.c
|
||||||
|
@@ -273,11 +273,11 @@ main(int argc, char **argv) {
|
||||||
/* Make sure that file descriptors 0 (stdin), 1, (stdout), and
|
/* Make sure that file descriptors 0 (stdin), 1, (stdout), and
|
||||||
2 (stderr) are open. To do this, we assume that when we
|
2 (stderr) are open. To do this, we assume that when we
|
||||||
open a file the lowest available file descriptor is used. */
|
open a file the lowest available file descriptor is used. */
|
||||||
@ -37,7 +63,7 @@ diff -up dhcp-4.3.3b1/client/dhclient.c.cloexec dhcp-4.3.3b1/client/dhclient.c
|
|||||||
if (fd == 2)
|
if (fd == 2)
|
||||||
log_perror = 0; /* No sense logging to /dev/null. */
|
log_perror = 0; /* No sense logging to /dev/null. */
|
||||||
else if (fd != -1)
|
else if (fd != -1)
|
||||||
@@ -519,7 +519,7 @@ main(int argc, char **argv) {
|
@@ -765,7 +765,7 @@ main(int argc, char **argv) {
|
||||||
long temp;
|
long temp;
|
||||||
int e;
|
int e;
|
||||||
|
|
||||||
@ -46,7 +72,7 @@ diff -up dhcp-4.3.3b1/client/dhclient.c.cloexec dhcp-4.3.3b1/client/dhclient.c
|
|||||||
e = fscanf(pidfd, "%ld\n", &temp);
|
e = fscanf(pidfd, "%ld\n", &temp);
|
||||||
oldpid = (pid_t)temp;
|
oldpid = (pid_t)temp;
|
||||||
|
|
||||||
@@ -574,7 +574,7 @@ main(int argc, char **argv) {
|
@@ -820,7 +820,7 @@ main(int argc, char **argv) {
|
||||||
strncpy(new_path_dhclient_pid, path_dhclient_pid, pfx);
|
strncpy(new_path_dhclient_pid, path_dhclient_pid, pfx);
|
||||||
sprintf(new_path_dhclient_pid + pfx, "-%s.pid", ip->name);
|
sprintf(new_path_dhclient_pid + pfx, "-%s.pid", ip->name);
|
||||||
|
|
||||||
@ -55,7 +81,7 @@ diff -up dhcp-4.3.3b1/client/dhclient.c.cloexec dhcp-4.3.3b1/client/dhclient.c
|
|||||||
e = fscanf(pidfd, "%ld\n", &temp);
|
e = fscanf(pidfd, "%ld\n", &temp);
|
||||||
oldpid = (pid_t)temp;
|
oldpid = (pid_t)temp;
|
||||||
|
|
||||||
@@ -599,7 +599,7 @@ main(int argc, char **argv) {
|
@@ -845,7 +845,7 @@ main(int argc, char **argv) {
|
||||||
int dhc_running = 0;
|
int dhc_running = 0;
|
||||||
char procfn[256] = "";
|
char procfn[256] = "";
|
||||||
|
|
||||||
@ -64,7 +90,7 @@ diff -up dhcp-4.3.3b1/client/dhclient.c.cloexec dhcp-4.3.3b1/client/dhclient.c
|
|||||||
if ((fscanf(pidfp, "%ld", &temp)==1) && ((dhcpid=(pid_t)temp) > 0)) {
|
if ((fscanf(pidfp, "%ld", &temp)==1) && ((dhcpid=(pid_t)temp) > 0)) {
|
||||||
snprintf(procfn,256,"/proc/%u",dhcpid);
|
snprintf(procfn,256,"/proc/%u",dhcpid);
|
||||||
dhc_running = (access(procfn, F_OK) == 0);
|
dhc_running = (access(procfn, F_OK) == 0);
|
||||||
@@ -3120,7 +3120,7 @@ void rewrite_client_leases ()
|
@@ -3808,7 +3808,7 @@ void rewrite_client_leases ()
|
||||||
|
|
||||||
if (leaseFile != NULL)
|
if (leaseFile != NULL)
|
||||||
fclose (leaseFile);
|
fclose (leaseFile);
|
||||||
@ -73,7 +99,7 @@ diff -up dhcp-4.3.3b1/client/dhclient.c.cloexec dhcp-4.3.3b1/client/dhclient.c
|
|||||||
if (leaseFile == NULL) {
|
if (leaseFile == NULL) {
|
||||||
log_error ("can't create %s: %m", path_dhclient_db);
|
log_error ("can't create %s: %m", path_dhclient_db);
|
||||||
return;
|
return;
|
||||||
@@ -3313,7 +3313,7 @@ write_duid(struct data_string *duid)
|
@@ -4003,7 +4003,7 @@ write_duid(struct data_string *duid)
|
||||||
return DHCP_R_INVALIDARG;
|
return DHCP_R_INVALIDARG;
|
||||||
|
|
||||||
if (leaseFile == NULL) { /* XXX? */
|
if (leaseFile == NULL) { /* XXX? */
|
||||||
@ -82,7 +108,7 @@ diff -up dhcp-4.3.3b1/client/dhclient.c.cloexec dhcp-4.3.3b1/client/dhclient.c
|
|||||||
if (leaseFile == NULL) {
|
if (leaseFile == NULL) {
|
||||||
log_error("can't create %s: %m", path_dhclient_db);
|
log_error("can't create %s: %m", path_dhclient_db);
|
||||||
return ISC_R_IOERROR;
|
return ISC_R_IOERROR;
|
||||||
@@ -3493,7 +3493,7 @@ int write_client_lease (client, lease, r
|
@@ -4207,7 +4207,7 @@ int write_client_lease (client, lease, rewrite, makesure)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if (leaseFile == NULL) { /* XXX */
|
if (leaseFile == NULL) { /* XXX */
|
||||||
@ -91,7 +117,7 @@ diff -up dhcp-4.3.3b1/client/dhclient.c.cloexec dhcp-4.3.3b1/client/dhclient.c
|
|||||||
if (leaseFile == NULL) {
|
if (leaseFile == NULL) {
|
||||||
log_error ("can't create %s: %m", path_dhclient_db);
|
log_error ("can't create %s: %m", path_dhclient_db);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -4011,9 +4011,9 @@ void go_daemon ()
|
@@ -4786,9 +4786,9 @@ void detach ()
|
||||||
(void) close(2);
|
(void) close(2);
|
||||||
|
|
||||||
/* Reopen them on /dev/null. */
|
/* Reopen them on /dev/null. */
|
||||||
@ -104,7 +130,7 @@ diff -up dhcp-4.3.3b1/client/dhclient.c.cloexec dhcp-4.3.3b1/client/dhclient.c
|
|||||||
|
|
||||||
write_client_pid_file ();
|
write_client_pid_file ();
|
||||||
|
|
||||||
@@ -4030,14 +4030,14 @@ void write_client_pid_file ()
|
@@ -4806,14 +4806,14 @@ void write_client_pid_file ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,10 +147,11 @@ diff -up dhcp-4.3.3b1/client/dhclient.c.cloexec dhcp-4.3.3b1/client/dhclient.c
|
|||||||
if (!pf) {
|
if (!pf) {
|
||||||
close(pfdesc);
|
close(pfdesc);
|
||||||
log_error ("Can't fdopen %s: %m", path_dhclient_pid);
|
log_error ("Can't fdopen %s: %m", path_dhclient_pid);
|
||||||
diff -up dhcp-4.3.3b1/common/bpf.c.cloexec dhcp-4.3.3b1/common/bpf.c
|
diff --git a/common/bpf.c b/common/bpf.c
|
||||||
--- dhcp-4.3.3b1/common/bpf.c.cloexec 2015-07-30 15:17:16.000000000 +0200
|
index 16076fe..67b6d64 100644
|
||||||
+++ dhcp-4.3.3b1/common/bpf.c 2015-08-10 10:46:20.275755506 +0200
|
--- a/common/bpf.c
|
||||||
@@ -95,7 +95,7 @@ int if_register_bpf (info)
|
+++ b/common/bpf.c
|
||||||
|
@@ -94,7 +94,7 @@ int if_register_bpf (info)
|
||||||
for (b = 0; 1; b++) {
|
for (b = 0; 1; b++) {
|
||||||
/* %Audit% 31 bytes max. %2004.06.17,Safe% */
|
/* %Audit% 31 bytes max. %2004.06.17,Safe% */
|
||||||
sprintf(filename, BPF_FORMAT, b);
|
sprintf(filename, BPF_FORMAT, b);
|
||||||
@ -133,10 +160,11 @@ diff -up dhcp-4.3.3b1/common/bpf.c.cloexec dhcp-4.3.3b1/common/bpf.c
|
|||||||
if (sock < 0) {
|
if (sock < 0) {
|
||||||
if (errno == EBUSY) {
|
if (errno == EBUSY) {
|
||||||
continue;
|
continue;
|
||||||
diff -up dhcp-4.3.3b1/common/dlpi.c.cloexec dhcp-4.3.3b1/common/dlpi.c
|
diff --git a/common/dlpi.c b/common/dlpi.c
|
||||||
--- dhcp-4.3.3b1/common/dlpi.c.cloexec 2015-07-30 15:17:16.000000000 +0200
|
index 3990bf1..a941258 100644
|
||||||
+++ dhcp-4.3.3b1/common/dlpi.c 2015-08-10 10:46:20.275755506 +0200
|
--- a/common/dlpi.c
|
||||||
@@ -804,7 +804,7 @@ dlpiopen(const char *ifname) {
|
+++ b/common/dlpi.c
|
||||||
|
@@ -817,7 +817,7 @@ dlpiopen(const char *ifname) {
|
||||||
}
|
}
|
||||||
*dp = '\0';
|
*dp = '\0';
|
||||||
|
|
||||||
@ -145,9 +173,10 @@ diff -up dhcp-4.3.3b1/common/dlpi.c.cloexec dhcp-4.3.3b1/common/dlpi.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
diff -up dhcp-4.3.3b1/common/nit.c.cloexec dhcp-4.3.3b1/common/nit.c
|
diff --git a/common/nit.c b/common/nit.c
|
||||||
--- dhcp-4.3.3b1/common/nit.c.cloexec 2015-07-30 15:17:16.000000000 +0200
|
index d822c15..a9132bc 100644
|
||||||
+++ dhcp-4.3.3b1/common/nit.c 2015-08-10 10:46:20.275755506 +0200
|
--- a/common/nit.c
|
||||||
|
+++ b/common/nit.c
|
||||||
@@ -75,7 +75,7 @@ int if_register_nit (info)
|
@@ -75,7 +75,7 @@ int if_register_nit (info)
|
||||||
struct strioctl sio;
|
struct strioctl sio;
|
||||||
|
|
||||||
@ -157,10 +186,11 @@ diff -up dhcp-4.3.3b1/common/nit.c.cloexec dhcp-4.3.3b1/common/nit.c
|
|||||||
if (sock < 0)
|
if (sock < 0)
|
||||||
log_fatal ("Can't open NIT device for %s: %m", info -> name);
|
log_fatal ("Can't open NIT device for %s: %m", info -> name);
|
||||||
|
|
||||||
diff -up dhcp-4.3.3b1/common/resolv.c.cloexec dhcp-4.3.3b1/common/resolv.c
|
diff --git a/common/resolv.c b/common/resolv.c
|
||||||
--- dhcp-4.3.3b1/common/resolv.c.cloexec 2015-07-30 15:17:16.000000000 +0200
|
index a01f520..b209e3f 100644
|
||||||
+++ dhcp-4.3.3b1/common/resolv.c 2015-08-10 10:46:20.276755503 +0200
|
--- a/common/resolv.c
|
||||||
@@ -44,7 +44,7 @@ void read_resolv_conf (parse_time)
|
+++ b/common/resolv.c
|
||||||
|
@@ -43,7 +43,7 @@ void read_resolv_conf (parse_time)
|
||||||
struct domain_search_list *dp, *dl, *nd;
|
struct domain_search_list *dp, *dl, *nd;
|
||||||
isc_result_t status;
|
isc_result_t status;
|
||||||
|
|
||||||
@ -169,9 +199,10 @@ diff -up dhcp-4.3.3b1/common/resolv.c.cloexec dhcp-4.3.3b1/common/resolv.c
|
|||||||
log_error ("Can't open %s: %m", path_resolv_conf);
|
log_error ("Can't open %s: %m", path_resolv_conf);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
diff -up dhcp-4.3.3b1/common/upf.c.cloexec dhcp-4.3.3b1/common/upf.c
|
diff --git a/common/upf.c b/common/upf.c
|
||||||
--- dhcp-4.3.3b1/common/upf.c.cloexec 2015-07-30 15:17:16.000000000 +0200
|
index 9785879..e0a524f 100644
|
||||||
+++ dhcp-4.3.3b1/common/upf.c 2015-08-10 10:46:20.276755503 +0200
|
--- a/common/upf.c
|
||||||
|
+++ b/common/upf.c
|
||||||
@@ -71,7 +71,7 @@ int if_register_upf (info)
|
@@ -71,7 +71,7 @@ int if_register_upf (info)
|
||||||
/* %Audit% Cannot exceed 36 bytes. %2004.06.17,Safe% */
|
/* %Audit% Cannot exceed 36 bytes. %2004.06.17,Safe% */
|
||||||
sprintf(filename, "/dev/pf/pfilt%d", b);
|
sprintf(filename, "/dev/pf/pfilt%d", b);
|
||||||
@ -181,10 +212,11 @@ diff -up dhcp-4.3.3b1/common/upf.c.cloexec dhcp-4.3.3b1/common/upf.c
|
|||||||
if (sock < 0) {
|
if (sock < 0) {
|
||||||
if (errno == EBUSY) {
|
if (errno == EBUSY) {
|
||||||
continue;
|
continue;
|
||||||
diff -up dhcp-4.3.3b1/omapip/trace.c.cloexec dhcp-4.3.3b1/omapip/trace.c
|
diff --git a/omapip/trace.c b/omapip/trace.c
|
||||||
--- dhcp-4.3.3b1/omapip/trace.c.cloexec 2015-07-30 15:17:16.000000000 +0200
|
index 45bd508..5ea7486 100644
|
||||||
+++ dhcp-4.3.3b1/omapip/trace.c 2015-08-10 10:46:20.276755503 +0200
|
--- a/omapip/trace.c
|
||||||
@@ -138,10 +138,10 @@ isc_result_t trace_begin (const char *fi
|
+++ b/omapip/trace.c
|
||||||
|
@@ -136,10 +136,10 @@ isc_result_t trace_begin (const char *filename,
|
||||||
return DHCP_R_INVALIDARG;
|
return DHCP_R_INVALIDARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -197,7 +229,7 @@ diff -up dhcp-4.3.3b1/omapip/trace.c.cloexec dhcp-4.3.3b1/omapip/trace.c
|
|||||||
0600);
|
0600);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -429,7 +429,7 @@ void trace_file_replay (const char *file
|
@@ -427,7 +427,7 @@ void trace_file_replay (const char *filename)
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
@ -206,10 +238,11 @@ diff -up dhcp-4.3.3b1/omapip/trace.c.cloexec dhcp-4.3.3b1/omapip/trace.c
|
|||||||
if (!traceinfile) {
|
if (!traceinfile) {
|
||||||
log_error("Can't open tracefile %s: %m", filename);
|
log_error("Can't open tracefile %s: %m", filename);
|
||||||
return;
|
return;
|
||||||
diff -up dhcp-4.3.3b1/relay/dhcrelay.c.cloexec dhcp-4.3.3b1/relay/dhcrelay.c
|
diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c
|
||||||
--- dhcp-4.3.3b1/relay/dhcrelay.c.cloexec 2015-07-30 15:17:16.000000000 +0200
|
index d8caaaf..ea1be18 100644
|
||||||
+++ dhcp-4.3.3b1/relay/dhcrelay.c 2015-08-10 10:46:20.276755503 +0200
|
--- a/relay/dhcrelay.c
|
||||||
@@ -187,11 +187,11 @@ main(int argc, char **argv) {
|
+++ b/relay/dhcrelay.c
|
||||||
|
@@ -296,11 +296,11 @@ main(int argc, char **argv) {
|
||||||
/* Make sure that file descriptors 0(stdin), 1,(stdout), and
|
/* Make sure that file descriptors 0(stdin), 1,(stdout), and
|
||||||
2(stderr) are open. To do this, we assume that when we
|
2(stderr) are open. To do this, we assume that when we
|
||||||
open a file the lowest available file descriptor is used. */
|
open a file the lowest available file descriptor is used. */
|
||||||
@ -224,8 +257,8 @@ diff -up dhcp-4.3.3b1/relay/dhcrelay.c.cloexec dhcp-4.3.3b1/relay/dhcrelay.c
|
|||||||
if (fd == 2)
|
if (fd == 2)
|
||||||
log_perror = 0; /* No sense logging to /dev/null. */
|
log_perror = 0; /* No sense logging to /dev/null. */
|
||||||
else if (fd != -1)
|
else if (fd != -1)
|
||||||
@@ -558,13 +558,13 @@ main(int argc, char **argv) {
|
@@ -776,13 +776,13 @@ main(int argc, char **argv) {
|
||||||
|
/* Create the pid file. */
|
||||||
if (no_pid_file == ISC_FALSE) {
|
if (no_pid_file == ISC_FALSE) {
|
||||||
pfdesc = open(path_dhcrelay_pid,
|
pfdesc = open(path_dhcrelay_pid,
|
||||||
- O_CREAT | O_TRUNC | O_WRONLY, 0644);
|
- O_CREAT | O_TRUNC | O_WRONLY, 0644);
|
||||||
@ -240,10 +273,11 @@ diff -up dhcp-4.3.3b1/relay/dhcrelay.c.cloexec dhcp-4.3.3b1/relay/dhcrelay.c
|
|||||||
if (!pf)
|
if (!pf)
|
||||||
log_error("Can't fdopen %s: %m",
|
log_error("Can't fdopen %s: %m",
|
||||||
path_dhcrelay_pid);
|
path_dhcrelay_pid);
|
||||||
diff -up dhcp-4.3.3b1/server/confpars.c.cloexec dhcp-4.3.3b1/server/confpars.c
|
diff --git a/server/confpars.c b/server/confpars.c
|
||||||
--- dhcp-4.3.3b1/server/confpars.c.cloexec 2015-07-30 15:17:16.000000000 +0200
|
index d2cedfe..2743979 100644
|
||||||
+++ dhcp-4.3.3b1/server/confpars.c 2015-08-10 10:46:20.277755500 +0200
|
--- a/server/confpars.c
|
||||||
@@ -111,7 +111,7 @@ isc_result_t read_conf_file (const char
|
+++ b/server/confpars.c
|
||||||
|
@@ -118,7 +118,7 @@ isc_result_t read_conf_file (const char *filename, struct group *group,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -252,19 +286,11 @@ diff -up dhcp-4.3.3b1/server/confpars.c.cloexec dhcp-4.3.3b1/server/confpars.c
|
|||||||
if (leasep) {
|
if (leasep) {
|
||||||
log_error ("Can't open lease database %s: %m --",
|
log_error ("Can't open lease database %s: %m --",
|
||||||
path_dhcpd_db);
|
path_dhcpd_db);
|
||||||
diff -up dhcp-4.3.3b1/server/db.c.cloexec dhcp-4.3.3b1/server/db.c
|
diff --git a/server/db.c b/server/db.c
|
||||||
--- dhcp-4.3.3b1/server/db.c.cloexec 2015-07-30 15:17:16.000000000 +0200
|
index 67e6cc1..6181528 100644
|
||||||
+++ dhcp-4.3.3b1/server/db.c 2015-08-10 10:47:32.644518358 +0200
|
--- a/server/db.c
|
||||||
@@ -1072,7 +1072,7 @@ void db_startup (testp)
|
+++ b/server/db.c
|
||||||
}
|
@@ -1154,7 +1154,7 @@ int new_lease_file (int test_mode)
|
||||||
#endif
|
|
||||||
if (!testp) {
|
|
||||||
- db_file = fopen (path_dhcpd_db, "a");
|
|
||||||
+ db_file = fopen (path_dhcpd_db, "ae");
|
|
||||||
if (!db_file)
|
|
||||||
log_fatal ("Can't open %s for append.", path_dhcpd_db);
|
|
||||||
expire_all_pools ();
|
|
||||||
@@ -1120,7 +1120,7 @@ int new_lease_file ()
|
|
||||||
path_dhcpd_db, (int)t) >= sizeof newfname)
|
path_dhcpd_db, (int)t) >= sizeof newfname)
|
||||||
log_fatal("new_lease_file: lease file path too long");
|
log_fatal("new_lease_file: lease file path too long");
|
||||||
|
|
||||||
@ -273,7 +299,7 @@ diff -up dhcp-4.3.3b1/server/db.c.cloexec dhcp-4.3.3b1/server/db.c
|
|||||||
if (db_fd < 0) {
|
if (db_fd < 0) {
|
||||||
log_error ("Can't create new lease file: %m");
|
log_error ("Can't create new lease file: %m");
|
||||||
return 0;
|
return 0;
|
||||||
@@ -1141,7 +1141,7 @@ int new_lease_file ()
|
@@ -1175,7 +1175,7 @@ int new_lease_file (int test_mode)
|
||||||
}
|
}
|
||||||
#endif /* PARANOIA */
|
#endif /* PARANOIA */
|
||||||
|
|
||||||
@ -282,10 +308,11 @@ diff -up dhcp-4.3.3b1/server/db.c.cloexec dhcp-4.3.3b1/server/db.c
|
|||||||
log_error("Can't fdopen new lease file: %m");
|
log_error("Can't fdopen new lease file: %m");
|
||||||
close(db_fd);
|
close(db_fd);
|
||||||
goto fdfail;
|
goto fdfail;
|
||||||
diff -up dhcp-4.3.3b1/server/dhcpd.c.cloexec dhcp-4.3.3b1/server/dhcpd.c
|
diff --git a/server/dhcpd.c b/server/dhcpd.c
|
||||||
--- dhcp-4.3.3b1/server/dhcpd.c.cloexec 2015-07-30 15:17:16.000000000 +0200
|
index 55ffae7..530a923 100644
|
||||||
+++ dhcp-4.3.3b1/server/dhcpd.c 2015-08-10 10:46:20.278755497 +0200
|
--- a/server/dhcpd.c
|
||||||
@@ -194,11 +194,11 @@ main(int argc, char **argv) {
|
+++ b/server/dhcpd.c
|
||||||
|
@@ -300,11 +300,11 @@ main(int argc, char **argv) {
|
||||||
/* Make sure that file descriptors 0 (stdin), 1, (stdout), and
|
/* Make sure that file descriptors 0 (stdin), 1, (stdout), and
|
||||||
2 (stderr) are open. To do this, we assume that when we
|
2 (stderr) are open. To do this, we assume that when we
|
||||||
open a file the lowest available file descriptor is used. */
|
open a file the lowest available file descriptor is used. */
|
||||||
@ -300,7 +327,7 @@ diff -up dhcp-4.3.3b1/server/dhcpd.c.cloexec dhcp-4.3.3b1/server/dhcpd.c
|
|||||||
if (fd == 2)
|
if (fd == 2)
|
||||||
log_perror = 0; /* No sense logging to /dev/null. */
|
log_perror = 0; /* No sense logging to /dev/null. */
|
||||||
else if (fd != -1)
|
else if (fd != -1)
|
||||||
@@ -743,7 +743,7 @@ main(int argc, char **argv) {
|
@@ -975,7 +975,7 @@ main(int argc, char **argv) {
|
||||||
* appropriate.
|
* appropriate.
|
||||||
*/
|
*/
|
||||||
if (no_pid_file == ISC_FALSE) {
|
if (no_pid_file == ISC_FALSE) {
|
||||||
@ -309,7 +336,7 @@ diff -up dhcp-4.3.3b1/server/dhcpd.c.cloexec dhcp-4.3.3b1/server/dhcpd.c
|
|||||||
if (i >= 0) {
|
if (i >= 0) {
|
||||||
sprintf(pbuf, "%d\n", (int) getpid());
|
sprintf(pbuf, "%d\n", (int) getpid());
|
||||||
IGNORE_RET(write(i, pbuf, strlen(pbuf)));
|
IGNORE_RET(write(i, pbuf, strlen(pbuf)));
|
||||||
@@ -787,9 +787,9 @@ main(int argc, char **argv) {
|
@@ -1028,9 +1028,9 @@ main(int argc, char **argv) {
|
||||||
(void) close(2);
|
(void) close(2);
|
||||||
|
|
||||||
/* Reopen them on /dev/null. */
|
/* Reopen them on /dev/null. */
|
||||||
@ -322,10 +349,11 @@ diff -up dhcp-4.3.3b1/server/dhcpd.c.cloexec dhcp-4.3.3b1/server/dhcpd.c
|
|||||||
log_perror = 0; /* No sense logging to /dev/null. */
|
log_perror = 0; /* No sense logging to /dev/null. */
|
||||||
|
|
||||||
IGNORE_RET (chdir("/"));
|
IGNORE_RET (chdir("/"));
|
||||||
diff -up dhcp-4.3.3b1/server/ldap.c.cloexec dhcp-4.3.3b1/server/ldap.c
|
diff --git a/server/ldap.c b/server/ldap.c
|
||||||
--- dhcp-4.3.3b1/server/ldap.c.cloexec 2015-07-30 21:03:40.000000000 +0200
|
index 5126d24..555545c 100644
|
||||||
+++ dhcp-4.3.3b1/server/ldap.c 2015-08-10 10:46:20.279755493 +0200
|
--- a/server/ldap.c
|
||||||
@@ -1442,7 +1442,7 @@ ldap_start (void)
|
+++ b/server/ldap.c
|
||||||
|
@@ -1446,7 +1446,7 @@ ldap_start (void)
|
||||||
|
|
||||||
if (ldap_debug_file != NULL && ldap_debug_fd == -1)
|
if (ldap_debug_file != NULL && ldap_debug_fd == -1)
|
||||||
{
|
{
|
||||||
@ -334,3 +362,6 @@ diff -up dhcp-4.3.3b1/server/ldap.c.cloexec dhcp-4.3.3b1/server/ldap.c
|
|||||||
S_IRUSR | S_IWUSR)) < 0)
|
S_IRUSR | S_IWUSR)) < 0)
|
||||||
log_error ("Error opening debug LDAP log file %s: %s", ldap_debug_file,
|
log_error ("Error opening debug LDAP log file %s: %s", ldap_debug_file,
|
||||||
strerror (errno));
|
strerror (errno));
|
||||||
|
--
|
||||||
|
2.14.5
|
||||||
|
|
27
0009-Fix-garbage-in-format-string-error.patch
Normal file
27
0009-Fix-garbage-in-format-string-error.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
From 9ffd73d22b1337aeedef751afd03822cc0a15014 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/21] Fix 'garbage in format string' error
|
||||||
|
Cc: pzhukov@redhat.com
|
||||||
|
|
||||||
|
RHBZ: 450042
|
||||||
|
---
|
||||||
|
common/tables.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/common/tables.c b/common/tables.c
|
||||||
|
index c1aa214..d2294c0 100644
|
||||||
|
--- a/common/tables.c
|
||||||
|
+++ b/common/tables.c
|
||||||
|
@@ -215,7 +215,7 @@ static struct option dhcp_options[] = {
|
||||||
|
{ "name-service-search", "Sa", &dhcp_universe, 117, 1 },
|
||||||
|
#endif
|
||||||
|
{ "subnet-selection", "I", &dhcp_universe, 118, 1 },
|
||||||
|
- { "domain-search", "Dc", &dhcp_universe, 119, 1 },
|
||||||
|
+ { "domain-search", "D", &dhcp_universe, 119, 1 },
|
||||||
|
{ "vivco", "Evendor-class.", &dhcp_universe, 124, 1 },
|
||||||
|
{ "vivso", "Evendor.", &dhcp_universe, 125, 1 },
|
||||||
|
#if 0
|
||||||
|
--
|
||||||
|
2.14.5
|
||||||
|
|
32
0010-Handle-null-timeout.patch
Normal file
32
0010-Handle-null-timeout.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
From e269e137c3b7d25a2d089be508e6769731618d54 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/21] Handle null timeout
|
||||||
|
Cc: pzhukov@redhat.com
|
||||||
|
|
||||||
|
Handle cases in add_timeout() where the function is called with a NULL
|
||||||
|
value for the 'when' parameter
|
||||||
|
|
||||||
|
ISC-Bugs: #19867 (rejected)
|
||||||
|
---
|
||||||
|
common/dispatch.c | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/common/dispatch.c b/common/dispatch.c
|
||||||
|
index 0207ad3..d7fe200 100644
|
||||||
|
--- a/common/dispatch.c
|
||||||
|
+++ b/common/dispatch.c
|
||||||
|
@@ -209,6 +209,10 @@ void add_timeout (when, where, what, ref, unref)
|
||||||
|
isc_interval_t interval;
|
||||||
|
isc_time_t expires;
|
||||||
|
|
||||||
|
+ if (when == NULL) {
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/* See if this timeout supersedes an existing timeout. */
|
||||||
|
t = (struct timeout *)0;
|
||||||
|
for (q = timeouts; q; q = q->next) {
|
||||||
|
--
|
||||||
|
2.14.5
|
||||||
|
|
@ -1,21 +1,38 @@
|
|||||||
|
From 291f738f341a78f8c7974a7603d1a2eaa01ebacc Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pavel Zhukov <pzhukov@redhat.com>
|
||||||
|
Date: Thu, 21 Feb 2019 10:30:28 +0100
|
||||||
|
Subject: [PATCH 11/21] Drop unnecessary capabilities
|
||||||
|
Cc: pzhukov@redhat.com
|
||||||
|
|
||||||
|
dhclient (#517649, #546765), dhcpd/dhcrelay (#699713)
|
||||||
|
---
|
||||||
|
client/Makefile.am | 3 ++-
|
||||||
|
client/dhclient-script.8 | 10 ++++++++++
|
||||||
|
client/dhclient.8 | 29 +++++++++++++++++++++++++++++
|
||||||
|
client/dhclient.c | 24 ++++++++++++++++++++++++
|
||||||
|
configure.ac | 35 +++++++++++++++++++++++++++++++++++
|
||||||
|
relay/Makefile.am | 3 ++-
|
||||||
|
relay/dhcrelay.c | 29 +++++++++++++++++++++++++++++
|
||||||
|
7 files changed, 131 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/client/Makefile.am b/client/Makefile.am
|
diff --git a/client/Makefile.am b/client/Makefile.am
|
||||||
index b1ecf82..387c097 100644
|
index d177159..0689185 100644
|
||||||
--- a/client/Makefile.am
|
--- a/client/Makefile.am
|
||||||
+++ b/client/Makefile.am
|
+++ b/client/Makefile.am
|
||||||
@@ -15,6 +15,7 @@ dhclient_SOURCES = clparse.c dhclient.c dhc6.c \
|
@@ -17,6 +17,7 @@ dhclient_LDADD = ../common/libdhcp.@A@ ../omapip/libomapi.@A@ \
|
||||||
scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
|
@BINDLIBIRSDIR@/libirs.@A@ \
|
||||||
scripts/netbsd scripts/nextstep scripts/openbsd \
|
@BINDLIBDNSDIR@/libdns.@A@ \
|
||||||
scripts/solaris scripts/openwrt
|
@BINDLIBISCCFGDIR@/libisccfg.@A@ \
|
||||||
-dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.la $(BIND_LIBS)
|
- @BINDLIBISCDIR@/libisc.@A@
|
||||||
+dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
|
+ @BINDLIBISCDIR@/libisc.@A@ \
|
||||||
+ $(CAPNG_LDADD) $(BIND_LIBS)
|
+ $(CAPNG_LDADD)
|
||||||
man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
|
man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
|
||||||
EXTRA_DIST = $(man_MANS)
|
EXTRA_DIST = $(man_MANS)
|
||||||
diff --git a/client/dhclient-script.8 b/client/dhclient-script.8
|
diff --git a/client/dhclient-script.8 b/client/dhclient-script.8
|
||||||
index 3a3aaf7..fec726c 100644
|
index 0db5516..2eddb8f 100644
|
||||||
--- a/client/dhclient-script.8
|
--- a/client/dhclient-script.8
|
||||||
+++ b/client/dhclient-script.8
|
+++ b/client/dhclient-script.8
|
||||||
@@ -245,6 +245,16 @@ repeatedly initialized to the values provided by one server, and then
|
@@ -243,6 +243,16 @@ repeatedly initialized to the values provided by one server, and then
|
||||||
the other. Assuming the information provided by both servers is
|
the other. Assuming the information provided by both servers is
|
||||||
valid, this shouldn't cause any real problems, but it could be
|
valid, this shouldn't cause any real problems, but it could be
|
||||||
confusing.
|
confusing.
|
||||||
@ -33,7 +50,7 @@ index 3a3aaf7..fec726c 100644
|
|||||||
dhclient(8), dhcpd(8), dhcrelay(8), dhclient.conf(5) and
|
dhclient(8), dhcpd(8), dhcrelay(8), dhclient.conf(5) and
|
||||||
dhclient.leases(5).
|
dhclient.leases(5).
|
||||||
diff --git a/client/dhclient.8 b/client/dhclient.8
|
diff --git a/client/dhclient.8 b/client/dhclient.8
|
||||||
index aa2238d..005cda5 100644
|
index 6d7fbdb..0145b9f 100644
|
||||||
--- a/client/dhclient.8
|
--- a/client/dhclient.8
|
||||||
+++ b/client/dhclient.8
|
+++ b/client/dhclient.8
|
||||||
@@ -134,6 +134,9 @@ dhclient - Dynamic Host Configuration Protocol Client
|
@@ -134,6 +134,9 @@ dhclient - Dynamic Host Configuration Protocol Client
|
||||||
@ -46,7 +63,7 @@ index aa2238d..005cda5 100644
|
|||||||
.B -B
|
.B -B
|
||||||
]
|
]
|
||||||
[
|
[
|
||||||
@@ -320,6 +323,32 @@ not to exit when it doesn't find any such interfaces. The
|
@@ -328,6 +331,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
|
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
|
has been added or removed, so that the client can attempt to configure an IP
|
||||||
address on that interface.
|
address on that interface.
|
||||||
@ -80,12 +97,12 @@ index aa2238d..005cda5 100644
|
|||||||
.BI \-n
|
.BI \-n
|
||||||
Do not configure any interfaces. This is most likely to be useful in
|
Do not configure any interfaces. This is most likely to be useful in
|
||||||
diff --git a/client/dhclient.c b/client/dhclient.c
|
diff --git a/client/dhclient.c b/client/dhclient.c
|
||||||
index 09ae09b..2d564ff 100644
|
index a86ab9e..5d3f5bc 100644
|
||||||
--- a/client/dhclient.c
|
--- a/client/dhclient.c
|
||||||
+++ b/client/dhclient.c
|
+++ b/client/dhclient.c
|
||||||
@@ -40,6 +40,10 @@
|
@@ -41,6 +41,10 @@
|
||||||
#include <isc/file.h>
|
#include <sys/wait.h>
|
||||||
#include <dns/result.h>
|
#include <limits.h>
|
||||||
|
|
||||||
+#ifdef HAVE_LIBCAP_NG
|
+#ifdef HAVE_LIBCAP_NG
|
||||||
+#include <cap-ng.h>
|
+#include <cap-ng.h>
|
||||||
@ -94,7 +111,7 @@ index 09ae09b..2d564ff 100644
|
|||||||
/*
|
/*
|
||||||
* Defined in stdio.h when _GNU_SOURCE is set, but we don't want to define
|
* Defined in stdio.h when _GNU_SOURCE is set, but we don't want to define
|
||||||
* that when building ISC code.
|
* that when building ISC code.
|
||||||
@@ -239,6 +243,9 @@ main(int argc, char **argv) {
|
@@ -266,6 +270,9 @@ main(int argc, char **argv) {
|
||||||
int timeout_arg = 0;
|
int timeout_arg = 0;
|
||||||
char *arg_conf = NULL;
|
char *arg_conf = NULL;
|
||||||
int arg_conf_len = 0;
|
int arg_conf_len = 0;
|
||||||
@ -104,18 +121,18 @@ index 09ae09b..2d564ff 100644
|
|||||||
|
|
||||||
/* Initialize client globals. */
|
/* Initialize client globals. */
|
||||||
memset(&default_duid, 0, sizeof(default_duid));
|
memset(&default_duid, 0, sizeof(default_duid));
|
||||||
@@ -548,6 +555,10 @@ main(int argc, char **argv) {
|
@@ -665,6 +672,10 @@ main(int argc, char **argv) {
|
||||||
}
|
|
||||||
|
|
||||||
dhclient_request_options = argv[i];
|
dhclient_request_options = argv[i];
|
||||||
|
|
||||||
+ } else if (!strcmp(argv[i], "-nc")) {
|
+ } else if (!strcmp(argv[i], "-nc")) {
|
||||||
+#ifdef HAVE_LIBCAP_NG
|
+#ifdef HAVE_LIBCAP_NG
|
||||||
+ keep_capabilities = 1;
|
+ keep_capabilities = 1;
|
||||||
+#endif
|
+#endif
|
||||||
} else if (argv[i][0] == '-') {
|
} else if (argv[i][0] == '-') {
|
||||||
usage("Unknown command: %s", argv[i]);
|
usage("Unknown command: %s", argv[i]);
|
||||||
} else if (interfaces_requested < 0) {
|
} else if (interfaces_requested < 0) {
|
||||||
@@ -608,6 +619,19 @@ main(int argc, char **argv) {
|
@@ -725,6 +736,19 @@ main(int argc, char **argv) {
|
||||||
path_dhclient_script = s;
|
path_dhclient_script = s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,10 +153,10 @@ index 09ae09b..2d564ff 100644
|
|||||||
initialize_common_option_spaces();
|
initialize_common_option_spaces();
|
||||||
|
|
||||||
diff --git a/configure.ac b/configure.ac
|
diff --git a/configure.ac b/configure.ac
|
||||||
index adc98a8..8bbe5ca 100644
|
index a797438..15fc0d7 100644
|
||||||
--- a/configure.ac
|
--- a/configure.ac
|
||||||
+++ b/configure.ac
|
+++ b/configure.ac
|
||||||
@@ -592,6 +592,41 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[void foo() __attribute__((noreturn));
|
@@ -612,6 +612,41 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[void foo() __attribute__((noreturn));
|
||||||
# Look for optional headers.
|
# Look for optional headers.
|
||||||
AC_CHECK_HEADERS(sys/socket.h net/if_dl.h net/if6.h regex.h)
|
AC_CHECK_HEADERS(sys/socket.h net/if_dl.h net/if6.h regex.h)
|
||||||
|
|
||||||
@ -182,20 +199,21 @@ index adc98a8..8bbe5ca 100644
|
|||||||
AC_SEARCH_LIBS(socket, [socket])
|
AC_SEARCH_LIBS(socket, [socket])
|
||||||
AC_SEARCH_LIBS(inet_ntoa, [nsl])
|
AC_SEARCH_LIBS(inet_ntoa, [nsl])
|
||||||
diff --git a/relay/Makefile.am b/relay/Makefile.am
|
diff --git a/relay/Makefile.am b/relay/Makefile.am
|
||||||
index 316a524..999e543 100644
|
index 2ba5979..8900e0b 100644
|
||||||
--- a/relay/Makefile.am
|
--- a/relay/Makefile.am
|
||||||
+++ b/relay/Makefile.am
|
+++ b/relay/Makefile.am
|
||||||
@@ -5,7 +5,7 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"'
|
@@ -6,7 +6,8 @@ dhcrelay_LDADD = ../common/libdhcp.@A@ ../omapip/libomapi.@A@ \
|
||||||
sbin_PROGRAMS = dhcrelay
|
@BINDLIBIRSDIR@/libirs.@A@ \
|
||||||
dhcrelay_SOURCES = dhcrelay.c
|
@BINDLIBDNSDIR@/libdns.@A@ \
|
||||||
dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
|
@BINDLIBISCCFGDIR@/libisccfg.@A@ \
|
||||||
- $(BIND_LIBS)
|
- @BINDLIBISCDIR@/libisc.@A@
|
||||||
+ $(CAPNG_LDADD) $(BIND_LIBS)
|
+ @BINDLIBISCDIR@/libisc.@A@ \
|
||||||
|
+ $(CAPNG_LDADD)
|
||||||
man_MANS = dhcrelay.8
|
man_MANS = dhcrelay.8
|
||||||
EXTRA_DIST = $(man_MANS)
|
EXTRA_DIST = $(man_MANS)
|
||||||
|
|
||||||
diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c
|
diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c
|
||||||
index eac119c..d2ab448 100644
|
index ea1be18..7b4f4f1 100644
|
||||||
--- a/relay/dhcrelay.c
|
--- a/relay/dhcrelay.c
|
||||||
+++ b/relay/dhcrelay.c
|
+++ b/relay/dhcrelay.c
|
||||||
@@ -32,6 +32,11 @@
|
@@ -32,6 +32,11 @@
|
||||||
@ -210,7 +228,7 @@ index eac119c..d2ab448 100644
|
|||||||
TIME default_lease_time = 43200; /* 12 hours... */
|
TIME default_lease_time = 43200; /* 12 hours... */
|
||||||
TIME max_lease_time = 86400; /* 24 hours... */
|
TIME max_lease_time = 86400; /* 24 hours... */
|
||||||
struct tree_cache *global_options[256];
|
struct tree_cache *global_options[256];
|
||||||
@@ -472,6 +477,10 @@ main(int argc, char **argv) {
|
@@ -590,6 +595,10 @@ main(int argc, char **argv) {
|
||||||
if (++i == argc)
|
if (++i == argc)
|
||||||
usage(use_noarg, argv[i-1]);
|
usage(use_noarg, argv[i-1]);
|
||||||
dhcrelay_sub_id = argv[i];
|
dhcrelay_sub_id = argv[i];
|
||||||
@ -221,7 +239,7 @@ index eac119c..d2ab448 100644
|
|||||||
#endif
|
#endif
|
||||||
} else if (!strcmp(argv[i], "-pf")) {
|
} else if (!strcmp(argv[i], "-pf")) {
|
||||||
if (++i == argc)
|
if (++i == argc)
|
||||||
@@ -547,6 +556,17 @@ main(int argc, char **argv) {
|
@@ -660,6 +669,17 @@ main(int argc, char **argv) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -239,7 +257,7 @@ index eac119c..d2ab448 100644
|
|||||||
if (!quiet) {
|
if (!quiet) {
|
||||||
log_info("%s %s", message, PACKAGE_VERSION);
|
log_info("%s %s", message, PACKAGE_VERSION);
|
||||||
log_info(copyright);
|
log_info(copyright);
|
||||||
@@ -699,6 +719,15 @@ main(int argc, char **argv) {
|
@@ -816,6 +836,15 @@ main(int argc, char **argv) {
|
||||||
signal(SIGTERM, dhcp_signal_handler); /* kill */
|
signal(SIGTERM, dhcp_signal_handler); /* kill */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -255,3 +273,6 @@ index eac119c..d2ab448 100644
|
|||||||
/* Start dispatching packets and timeouts... */
|
/* Start dispatching packets and timeouts... */
|
||||||
dispatch();
|
dispatch();
|
||||||
|
|
||||||
|
--
|
||||||
|
2.14.5
|
||||||
|
|
@ -1,6 +1,27 @@
|
|||||||
diff -up dhcp-4.3.4/client/clparse.c.rfc3442 dhcp-4.3.4/client/clparse.c
|
From 2756fcc3f88c27d0e12e72dbdd2906fbf45f2362 Mon Sep 17 00:00:00 2001
|
||||||
--- dhcp-4.3.4/client/clparse.c.rfc3442 2016-04-29 12:23:34.192032714 +0200
|
From: Pavel Zhukov <pzhukov@redhat.com>
|
||||||
+++ dhcp-4.3.4/client/clparse.c 2016-04-29 12:24:37.531016317 +0200
|
Date: Thu, 21 Feb 2019 10:32:35 +0100
|
||||||
|
Subject: [PATCH 12/21] 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 ++++++++++++++++++++++++++++++++++++++++++++++++++-
|
||||||
|
common/tables.c | 2 ++
|
||||||
|
includes/dhcp.h | 1 +
|
||||||
|
includes/dhcpd.h | 2 ++
|
||||||
|
includes/dhctoken.h | 5 +++--
|
||||||
|
9 files changed, 219 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/client/clparse.c b/client/clparse.c
|
||||||
|
index 44387ed..862e4f9 100644
|
||||||
|
--- a/client/clparse.c
|
||||||
|
+++ b/client/clparse.c
|
||||||
@@ -31,7 +31,7 @@
|
@@ -31,7 +31,7 @@
|
||||||
|
|
||||||
struct client_config top_level_config;
|
struct client_config top_level_config;
|
||||||
@ -35,10 +56,11 @@ diff -up dhcp-4.3.4/client/clparse.c.rfc3442 dhcp-4.3.4/client/clparse.c
|
|||||||
for (code = 0 ; code < NUM_DEFAULT_REQUESTED_OPTS ; code++) {
|
for (code = 0 ; code < NUM_DEFAULT_REQUESTED_OPTS ; code++) {
|
||||||
if (default_requested_options[code] == NULL)
|
if (default_requested_options[code] == NULL)
|
||||||
log_fatal("Unable to find option definition for "
|
log_fatal("Unable to find option definition for "
|
||||||
diff -up dhcp-4.3.4/common/dhcp-options.5.rfc3442 dhcp-4.3.4/common/dhcp-options.5
|
diff --git a/common/dhcp-options.5 b/common/dhcp-options.5
|
||||||
--- dhcp-4.3.4/common/dhcp-options.5.rfc3442 2016-04-29 12:23:34.183032716 +0200
|
index d9e1197..2343b19 100644
|
||||||
+++ dhcp-4.3.4/common/dhcp-options.5 2016-04-29 12:23:34.237032703 +0200
|
--- a/common/dhcp-options.5
|
||||||
@@ -111,6 +111,26 @@ hexadecimal, separated by colons. For e
|
+++ b/common/dhcp-options.5
|
||||||
|
@@ -110,6 +110,26 @@ hexadecimal, separated by colons. For example:
|
||||||
or
|
or
|
||||||
option dhcp-client-identifier 43:4c:49:45:54:2d:46:4f:4f;
|
option dhcp-client-identifier 43:4c:49:45:54:2d:46:4f:4f;
|
||||||
.fi
|
.fi
|
||||||
@ -65,7 +87,7 @@ diff -up dhcp-4.3.4/common/dhcp-options.5.rfc3442 dhcp-4.3.4/common/dhcp-options
|
|||||||
.SH SETTING OPTION VALUES USING EXPRESSIONS
|
.SH SETTING OPTION VALUES USING EXPRESSIONS
|
||||||
Sometimes it's helpful to be able to set the value of a DHCP option
|
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
|
based on some value that the client has sent. To do this, you can
|
||||||
@@ -1031,6 +1051,29 @@ dhclient-script will create routes:
|
@@ -1086,6 +1106,29 @@ dhclient-script will create routes:
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
.nf
|
.nf
|
||||||
@ -95,10 +117,11 @@ diff -up dhcp-4.3.4/common/dhcp-options.5.rfc3442 dhcp-4.3.4/common/dhcp-options
|
|||||||
.B option \fBstreettalk-directory-assistance-server\fR \fIip-address\fR
|
.B option \fBstreettalk-directory-assistance-server\fR \fIip-address\fR
|
||||||
[\fB,\fR \fIip-address\fR...]\fB;\fR
|
[\fB,\fR \fIip-address\fR...]\fB;\fR
|
||||||
.fi
|
.fi
|
||||||
diff -up dhcp-4.3.4/common/inet.c.rfc3442 dhcp-4.3.4/common/inet.c
|
diff --git a/common/inet.c b/common/inet.c
|
||||||
--- dhcp-4.3.4/common/inet.c.rfc3442 2016-03-22 14:16:51.000000000 +0100
|
index c4da73c..981fb92 100644
|
||||||
+++ dhcp-4.3.4/common/inet.c 2016-04-29 12:23:34.237032703 +0200
|
--- a/common/inet.c
|
||||||
@@ -519,6 +519,60 @@ free_iaddrcidrnetlist(struct iaddrcidrne
|
+++ b/common/inet.c
|
||||||
|
@@ -519,6 +519,60 @@ free_iaddrcidrnetlist(struct iaddrcidrnetlist **result) {
|
||||||
return ISC_R_SUCCESS;
|
return ISC_R_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,10 +182,11 @@ diff -up dhcp-4.3.4/common/inet.c.rfc3442 dhcp-4.3.4/common/inet.c
|
|||||||
/* piaddr() turns an iaddr structure into a printable address. */
|
/* piaddr() turns an iaddr structure into a printable address. */
|
||||||
/* XXX: should use a const pointer rather than passing the structure */
|
/* XXX: should use a const pointer rather than passing the structure */
|
||||||
const char *
|
const char *
|
||||||
diff -up dhcp-4.3.4/common/options.c.rfc3442 dhcp-4.3.4/common/options.c
|
diff --git a/common/options.c b/common/options.c
|
||||||
--- dhcp-4.3.4/common/options.c.rfc3442 2016-03-22 14:16:51.000000000 +0100
|
index fc0e088..3034cf0 100644
|
||||||
+++ dhcp-4.3.4/common/options.c 2016-04-29 12:23:34.237032703 +0200
|
--- a/common/options.c
|
||||||
@@ -713,7 +713,11 @@ cons_options(struct packet *inpacket, st
|
+++ b/common/options.c
|
||||||
|
@@ -729,7 +729,11 @@ cons_options(struct packet *inpacket, struct dhcp_packet *outpacket,
|
||||||
* packet.
|
* packet.
|
||||||
*/
|
*/
|
||||||
priority_list[priority_len++] = DHO_SUBNET_MASK;
|
priority_list[priority_len++] = DHO_SUBNET_MASK;
|
||||||
@ -175,7 +199,7 @@ diff -up dhcp-4.3.4/common/options.c.rfc3442 dhcp-4.3.4/common/options.c
|
|||||||
priority_list[priority_len++] = DHO_DOMAIN_NAME_SERVERS;
|
priority_list[priority_len++] = DHO_DOMAIN_NAME_SERVERS;
|
||||||
priority_list[priority_len++] = DHO_HOST_NAME;
|
priority_list[priority_len++] = DHO_HOST_NAME;
|
||||||
priority_list[priority_len++] = DHO_FQDN;
|
priority_list[priority_len++] = DHO_FQDN;
|
||||||
@@ -1694,6 +1698,7 @@ const char *pretty_print_option (option,
|
@@ -1804,6 +1808,7 @@ const char *pretty_print_option (option, data, len, emit_commas, emit_quotes)
|
||||||
unsigned long tval;
|
unsigned long tval;
|
||||||
isc_boolean_t a_array = ISC_FALSE;
|
isc_boolean_t a_array = ISC_FALSE;
|
||||||
int len_used;
|
int len_used;
|
||||||
@ -183,7 +207,7 @@ diff -up dhcp-4.3.4/common/options.c.rfc3442 dhcp-4.3.4/common/options.c
|
|||||||
|
|
||||||
if (emit_commas)
|
if (emit_commas)
|
||||||
comma = ',';
|
comma = ',';
|
||||||
@@ -1702,6 +1707,7 @@ const char *pretty_print_option (option,
|
@@ -1812,6 +1817,7 @@ const char *pretty_print_option (option, data, len, emit_commas, emit_quotes)
|
||||||
|
|
||||||
memset (enumbuf, 0, sizeof enumbuf);
|
memset (enumbuf, 0, sizeof enumbuf);
|
||||||
|
|
||||||
@ -191,7 +215,7 @@ diff -up dhcp-4.3.4/common/options.c.rfc3442 dhcp-4.3.4/common/options.c
|
|||||||
/* Figure out the size of the data. */
|
/* Figure out the size of the data. */
|
||||||
for (l = i = 0; option -> format [i]; i++, l++) {
|
for (l = i = 0; option -> format [i]; i++, l++) {
|
||||||
if (l >= sizeof(fmtbuf) - 1)
|
if (l >= sizeof(fmtbuf) - 1)
|
||||||
@@ -1894,6 +1900,33 @@ const char *pretty_print_option (option,
|
@@ -2004,6 +2010,33 @@ const char *pretty_print_option (option, data, len, emit_commas, emit_quotes)
|
||||||
if (numhunk < 0)
|
if (numhunk < 0)
|
||||||
numhunk = 1;
|
numhunk = 1;
|
||||||
|
|
||||||
@ -225,7 +249,7 @@ diff -up dhcp-4.3.4/common/options.c.rfc3442 dhcp-4.3.4/common/options.c
|
|||||||
/* Cycle through the array (or hunk) printing the data. */
|
/* Cycle through the array (or hunk) printing the data. */
|
||||||
for (i = 0; i < numhunk; i++) {
|
for (i = 0; i < numhunk; i++) {
|
||||||
if ((a_array == ISC_TRUE) && (i != 0) && (numelem > 0)) {
|
if ((a_array == ISC_TRUE) && (i != 0) && (numelem > 0)) {
|
||||||
@@ -2049,6 +2082,20 @@ const char *pretty_print_option (option,
|
@@ -2159,6 +2192,20 @@ const char *pretty_print_option (option, data, len, emit_commas, emit_quotes)
|
||||||
strcpy(op, piaddr(iaddr));
|
strcpy(op, piaddr(iaddr));
|
||||||
dp += 4;
|
dp += 4;
|
||||||
break;
|
break;
|
||||||
@ -246,13 +270,15 @@ diff -up dhcp-4.3.4/common/options.c.rfc3442 dhcp-4.3.4/common/options.c
|
|||||||
case '6':
|
case '6':
|
||||||
iaddr.len = 16;
|
iaddr.len = 16;
|
||||||
memcpy(iaddr.iabuf, dp, 16);
|
memcpy(iaddr.iabuf, dp, 16);
|
||||||
diff -up dhcp-4.3.4/common/parse.c.rfc3442 dhcp-4.3.4/common/parse.c
|
diff --git a/common/parse.c b/common/parse.c
|
||||||
--- dhcp-4.3.4/common/parse.c.rfc3442 2016-04-29 12:23:34.220032707 +0200
|
index 3ac4ebf..f17bc0b 100644
|
||||||
+++ dhcp-4.3.4/common/parse.c 2016-04-29 12:23:34.238032702 +0200
|
--- a/common/parse.c
|
||||||
@@ -341,6 +341,39 @@ int parse_ip_addr (cfile, addr)
|
+++ b/common/parse.c
|
||||||
|
@@ -344,6 +344,39 @@ int parse_ip_addr (cfile, addr)
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
+/*
|
||||||
+ * destination-descriptor :== NUMBER DOT NUMBER |
|
+ * destination-descriptor :== NUMBER DOT NUMBER |
|
||||||
+ * NUMBER DOT NUMBER DOT NUMBER |
|
+ * NUMBER DOT NUMBER DOT NUMBER |
|
||||||
+ * NUMBER DOT NUMBER DOT NUMBER DOT NUMBER |
|
+ * NUMBER DOT NUMBER DOT NUMBER DOT NUMBER |
|
||||||
@ -285,11 +311,10 @@ diff -up dhcp-4.3.4/common/parse.c.rfc3442 dhcp-4.3.4/common/parse.c
|
|||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+/*
|
/*
|
||||||
* Return true if every character in the string is hexadecimal.
|
* Return true if every character in the string is hexadecimal.
|
||||||
*/
|
*/
|
||||||
static int
|
@@ -724,8 +757,10 @@ unsigned char *parse_numeric_aggregate (cfile, buf,
|
||||||
@@ -720,8 +753,10 @@ unsigned char *parse_numeric_aggregate (
|
|
||||||
if (count) {
|
if (count) {
|
||||||
token = peek_token (&val, (unsigned *)0, cfile);
|
token = peek_token (&val, (unsigned *)0, cfile);
|
||||||
if (token != separator) {
|
if (token != separator) {
|
||||||
@ -301,7 +326,7 @@ diff -up dhcp-4.3.4/common/parse.c.rfc3442 dhcp-4.3.4/common/parse.c
|
|||||||
if (token != RBRACE && token != LBRACE)
|
if (token != RBRACE && token != LBRACE)
|
||||||
token = next_token (&val,
|
token = next_token (&val,
|
||||||
(unsigned *)0,
|
(unsigned *)0,
|
||||||
@@ -1668,6 +1703,9 @@ int parse_option_code_definition (cfile,
|
@@ -1672,6 +1707,9 @@ int parse_option_code_definition (cfile, option)
|
||||||
case IP_ADDRESS:
|
case IP_ADDRESS:
|
||||||
type = 'I';
|
type = 'I';
|
||||||
break;
|
break;
|
||||||
@ -311,7 +336,7 @@ diff -up dhcp-4.3.4/common/parse.c.rfc3442 dhcp-4.3.4/common/parse.c
|
|||||||
case IP6_ADDRESS:
|
case IP6_ADDRESS:
|
||||||
type = '6';
|
type = '6';
|
||||||
break;
|
break;
|
||||||
@@ -5097,6 +5135,15 @@ int parse_option_token (rv, cfile, fmt,
|
@@ -5101,6 +5139,15 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -327,7 +352,7 @@ diff -up dhcp-4.3.4/common/parse.c.rfc3442 dhcp-4.3.4/common/parse.c
|
|||||||
case '6': /* IPv6 address. */
|
case '6': /* IPv6 address. */
|
||||||
if (!parse_ip6_addr(cfile, &addr)) {
|
if (!parse_ip6_addr(cfile, &addr)) {
|
||||||
return 0;
|
return 0;
|
||||||
@@ -5374,6 +5421,13 @@ int parse_option_decl (oc, cfile)
|
@@ -5378,6 +5425,13 @@ int parse_option_decl (oc, cfile)
|
||||||
goto exit;
|
goto exit;
|
||||||
len = ip_addr.len;
|
len = ip_addr.len;
|
||||||
dp = ip_addr.iabuf;
|
dp = ip_addr.iabuf;
|
||||||
@ -341,10 +366,11 @@ diff -up dhcp-4.3.4/common/parse.c.rfc3442 dhcp-4.3.4/common/parse.c
|
|||||||
|
|
||||||
alloc:
|
alloc:
|
||||||
if (hunkix + len > sizeof hunkbuf) {
|
if (hunkix + len > sizeof hunkbuf) {
|
||||||
diff -up dhcp-4.3.4/common/tables.c.rfc3442 dhcp-4.3.4/common/tables.c
|
diff --git a/common/tables.c b/common/tables.c
|
||||||
--- dhcp-4.3.4/common/tables.c.rfc3442 2016-04-29 12:23:34.209032710 +0200
|
index d2294c0..f1be07d 100644
|
||||||
+++ dhcp-4.3.4/common/tables.c 2016-04-29 12:23:34.238032702 +0200
|
--- a/common/tables.c
|
||||||
@@ -45,6 +45,7 @@ HASH_FUNCTIONS (option_code, const unsig
|
+++ b/common/tables.c
|
||||||
|
@@ -45,6 +45,7 @@ HASH_FUNCTIONS (option_code, const unsigned *, struct option,
|
||||||
Format codes:
|
Format codes:
|
||||||
|
|
||||||
I - IPv4 address
|
I - IPv4 address
|
||||||
@ -360,29 +386,11 @@ diff -up dhcp-4.3.4/common/tables.c.rfc3442 dhcp-4.3.4/common/tables.c
|
|||||||
{ "vivco", "Evendor-class.", &dhcp_universe, 124, 1 },
|
{ "vivco", "Evendor-class.", &dhcp_universe, 124, 1 },
|
||||||
{ "vivso", "Evendor.", &dhcp_universe, 125, 1 },
|
{ "vivso", "Evendor.", &dhcp_universe, 125, 1 },
|
||||||
#if 0
|
#if 0
|
||||||
diff -up dhcp-4.3.4/includes/dhcpd.h.rfc3442 dhcp-4.3.4/includes/dhcpd.h
|
diff --git a/includes/dhcp.h b/includes/dhcp.h
|
||||||
--- dhcp-4.3.4/includes/dhcpd.h.rfc3442 2016-04-29 12:23:34.186032716 +0200
|
index 0a74137..95bf539 100644
|
||||||
+++ dhcp-4.3.4/includes/dhcpd.h 2016-04-29 12:23:34.239032702 +0200
|
--- a/includes/dhcp.h
|
||||||
@@ -2894,6 +2894,7 @@ isc_result_t range2cidr(struct iaddrcidr
|
+++ b/includes/dhcp.h
|
||||||
const struct iaddr *lo, const struct iaddr *hi);
|
@@ -158,6 +158,7 @@ struct dhcp_packet {
|
||||||
isc_result_t free_iaddrcidrnetlist(struct iaddrcidrnetlist **result);
|
|
||||||
const char *piaddr (struct iaddr);
|
|
||||||
+const char *pdestdesc (struct iaddr);
|
|
||||||
char *piaddrmask(struct iaddr *, struct iaddr *);
|
|
||||||
char *piaddrcidr(const struct iaddr *, unsigned int);
|
|
||||||
u_int16_t validate_port(char *);
|
|
||||||
@@ -3108,6 +3109,7 @@ void parse_client_lease_declaration (str
|
|
||||||
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 *);
|
|
||||||
+int parse_destination_descriptor (struct parse *, struct iaddr *);
|
|
||||||
int parse_ip_addr_with_subnet(struct parse *, struct iaddrmatch *);
|
|
||||||
void parse_reject_statement (struct parse *, struct client_config *);
|
|
||||||
|
|
||||||
diff -up dhcp-4.3.4/includes/dhcp.h.rfc3442 dhcp-4.3.4/includes/dhcp.h
|
|
||||||
--- dhcp-4.3.4/includes/dhcp.h.rfc3442 2016-03-22 14:16:51.000000000 +0100
|
|
||||||
+++ dhcp-4.3.4/includes/dhcp.h 2016-04-29 12:23:34.239032702 +0200
|
|
||||||
@@ -159,6 +159,7 @@ struct dhcp_packet {
|
|
||||||
#define DHO_ASSOCIATED_IP 92
|
#define DHO_ASSOCIATED_IP 92
|
||||||
#define DHO_SUBNET_SELECTION 118 /* RFC3011! */
|
#define DHO_SUBNET_SELECTION 118 /* RFC3011! */
|
||||||
#define DHO_DOMAIN_SEARCH 119 /* RFC3397 */
|
#define DHO_DOMAIN_SEARCH 119 /* RFC3397 */
|
||||||
@ -390,16 +398,42 @@ diff -up dhcp-4.3.4/includes/dhcp.h.rfc3442 dhcp-4.3.4/includes/dhcp.h
|
|||||||
#define DHO_VIVCO_SUBOPTIONS 124
|
#define DHO_VIVCO_SUBOPTIONS 124
|
||||||
#define DHO_VIVSO_SUBOPTIONS 125
|
#define DHO_VIVSO_SUBOPTIONS 125
|
||||||
|
|
||||||
diff -up dhcp-4.3.4/includes/dhctoken.h.rfc3442 dhcp-4.3.4/includes/dhctoken.h
|
diff --git a/includes/dhcpd.h b/includes/dhcpd.h
|
||||||
--- dhcp-4.3.4/includes/dhctoken.h.rfc3442 2016-04-29 12:23:34.239032702 +0200
|
index 3632a6b..2ac39ae 100644
|
||||||
+++ dhcp-4.3.4/includes/dhctoken.h 2016-04-29 12:25:07.236008628 +0200
|
--- a/includes/dhcpd.h
|
||||||
@@ -374,7 +374,8 @@ enum dhcp_token {
|
+++ b/includes/dhcpd.h
|
||||||
|
@@ -2951,6 +2951,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);
|
||||||
|
+const char *pdestdesc (struct iaddr);
|
||||||
|
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 *,
|
||||||
|
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 *);
|
||||||
|
+int parse_destination_descriptor (struct parse *, struct iaddr *);
|
||||||
|
int parse_ip_addr_with_subnet(struct parse *, struct iaddrmatch *);
|
||||||
|
void parse_reject_statement (struct parse *, struct client_config *);
|
||||||
|
|
||||||
|
diff --git a/includes/dhctoken.h b/includes/dhctoken.h
|
||||||
|
index 7e7215a..b4d93ba 100644
|
||||||
|
--- a/includes/dhctoken.h
|
||||||
|
+++ b/includes/dhctoken.h
|
||||||
|
@@ -376,8 +376,9 @@ enum dhcp_token {
|
||||||
LEASE_ID_FORMAT = 676,
|
LEASE_ID_FORMAT = 676,
|
||||||
TOKEN_HEX = 677,
|
TOKEN_HEX = 677,
|
||||||
TOKEN_OCTAL = 678,
|
TOKEN_OCTAL = 678,
|
||||||
- BOOTP_BROADCAST_ALWAYS = 679
|
- KEY_ALGORITHM = 679
|
||||||
+ BOOTP_BROADCAST_ALWAYS = 679,
|
- BOOTP_BROADCAST_ALWAYS = 680
|
||||||
+ DESTINATION_DESCRIPTOR = 680
|
+ KEY_ALGORITHM = 679,
|
||||||
|
+ BOOTP_BROADCAST_ALWAYS = 680,
|
||||||
|
+ DESTINATION_DESCRIPTOR = 681
|
||||||
};
|
};
|
||||||
|
|
||||||
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
|
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
|
||||||
|
--
|
||||||
|
2.14.5
|
||||||
|
|
@ -1,7 +1,24 @@
|
|||||||
diff -up dhcp-4.3.4/client/dhc6.c.PPP dhcp-4.3.4/client/dhc6.c
|
From 43332b29f0c8fef3ddd225e31f5f2b4ff8273b36 Mon Sep 17 00:00:00 2001
|
||||||
--- dhcp-4.3.4/client/dhc6.c.PPP 2016-04-29 12:46:29.824988665 +0200
|
From: Pavel Zhukov <pzhukov@redhat.com>
|
||||||
+++ dhcp-4.3.4/client/dhc6.c 2016-04-29 12:46:29.828988666 +0200
|
Date: Thu, 21 Feb 2019 10:33:06 +0100
|
||||||
@@ -5641,7 +5641,8 @@ make_client6_options(struct client_state
|
Subject: [PATCH 13/21] DHCPv6 over PPP support (#626514)
|
||||||
|
Cc: pzhukov@redhat.com
|
||||||
|
|
||||||
|
---
|
||||||
|
client/dhc6.c | 3 ++-
|
||||||
|
client/dhclient.c | 17 ++++++++++++++---
|
||||||
|
common/bpf.c | 16 ++++++++++++++++
|
||||||
|
common/lpf.c | 16 ++++++++++++++++
|
||||||
|
includes/dhcp.h | 2 ++
|
||||||
|
includes/dhcpd.h | 2 +-
|
||||||
|
server/dhcpv6.c | 3 +++
|
||||||
|
7 files changed, 54 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/client/dhc6.c b/client/dhc6.c
|
||||||
|
index 16a0838..3171828 100644
|
||||||
|
--- a/client/dhc6.c
|
||||||
|
+++ b/client/dhc6.c
|
||||||
|
@@ -5744,7 +5744,8 @@ make_client6_options(struct client_state *client, struct option_state **op,
|
||||||
*/
|
*/
|
||||||
if ((oc = lookup_option(&dhcpv6_universe, *op,
|
if ((oc = lookup_option(&dhcpv6_universe, *op,
|
||||||
D6O_CLIENTID)) == NULL) {
|
D6O_CLIENTID)) == NULL) {
|
||||||
@ -11,10 +28,11 @@ diff -up dhcp-4.3.4/client/dhc6.c.PPP dhcp-4.3.4/client/dhc6.c
|
|||||||
MDL))
|
MDL))
|
||||||
log_fatal("Failure assembling a DUID.");
|
log_fatal("Failure assembling a DUID.");
|
||||||
|
|
||||||
diff -up dhcp-4.3.4/client/dhclient.c.PPP dhcp-4.3.4/client/dhclient.c
|
diff --git a/client/dhclient.c b/client/dhclient.c
|
||||||
--- dhcp-4.3.4/client/dhclient.c.PPP 2016-04-29 12:46:29.815988664 +0200
|
index 5d3f5bc..301132c 100644
|
||||||
+++ dhcp-4.3.4/client/dhclient.c 2016-04-29 12:46:29.830988666 +0200
|
--- a/client/dhclient.c
|
||||||
@@ -1077,8 +1077,8 @@ main(int argc, char **argv) {
|
+++ b/client/dhclient.c
|
||||||
|
@@ -1202,8 +1202,8 @@ main(int argc, char **argv) {
|
||||||
if (default_duid.buffer != NULL)
|
if (default_duid.buffer != NULL)
|
||||||
data_string_forget(&default_duid, MDL);
|
data_string_forget(&default_duid, MDL);
|
||||||
|
|
||||||
@ -25,7 +43,7 @@ diff -up dhcp-4.3.4/client/dhclient.c.PPP dhcp-4.3.4/client/dhclient.c
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3808,7 +3808,7 @@ write_options(struct client_state *clien
|
@@ -3956,7 +3956,7 @@ write_options(struct client_state *client, struct option_state *options,
|
||||||
* is not how it is intended. Upcoming rearchitecting the client should
|
* is not how it is intended. Upcoming rearchitecting the client should
|
||||||
* address this "one daemon model."
|
* address this "one daemon model."
|
||||||
*/
|
*/
|
||||||
@ -34,7 +52,7 @@ diff -up dhcp-4.3.4/client/dhclient.c.PPP dhcp-4.3.4/client/dhclient.c
|
|||||||
form_duid(struct data_string *duid, const char *file, int line)
|
form_duid(struct data_string *duid, const char *file, int line)
|
||||||
{
|
{
|
||||||
struct interface_info *ip;
|
struct interface_info *ip;
|
||||||
@@ -3821,6 +3821,15 @@ form_duid(struct data_string *duid, cons
|
@@ -3969,6 +3969,15 @@ form_duid(struct data_string *duid, const char *file, int line)
|
||||||
if (ip == NULL)
|
if (ip == NULL)
|
||||||
log_fatal("Impossible condition at %s:%d.", MDL);
|
log_fatal("Impossible condition at %s:%d.", MDL);
|
||||||
|
|
||||||
@ -50,7 +68,7 @@ diff -up dhcp-4.3.4/client/dhclient.c.PPP dhcp-4.3.4/client/dhclient.c
|
|||||||
if ((ip->hw_address.hlen == 0) ||
|
if ((ip->hw_address.hlen == 0) ||
|
||||||
(ip->hw_address.hlen > sizeof(ip->hw_address.hbuf)))
|
(ip->hw_address.hlen > sizeof(ip->hw_address.hbuf)))
|
||||||
log_fatal("Impossible hardware address length at %s:%d.", MDL);
|
log_fatal("Impossible hardware address length at %s:%d.", MDL);
|
||||||
@@ -3866,6 +3875,8 @@ form_duid(struct data_string *duid, cons
|
@@ -4014,6 +4023,8 @@ form_duid(struct data_string *duid, const char *file, int line)
|
||||||
log_info("Created duid %s.", str);
|
log_info("Created duid %s.", str);
|
||||||
dfree(str, MDL);
|
dfree(str, MDL);
|
||||||
}
|
}
|
||||||
@ -59,10 +77,11 @@ diff -up dhcp-4.3.4/client/dhclient.c.PPP dhcp-4.3.4/client/dhclient.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Write the default DUID to the lease store. */
|
/* Write the default DUID to the lease store. */
|
||||||
diff -up dhcp-4.3.4/common/bpf.c.PPP dhcp-4.3.4/common/bpf.c
|
diff --git a/common/bpf.c b/common/bpf.c
|
||||||
--- dhcp-4.3.4/common/bpf.c.PPP 2016-04-29 12:46:29.794988660 +0200
|
index 67b6d64..ffbd09a 100644
|
||||||
+++ dhcp-4.3.4/common/bpf.c 2016-04-29 12:46:29.830988666 +0200
|
--- a/common/bpf.c
|
||||||
@@ -599,6 +599,22 @@ get_hw_addr(const char *name, struct har
|
+++ b/common/bpf.c
|
||||||
|
@@ -650,6 +650,22 @@ get_hw_addr(const char *name, struct hardware *hw) {
|
||||||
memcpy(&hw->hbuf[1], LLADDR(sa), sa->sdl_alen);
|
memcpy(&hw->hbuf[1], LLADDR(sa), sa->sdl_alen);
|
||||||
break;
|
break;
|
||||||
#endif /* IFT_FDDI */
|
#endif /* IFT_FDDI */
|
||||||
@ -85,10 +104,11 @@ diff -up dhcp-4.3.4/common/bpf.c.PPP dhcp-4.3.4/common/bpf.c
|
|||||||
default:
|
default:
|
||||||
log_fatal("Unsupported device type %d for \"%s\"",
|
log_fatal("Unsupported device type %d for \"%s\"",
|
||||||
sa->sdl_type, name);
|
sa->sdl_type, name);
|
||||||
diff -up dhcp-4.3.4/common/lpf.c.PPP dhcp-4.3.4/common/lpf.c
|
diff --git a/common/lpf.c b/common/lpf.c
|
||||||
--- dhcp-4.3.4/common/lpf.c.PPP 2016-03-22 14:16:51.000000000 +0100
|
index 82a279b..b0ed01c 100644
|
||||||
+++ dhcp-4.3.4/common/lpf.c 2016-04-29 12:46:29.830988666 +0200
|
--- a/common/lpf.c
|
||||||
@@ -548,6 +548,22 @@ get_hw_addr(const char *name, struct har
|
+++ b/common/lpf.c
|
||||||
|
@@ -563,6 +563,22 @@ get_hw_addr(const char *name, struct hardware *hw) {
|
||||||
hw->hbuf[0] = HTYPE_FDDI;
|
hw->hbuf[0] = HTYPE_FDDI;
|
||||||
memcpy(&hw->hbuf[1], sa->sa_data, 6);
|
memcpy(&hw->hbuf[1], sa->sa_data, 6);
|
||||||
break;
|
break;
|
||||||
@ -111,22 +131,11 @@ diff -up dhcp-4.3.4/common/lpf.c.PPP dhcp-4.3.4/common/lpf.c
|
|||||||
default:
|
default:
|
||||||
log_fatal("Unsupported device type %ld for \"%s\"",
|
log_fatal("Unsupported device type %ld for \"%s\"",
|
||||||
(long int)sa->sa_family, name);
|
(long int)sa->sa_family, name);
|
||||||
diff -up dhcp-4.3.4/includes/dhcpd.h.PPP dhcp-4.3.4/includes/dhcpd.h
|
diff --git a/includes/dhcp.h b/includes/dhcp.h
|
||||||
--- dhcp-4.3.4/includes/dhcpd.h.PPP 2016-04-29 12:46:29.831988667 +0200
|
index 95bf539..4cc547a 100644
|
||||||
+++ dhcp-4.3.4/includes/dhcpd.h 2016-04-29 12:47:13.167995959 +0200
|
--- a/includes/dhcp.h
|
||||||
@@ -2990,7 +2990,7 @@ void client_dns_remove(struct client_sta
|
+++ b/includes/dhcp.h
|
||||||
|
@@ -80,6 +80,8 @@ struct dhcp_packet {
|
||||||
void dhcpv4_client_assignments(void);
|
|
||||||
void dhcpv6_client_assignments(void);
|
|
||||||
-void form_duid(struct data_string *duid, const char *file, int line);
|
|
||||||
+isc_result_t form_duid(struct data_string *duid, const char *file, int line);
|
|
||||||
|
|
||||||
void dhcp4o6_start(void);
|
|
||||||
|
|
||||||
diff -up dhcp-4.3.4/includes/dhcp.h.PPP dhcp-4.3.4/includes/dhcp.h
|
|
||||||
--- dhcp-4.3.4/includes/dhcp.h.PPP 2016-04-29 12:46:29.822988665 +0200
|
|
||||||
+++ dhcp-4.3.4/includes/dhcp.h 2016-04-29 12:46:29.832988667 +0200
|
|
||||||
@@ -81,6 +81,8 @@ struct dhcp_packet {
|
|
||||||
* is no standard for this so we
|
* is no standard for this so we
|
||||||
* just steal a type */
|
* just steal a type */
|
||||||
|
|
||||||
@ -135,10 +144,24 @@ diff -up dhcp-4.3.4/includes/dhcp.h.PPP dhcp-4.3.4/includes/dhcp.h
|
|||||||
/* Magic cookie validating dhcp options field (and bootp vendor
|
/* Magic cookie validating dhcp options field (and bootp vendor
|
||||||
extensions field). */
|
extensions field). */
|
||||||
#define DHCP_OPTIONS_COOKIE "\143\202\123\143"
|
#define DHCP_OPTIONS_COOKIE "\143\202\123\143"
|
||||||
diff -up dhcp-4.3.4/server/dhcpv6.c.PPP dhcp-4.3.4/server/dhcpv6.c
|
diff --git a/includes/dhcpd.h b/includes/dhcpd.h
|
||||||
--- dhcp-4.3.4/server/dhcpv6.c.PPP 2016-03-22 14:16:51.000000000 +0100
|
index 2ac39ae..faa9251 100644
|
||||||
+++ dhcp-4.3.4/server/dhcpv6.c 2016-04-29 12:46:29.833988667 +0200
|
--- a/includes/dhcpd.h
|
||||||
@@ -454,6 +454,9 @@ generate_new_server_duid(void) {
|
+++ b/includes/dhcpd.h
|
||||||
|
@@ -3051,7 +3051,7 @@ void client_dns_remove(struct client_state *client, struct iaddr *addr);
|
||||||
|
|
||||||
|
void dhcpv4_client_assignments(void);
|
||||||
|
void dhcpv6_client_assignments(void);
|
||||||
|
-void form_duid(struct data_string *duid, const char *file, int line);
|
||||||
|
+isc_result_t form_duid(struct data_string *duid, const char *file, int line);
|
||||||
|
|
||||||
|
void dhcp4o6_start(void);
|
||||||
|
|
||||||
|
diff --git a/server/dhcpv6.c b/server/dhcpv6.c
|
||||||
|
index a7110f9..c5ce7e8 100644
|
||||||
|
--- a/server/dhcpv6.c
|
||||||
|
+++ b/server/dhcpv6.c
|
||||||
|
@@ -482,6 +482,9 @@ generate_new_server_duid(void) {
|
||||||
if (p->hw_address.hlen > 0) {
|
if (p->hw_address.hlen > 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -148,3 +171,6 @@ diff -up dhcp-4.3.4/server/dhcpv6.c.PPP dhcp-4.3.4/server/dhcpv6.c
|
|||||||
}
|
}
|
||||||
if (p == NULL) {
|
if (p == NULL) {
|
||||||
return ISC_R_UNEXPECTED;
|
return ISC_R_UNEXPECTED;
|
||||||
|
--
|
||||||
|
2.14.5
|
||||||
|
|
@ -1,16 +1,33 @@
|
|||||||
diff -up dhcp-4.3.4/client/dhclient.c.lpf-ib dhcp-4.3.4/client/dhclient.c
|
From de8468cf16c0fa9d01412446fcf1d44ccd0fd411 Mon Sep 17 00:00:00 2001
|
||||||
--- dhcp-4.3.4/client/dhclient.c.lpf-ib 2016-05-02 14:37:36.945128001 +0200
|
From: Pavel Zhukov <pzhukov@redhat.com>
|
||||||
+++ dhcp-4.3.4/client/dhclient.c 2016-05-02 14:37:36.952128005 +0200
|
Date: Thu, 21 Feb 2019 10:34:21 +0100
|
||||||
@@ -163,6 +163,8 @@ static const char use_noarg[] = "No argu
|
Subject: [PATCH 14/21] IPoIB support (#660681)
|
||||||
static const char use_v6command[] = "Command not used for DHCPv4: %s";
|
Cc: pzhukov@redhat.com
|
||||||
#endif
|
|
||||||
|
(Submitted to dhcp-bugs@isc.org - [ISC-Bugs #24249])
|
||||||
|
---
|
||||||
|
client/dhclient.c | 32 +++++++
|
||||||
|
common/bpf.c | 32 +++++++
|
||||||
|
common/discover.c | 4 +-
|
||||||
|
common/lpf.c | 262 +++++++++++++++++++++++++++++++++++++++++++++++++-----
|
||||||
|
common/socket.c | 8 +-
|
||||||
|
includes/dhcpd.h | 6 +-
|
||||||
|
6 files changed, 315 insertions(+), 29 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/client/dhclient.c b/client/dhclient.c
|
||||||
|
index 301132c..dc9080e 100644
|
||||||
|
--- a/client/dhclient.c
|
||||||
|
+++ b/client/dhclient.c
|
||||||
|
@@ -205,6 +205,8 @@ static const char use_v6command[] = "Command not used for DHCPv4: %s";
|
||||||
|
|
||||||
|
#define DHCLIENT_USAGEH "{--version|--help|-h}"
|
||||||
|
|
||||||
+static void setup_ib_interface(struct interface_info *ip);
|
+static void setup_ib_interface(struct interface_info *ip);
|
||||||
+
|
+
|
||||||
static void
|
static void
|
||||||
usage(const char *sfmt, const char *sarg)
|
usage(const char *sfmt, const char *sarg)
|
||||||
{
|
{
|
||||||
@@ -1066,6 +1068,13 @@ main(int argc, char **argv) {
|
@@ -1191,6 +1193,13 @@ main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
srandom(seed + cur_time + (unsigned)getpid());
|
srandom(seed + cur_time + (unsigned)getpid());
|
||||||
|
|
||||||
@ -24,7 +41,7 @@ diff -up dhcp-4.3.4/client/dhclient.c.lpf-ib dhcp-4.3.4/client/dhclient.c
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Establish a default DUID. We always do so for v6 and
|
* Establish a default DUID. We always do so for v6 and
|
||||||
@@ -1361,6 +1370,29 @@ int find_subnet (struct subnet **sp,
|
@@ -1486,6 +1495,29 @@ int find_subnet (struct subnet **sp,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,12 +71,13 @@ diff -up dhcp-4.3.4/client/dhclient.c.lpf-ib dhcp-4.3.4/client/dhclient.c
|
|||||||
/* Individual States:
|
/* Individual States:
|
||||||
*
|
*
|
||||||
* Each routine is called from the dhclient_state_machine() in one of
|
* Each routine is called from the dhclient_state_machine() in one of
|
||||||
diff -up dhcp-4.3.4/common/bpf.c.lpf-ib dhcp-4.3.4/common/bpf.c
|
diff --git a/common/bpf.c b/common/bpf.c
|
||||||
--- dhcp-4.3.4/common/bpf.c.lpf-ib 2016-05-02 14:37:36.946128001 +0200
|
index ffbd09a..568e3d9 100644
|
||||||
+++ dhcp-4.3.4/common/bpf.c 2016-05-02 14:37:36.952128005 +0200
|
--- a/common/bpf.c
|
||||||
@@ -198,11 +198,43 @@ struct bpf_insn dhcp_bpf_filter [] = {
|
+++ b/common/bpf.c
|
||||||
BPF_STMT(BPF_RET+BPF_K, 0),
|
@@ -237,11 +237,43 @@ int dhcp_bpf_relay_filter_len =
|
||||||
};
|
sizeof dhcp_bpf_relay_filter / sizeof (struct bpf_insn);
|
||||||
|
#endif
|
||||||
|
|
||||||
+/* Packet filter program for DHCP over Infiniband.
|
+/* Packet filter program for DHCP over Infiniband.
|
||||||
+ *
|
+ *
|
||||||
@ -101,10 +119,11 @@ diff -up dhcp-4.3.4/common/bpf.c.lpf-ib dhcp-4.3.4/common/bpf.c
|
|||||||
#if defined (HAVE_TR_SUPPORT)
|
#if defined (HAVE_TR_SUPPORT)
|
||||||
struct bpf_insn dhcp_bpf_tr_filter [] = {
|
struct bpf_insn dhcp_bpf_tr_filter [] = {
|
||||||
/* accept all token ring packets due to variable length header */
|
/* accept all token ring packets due to variable length header */
|
||||||
diff -up dhcp-4.3.4/common/discover.c.lpf-ib dhcp-4.3.4/common/discover.c
|
diff --git a/common/discover.c b/common/discover.c
|
||||||
--- dhcp-4.3.4/common/discover.c.lpf-ib 2016-03-22 14:16:51.000000000 +0100
|
index 6ef8852..65881fc 100644
|
||||||
+++ dhcp-4.3.4/common/discover.c 2016-05-02 14:38:08.257147982 +0200
|
--- a/common/discover.c
|
||||||
@@ -1235,7 +1235,7 @@ discover_interfaces(int state) {
|
+++ b/common/discover.c
|
||||||
|
@@ -894,7 +894,7 @@ discover_interfaces(int state) {
|
||||||
if_register_send(tmp);
|
if_register_send(tmp);
|
||||||
} else {
|
} else {
|
||||||
/* get_hw_addr() was called by register. */
|
/* get_hw_addr() was called by register. */
|
||||||
@ -113,7 +132,7 @@ diff -up dhcp-4.3.4/common/discover.c.lpf-ib dhcp-4.3.4/common/discover.c
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#ifdef DHCPv6
|
#ifdef DHCPv6
|
||||||
@@ -1248,7 +1248,7 @@ discover_interfaces(int state) {
|
@@ -907,7 +907,7 @@ discover_interfaces(int state) {
|
||||||
so now we have to call it explicitly
|
so now we have to call it explicitly
|
||||||
to not leave the hardware address unknown
|
to not leave the hardware address unknown
|
||||||
(some code expects it cannot be. */
|
(some code expects it cannot be. */
|
||||||
@ -122,10 +141,11 @@ diff -up dhcp-4.3.4/common/discover.c.lpf-ib dhcp-4.3.4/common/discover.c
|
|||||||
} else {
|
} else {
|
||||||
if_register_linklocal6(tmp);
|
if_register_linklocal6(tmp);
|
||||||
}
|
}
|
||||||
diff -up dhcp-4.3.4/common/lpf.c.lpf-ib dhcp-4.3.4/common/lpf.c
|
diff --git a/common/lpf.c b/common/lpf.c
|
||||||
--- dhcp-4.3.4/common/lpf.c.lpf-ib 2016-05-02 14:37:36.947128002 +0200
|
index b0ed01c..b732a86 100644
|
||||||
+++ dhcp-4.3.4/common/lpf.c 2016-05-02 14:37:36.953128006 +0200
|
--- a/common/lpf.c
|
||||||
@@ -47,6 +47,17 @@
|
+++ b/common/lpf.c
|
||||||
|
@@ -45,6 +45,17 @@
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
@ -143,7 +163,7 @@ diff -up dhcp-4.3.4/common/lpf.c.lpf-ib dhcp-4.3.4/common/lpf.c
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined (USE_LPF_SEND) || defined (USE_LPF_RECEIVE)
|
#if defined (USE_LPF_SEND) || defined (USE_LPF_RECEIVE)
|
||||||
@@ -80,10 +91,20 @@ int if_register_lpf (info)
|
@@ -78,10 +89,20 @@ int if_register_lpf (info)
|
||||||
struct sockaddr common;
|
struct sockaddr common;
|
||||||
} sa;
|
} sa;
|
||||||
struct ifreq ifr;
|
struct ifreq ifr;
|
||||||
@ -166,7 +186,7 @@ diff -up dhcp-4.3.4/common/lpf.c.lpf-ib dhcp-4.3.4/common/lpf.c
|
|||||||
if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
|
if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
|
||||||
errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT ||
|
errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT ||
|
||||||
errno == EAFNOSUPPORT || errno == EINVAL) {
|
errno == EAFNOSUPPORT || errno == EINVAL) {
|
||||||
@@ -106,6 +127,7 @@ int if_register_lpf (info)
|
@@ -104,6 +125,7 @@ int if_register_lpf (info)
|
||||||
/* Bind to the interface name */
|
/* Bind to the interface name */
|
||||||
memset (&sa, 0, sizeof sa);
|
memset (&sa, 0, sizeof sa);
|
||||||
sa.ll.sll_family = AF_PACKET;
|
sa.ll.sll_family = AF_PACKET;
|
||||||
@ -174,7 +194,7 @@ diff -up dhcp-4.3.4/common/lpf.c.lpf-ib dhcp-4.3.4/common/lpf.c
|
|||||||
sa.ll.sll_ifindex = ifr.ifr_ifindex;
|
sa.ll.sll_ifindex = ifr.ifr_ifindex;
|
||||||
if (bind (sock, &sa.common, sizeof sa)) {
|
if (bind (sock, &sa.common, sizeof sa)) {
|
||||||
if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
|
if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
|
||||||
@@ -122,8 +144,6 @@ int if_register_lpf (info)
|
@@ -120,8 +142,6 @@ int if_register_lpf (info)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -183,16 +203,16 @@ diff -up dhcp-4.3.4/common/lpf.c.lpf-ib dhcp-4.3.4/common/lpf.c
|
|||||||
return sock;
|
return sock;
|
||||||
}
|
}
|
||||||
#endif /* USE_LPF_SEND || USE_LPF_RECEIVE */
|
#endif /* USE_LPF_SEND || USE_LPF_RECEIVE */
|
||||||
@@ -178,6 +198,8 @@ void if_deregister_send (info)
|
@@ -176,6 +196,8 @@ void if_deregister_send (info)
|
||||||
in bpf includes... */
|
in bpf includes... */
|
||||||
extern struct sock_filter dhcp_bpf_filter [];
|
extern struct sock_filter dhcp_bpf_filter [];
|
||||||
extern int dhcp_bpf_filter_len;
|
extern int dhcp_bpf_filter_len;
|
||||||
+extern struct sock_filter dhcp_ib_bpf_filter [];
|
+extern struct sock_filter dhcp_ib_bpf_filter [];
|
||||||
+extern int dhcp_ib_bpf_filter_len;
|
+extern int dhcp_ib_bpf_filter_len;
|
||||||
|
|
||||||
#if defined (HAVE_TR_SUPPORT)
|
#if defined(RELAY_PORT)
|
||||||
extern struct sock_filter dhcp_bpf_tr_filter [];
|
extern struct sock_filter dhcp_bpf_relay_filter [];
|
||||||
@@ -196,11 +218,12 @@ void if_register_receive (info)
|
@@ -199,11 +221,12 @@ void if_register_receive (info)
|
||||||
#ifdef PACKET_AUXDATA
|
#ifdef PACKET_AUXDATA
|
||||||
{
|
{
|
||||||
int val = 1;
|
int val = 1;
|
||||||
@ -210,45 +230,7 @@ diff -up dhcp-4.3.4/common/lpf.c.lpf-ib dhcp-4.3.4/common/lpf.c
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -250,15 +273,28 @@ static void lpf_gen_filter_setup (info)
|
@@ -330,6 +353,54 @@ static void lpf_tr_filter_setup (info)
|
||||||
|
|
||||||
memset(&p, 0, sizeof(p));
|
|
||||||
|
|
||||||
- /* Set up the bpf filter program structure. This is defined in
|
|
||||||
- bpf.c */
|
|
||||||
- p.len = dhcp_bpf_filter_len;
|
|
||||||
- p.filter = dhcp_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_bpf_filter [8].k = ntohs ((short)local_port);
|
|
||||||
+ if (info->hw_address.hbuf[0] == HTYPE_INFINIBAND) {
|
|
||||||
+ /* Set up the bpf filter program structure. */
|
|
||||||
+ 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 ((short)local_port);
|
|
||||||
+ } else {
|
|
||||||
+ /* Set up the bpf filter program structure.
|
|
||||||
+ This is defined in bpf.c */
|
|
||||||
+ p.len = dhcp_bpf_filter_len;
|
|
||||||
+ p.filter = dhcp_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_bpf_filter [8].k = ntohs ((short)local_port);
|
|
||||||
+ }
|
|
||||||
|
|
||||||
if (setsockopt (info -> rfdesc, SOL_SOCKET, SO_ATTACH_FILTER, &p,
|
|
||||||
sizeof p) < 0) {
|
|
||||||
@@ -315,6 +351,54 @@ static void lpf_tr_filter_setup (info)
|
|
||||||
#endif /* USE_LPF_RECEIVE */
|
#endif /* USE_LPF_RECEIVE */
|
||||||
|
|
||||||
#ifdef USE_LPF_SEND
|
#ifdef USE_LPF_SEND
|
||||||
@ -303,7 +285,7 @@ diff -up dhcp-4.3.4/common/lpf.c.lpf-ib dhcp-4.3.4/common/lpf.c
|
|||||||
ssize_t send_packet (interface, packet, raw, len, from, to, hto)
|
ssize_t send_packet (interface, packet, raw, len, from, to, hto)
|
||||||
struct interface_info *interface;
|
struct interface_info *interface;
|
||||||
struct packet *packet;
|
struct packet *packet;
|
||||||
@@ -335,6 +419,11 @@ ssize_t send_packet (interface, packet,
|
@@ -350,6 +421,11 @@ ssize_t send_packet (interface, packet, raw, len, from, to, hto)
|
||||||
return send_fallback (interface, packet, raw,
|
return send_fallback (interface, packet, raw,
|
||||||
len, from, to, hto);
|
len, from, to, hto);
|
||||||
|
|
||||||
@ -315,7 +297,7 @@ diff -up dhcp-4.3.4/common/lpf.c.lpf-ib dhcp-4.3.4/common/lpf.c
|
|||||||
if (hto == NULL && interface->anycast_mac_addr.hlen)
|
if (hto == NULL && interface->anycast_mac_addr.hlen)
|
||||||
hto = &interface->anycast_mac_addr;
|
hto = &interface->anycast_mac_addr;
|
||||||
|
|
||||||
@@ -355,6 +444,42 @@ ssize_t send_packet (interface, packet,
|
@@ -370,6 +446,42 @@ ssize_t send_packet (interface, packet, raw, len, from, to, hto)
|
||||||
#endif /* USE_LPF_SEND */
|
#endif /* USE_LPF_SEND */
|
||||||
|
|
||||||
#ifdef USE_LPF_RECEIVE
|
#ifdef USE_LPF_RECEIVE
|
||||||
@ -358,7 +340,7 @@ diff -up dhcp-4.3.4/common/lpf.c.lpf-ib dhcp-4.3.4/common/lpf.c
|
|||||||
ssize_t receive_packet (interface, buf, len, from, hfrom)
|
ssize_t receive_packet (interface, buf, len, from, hfrom)
|
||||||
struct interface_info *interface;
|
struct interface_info *interface;
|
||||||
unsigned char *buf;
|
unsigned char *buf;
|
||||||
@@ -393,6 +518,10 @@ ssize_t receive_packet (interface, buf,
|
@@ -408,6 +520,10 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
|
||||||
};
|
};
|
||||||
#endif /* PACKET_AUXDATA */
|
#endif /* PACKET_AUXDATA */
|
||||||
|
|
||||||
@ -369,7 +351,7 @@ diff -up dhcp-4.3.4/common/lpf.c.lpf-ib dhcp-4.3.4/common/lpf.c
|
|||||||
length = recvmsg (interface->rfdesc, &msg, 0);
|
length = recvmsg (interface->rfdesc, &msg, 0);
|
||||||
if (length <= 0)
|
if (length <= 0)
|
||||||
return length;
|
return length;
|
||||||
@@ -506,11 +635,33 @@ void maybe_setup_fallback ()
|
@@ -521,11 +637,33 @@ void maybe_setup_fallback ()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined (USE_LPF_RECEIVE) || defined (USE_LPF_HWADDR)
|
#if defined (USE_LPF_RECEIVE) || defined (USE_LPF_HWADDR)
|
||||||
@ -406,7 +388,7 @@ diff -up dhcp-4.3.4/common/lpf.c.lpf-ib dhcp-4.3.4/common/lpf.c
|
|||||||
|
|
||||||
if (strlen(name) >= sizeof(tmp.ifr_name)) {
|
if (strlen(name) >= sizeof(tmp.ifr_name)) {
|
||||||
log_fatal("Device name too long: \"%s\"", name);
|
log_fatal("Device name too long: \"%s\"", name);
|
||||||
@@ -524,16 +675,61 @@ get_hw_addr(const char *name, struct har
|
@@ -539,16 +677,61 @@ get_hw_addr(const char *name, struct hardware *hw) {
|
||||||
memset(&tmp, 0, sizeof(tmp));
|
memset(&tmp, 0, sizeof(tmp));
|
||||||
strcpy(tmp.ifr_name, name);
|
strcpy(tmp.ifr_name, name);
|
||||||
if (ioctl(sock, SIOCGIFHWADDR, &tmp) < 0) {
|
if (ioctl(sock, SIOCGIFHWADDR, &tmp) < 0) {
|
||||||
@ -471,7 +453,7 @@ diff -up dhcp-4.3.4/common/lpf.c.lpf-ib dhcp-4.3.4/common/lpf.c
|
|||||||
break;
|
break;
|
||||||
case ARPHRD_IEEE802:
|
case ARPHRD_IEEE802:
|
||||||
#ifdef ARPHRD_IEEE802_TR
|
#ifdef ARPHRD_IEEE802_TR
|
||||||
@@ -541,18 +737,50 @@ get_hw_addr(const char *name, struct har
|
@@ -556,18 +739,50 @@ get_hw_addr(const char *name, struct hardware *hw) {
|
||||||
#endif /* ARPHRD_IEEE802_TR */
|
#endif /* ARPHRD_IEEE802_TR */
|
||||||
hw->hlen = 7;
|
hw->hlen = 7;
|
||||||
hw->hbuf[0] = HTYPE_IEEE802;
|
hw->hbuf[0] = HTYPE_IEEE802;
|
||||||
@ -526,7 +508,7 @@ diff -up dhcp-4.3.4/common/lpf.c.lpf-ib dhcp-4.3.4/common/lpf.c
|
|||||||
hw->hlen = 0;
|
hw->hlen = 0;
|
||||||
hw->hbuf[0] = HTYPE_RESERVED;
|
hw->hbuf[0] = HTYPE_RESERVED;
|
||||||
/* 0xdeadbeef should never occur on the wire,
|
/* 0xdeadbeef should never occur on the wire,
|
||||||
@@ -565,10 +793,13 @@ get_hw_addr(const char *name, struct har
|
@@ -580,10 +795,13 @@ get_hw_addr(const char *name, struct hardware *hw) {
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
@ -543,10 +525,11 @@ diff -up dhcp-4.3.4/common/lpf.c.lpf-ib dhcp-4.3.4/common/lpf.c
|
|||||||
+ freeifaddrs(ifaddrs);
|
+ freeifaddrs(ifaddrs);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
diff -up dhcp-4.3.4/common/socket.c.lpf-ib dhcp-4.3.4/common/socket.c
|
diff --git a/common/socket.c b/common/socket.c
|
||||||
--- dhcp-4.3.4/common/socket.c.lpf-ib 2016-03-22 14:16:51.000000000 +0100
|
index 483eb9c..6e1caac 100644
|
||||||
+++ dhcp-4.3.4/common/socket.c 2016-05-02 14:37:36.953128006 +0200
|
--- a/common/socket.c
|
||||||
@@ -328,7 +328,7 @@ void if_register_send (info)
|
+++ b/common/socket.c
|
||||||
|
@@ -350,7 +350,7 @@ void if_register_send (info)
|
||||||
info->wfdesc = if_register_socket(info, AF_INET, 0, NULL);
|
info->wfdesc = if_register_socket(info, AF_INET, 0, NULL);
|
||||||
/* If this is a normal IPv4 address, get the hardware address. */
|
/* If this is a normal IPv4 address, get the hardware address. */
|
||||||
if (strcmp(info->name, "fallback") != 0)
|
if (strcmp(info->name, "fallback") != 0)
|
||||||
@ -555,7 +538,7 @@ diff -up dhcp-4.3.4/common/socket.c.lpf-ib dhcp-4.3.4/common/socket.c
|
|||||||
#if defined (USE_SOCKET_FALLBACK)
|
#if defined (USE_SOCKET_FALLBACK)
|
||||||
/* Fallback only registers for send, but may need to receive as
|
/* Fallback only registers for send, but may need to receive as
|
||||||
well. */
|
well. */
|
||||||
@@ -391,7 +391,7 @@ void if_register_receive (info)
|
@@ -413,7 +413,7 @@ void if_register_receive (info)
|
||||||
#endif /* IP_PKTINFO... */
|
#endif /* IP_PKTINFO... */
|
||||||
/* If this is a normal IPv4 address, get the hardware address. */
|
/* If this is a normal IPv4 address, get the hardware address. */
|
||||||
if (strcmp(info->name, "fallback") != 0)
|
if (strcmp(info->name, "fallback") != 0)
|
||||||
@ -564,7 +547,7 @@ diff -up dhcp-4.3.4/common/socket.c.lpf-ib dhcp-4.3.4/common/socket.c
|
|||||||
|
|
||||||
if (!quiet_interface_discovery)
|
if (!quiet_interface_discovery)
|
||||||
log_info ("Listening on Socket/%s%s%s",
|
log_info ("Listening on Socket/%s%s%s",
|
||||||
@@ -505,7 +505,7 @@ if_register6(struct interface_info *info
|
@@ -567,7 +567,7 @@ if_register6(struct interface_info *info, int do_multicast) {
|
||||||
if (req_multi)
|
if (req_multi)
|
||||||
if_register_multicast(info);
|
if_register_multicast(info);
|
||||||
|
|
||||||
@ -573,7 +556,7 @@ diff -up dhcp-4.3.4/common/socket.c.lpf-ib dhcp-4.3.4/common/socket.c
|
|||||||
|
|
||||||
if (!quiet_interface_discovery) {
|
if (!quiet_interface_discovery) {
|
||||||
if (info->shared_network != NULL) {
|
if (info->shared_network != NULL) {
|
||||||
@@ -561,7 +561,7 @@ if_register_linklocal6(struct interface_
|
@@ -623,7 +623,7 @@ if_register_linklocal6(struct interface_info *info) {
|
||||||
info->rfdesc = sock;
|
info->rfdesc = sock;
|
||||||
info->wfdesc = sock;
|
info->wfdesc = sock;
|
||||||
|
|
||||||
@ -582,10 +565,11 @@ diff -up dhcp-4.3.4/common/socket.c.lpf-ib dhcp-4.3.4/common/socket.c
|
|||||||
|
|
||||||
if (!quiet_interface_discovery) {
|
if (!quiet_interface_discovery) {
|
||||||
if (info->shared_network != NULL) {
|
if (info->shared_network != NULL) {
|
||||||
diff -up dhcp-4.3.4/includes/dhcpd.h.lpf-ib dhcp-4.3.4/includes/dhcpd.h
|
diff --git a/includes/dhcpd.h b/includes/dhcpd.h
|
||||||
--- dhcp-4.3.4/includes/dhcpd.h.lpf-ib 2016-05-02 14:37:36.948128002 +0200
|
index faa9251..0c1a0aa 100644
|
||||||
+++ dhcp-4.3.4/includes/dhcpd.h 2016-05-02 14:37:36.954128006 +0200
|
--- a/includes/dhcpd.h
|
||||||
@@ -482,6 +482,9 @@ struct packet {
|
+++ b/includes/dhcpd.h
|
||||||
|
@@ -485,6 +485,9 @@ struct packet {
|
||||||
|
|
||||||
#define HARDWARE_ADDR_LEN 20
|
#define HARDWARE_ADDR_LEN 20
|
||||||
|
|
||||||
@ -595,7 +579,7 @@ diff -up dhcp-4.3.4/includes/dhcpd.h.lpf-ib dhcp-4.3.4/includes/dhcpd.h
|
|||||||
struct hardware {
|
struct hardware {
|
||||||
u_int8_t hlen;
|
u_int8_t hlen;
|
||||||
u_int8_t hbuf[HARDWARE_ADDR_LEN + 1];
|
u_int8_t hbuf[HARDWARE_ADDR_LEN + 1];
|
||||||
@@ -1343,6 +1346,7 @@ struct interface_info {
|
@@ -1365,6 +1368,7 @@ struct interface_info {
|
||||||
struct shared_network *shared_network;
|
struct shared_network *shared_network;
|
||||||
/* Networks connected to this interface. */
|
/* Networks connected to this interface. */
|
||||||
struct hardware hw_address; /* Its physical address. */
|
struct hardware hw_address; /* Its physical address. */
|
||||||
@ -603,7 +587,7 @@ diff -up dhcp-4.3.4/includes/dhcpd.h.lpf-ib dhcp-4.3.4/includes/dhcpd.h
|
|||||||
struct in_addr *addresses; /* Addresses associated with this
|
struct in_addr *addresses; /* Addresses associated with this
|
||||||
* interface.
|
* interface.
|
||||||
*/
|
*/
|
||||||
@@ -2580,7 +2584,7 @@ void print_dns_status (int, struct dhcp_
|
@@ -2633,7 +2637,7 @@ void print_dns_status (int, struct dhcp_ddns_cb *, isc_result_t);
|
||||||
#endif
|
#endif
|
||||||
const char *print_time(TIME);
|
const char *print_time(TIME);
|
||||||
|
|
||||||
@ -612,3 +596,6 @@ diff -up dhcp-4.3.4/includes/dhcpd.h.lpf-ib dhcp-4.3.4/includes/dhcpd.h
|
|||||||
char *buf_to_hex (const unsigned char *s, unsigned len,
|
char *buf_to_hex (const unsigned char *s, unsigned len,
|
||||||
const char *file, int line);
|
const char *file, int line);
|
||||||
char *format_lease_id(const unsigned char *s, unsigned len, int format,
|
char *format_lease_id(const unsigned char *s, unsigned len, int format,
|
||||||
|
--
|
||||||
|
2.14.5
|
||||||
|
|
332
0015-Add-GUID-DUID-to-dhcpd-logs-1064416.patch
Normal file
332
0015-Add-GUID-DUID-to-dhcpd-logs-1064416.patch
Normal file
@ -0,0 +1,332 @@
|
|||||||
|
From 7ac7d0b00874ee996c7ee75a595c029759368aad 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/21] Add GUID/DUID to dhcpd logs (#1064416)
|
||||||
|
Cc: pzhukov@redhat.com
|
||||||
|
|
||||||
|
---
|
||||||
|
client/dhclient.c | 75 ++++++++++++++++++++++++++++++++++++++++++----------
|
||||||
|
server/dhcp.c | 78 +++++++++++++++++++++++++++++++++----------------------
|
||||||
|
2 files changed, 108 insertions(+), 45 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/client/dhclient.c b/client/dhclient.c
|
||||||
|
index dc9080e..8e57da9 100644
|
||||||
|
--- a/client/dhclient.c
|
||||||
|
+++ b/client/dhclient.c
|
||||||
|
@@ -1170,6 +1170,26 @@ main(int argc, char **argv) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /* We create a backup seed before rediscovering interfaces in order to
|
||||||
|
+ have a seed built using all of the available interfaces
|
||||||
|
+ It's interesting if required interfaces doesn't let us defined
|
||||||
|
+ a really unique seed due to a lack of valid HW addr later
|
||||||
|
+ (this is the case with DHCP over IB)
|
||||||
|
+ We only use the last device as using a sum could broke the
|
||||||
|
+ uniqueness of the seed among multiple nodes
|
||||||
|
+ */
|
||||||
|
+ unsigned backup_seed = 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);
|
||||||
|
+ backup_seed = junk;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+
|
||||||
|
/* 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);
|
||||||
|
+ }
|
||||||
|
+ /* 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());
|
||||||
|
|
||||||
|
/* Setup specific Infiniband options */
|
||||||
|
for (ip = interfaces; ip; ip = ip->next) {
|
||||||
|
@@ -1746,10 +1788,10 @@ void dhcpack (packet)
|
||||||
|
#endif
|
||||||
|
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));
|
||||||
|
|
||||||
|
lease = packet_to_lease (packet, client);
|
||||||
|
if (!lease) {
|
||||||
|
@@ -2669,7 +2711,7 @@ void dhcpnak (packet)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
- log_info ("DHCPNAK from %s", piaddr (packet -> client_addr));
|
||||||
|
+ log_info ("DHCPNAK from %s (xid=0x%x)", piaddr (packet -> client_addr), ntohl(client -> xid));
|
||||||
|
|
||||||
|
if (!client -> active) {
|
||||||
|
#if defined (DEBUG)
|
||||||
|
@@ -2802,10 +2844,10 @@ void send_discover (cpp)
|
||||||
|
(long)(client -> interval));
|
||||||
|
} else
|
||||||
|
#endif
|
||||||
|
- log_info ("DHCPDISCOVER on %s to %s port %d interval %ld",
|
||||||
|
+ log_info ("DHCPDISCOVER on %s to %s port %d interval %ld (xid=0x%x)",
|
||||||
|
client -> name ? client -> name : client -> interface -> name,
|
||||||
|
inet_ntoa (sockaddr_broadcast.sin_addr),
|
||||||
|
- ntohs (sockaddr_broadcast.sin_port), (long)(client -> interval));
|
||||||
|
+ ntohs (sockaddr_broadcast.sin_port), (long)(client -> interval), ntohl(client -> xid));
|
||||||
|
|
||||||
|
/* Send out a packet. */
|
||||||
|
#if defined(DHCPv6) && defined(DHCP4o6)
|
||||||
|
@@ -3108,10 +3150,12 @@ void send_request (cpp)
|
||||||
|
}
|
||||||
|
|
||||||
|
strncpy(rip_buf, rip_str, sizeof(rip_buf)-1);
|
||||||
|
- log_info ("DHCPREQUEST for %s on %s to %s port %d", rip_buf,
|
||||||
|
+ log_info ("DHCPREQUEST for %s on %s to %s port %d (xid=0x%x)",
|
||||||
|
+ rip_buf,
|
||||||
|
client->name ? client->name : client->interface->name,
|
||||||
|
inet_ntoa(destination.sin_addr),
|
||||||
|
- ntohs (destination.sin_port));
|
||||||
|
+ ntohs (destination.sin_port),
|
||||||
|
+ ntohl(client -> xid));
|
||||||
|
|
||||||
|
#if defined(DHCPv6) && defined(DHCP4o6)
|
||||||
|
if (dhcpv4_over_dhcpv6) {
|
||||||
|
@@ -3168,11 +3212,13 @@ void send_decline (cpp)
|
||||||
|
log_info ("DHCPDECLINE");
|
||||||
|
} else
|
||||||
|
#endif
|
||||||
|
- log_info ("DHCPDECLINE of %s on %s to %s port %d",
|
||||||
|
+ log_info ("DHCPDECLINE of %s on %s to %s port %d (xid=0x%x)",
|
||||||
|
piaddr(client->requested_address),
|
||||||
|
(client->name ? client->name : client->interface->name),
|
||||||
|
inet_ntoa(sockaddr_broadcast.sin_addr),
|
||||||
|
- ntohs(sockaddr_broadcast.sin_port));
|
||||||
|
+ ntohs(sockaddr_broadcast.sin_port),
|
||||||
|
+ ntohl(client -> xid));
|
||||||
|
+
|
||||||
|
|
||||||
|
/* Send out a packet. */
|
||||||
|
#if defined(DHCPv6) && defined(DHCP4o6)
|
||||||
|
@@ -3231,11 +3277,12 @@ void send_release (cpp)
|
||||||
|
log_info ("DHCPRELEASE");
|
||||||
|
} else
|
||||||
|
#endif
|
||||||
|
- log_info ("DHCPRELEASE of %s on %s to %s port %d",
|
||||||
|
+ log_info ("DHCPRELEASE of %s on %s to %s port %d (xid=0x%x)",
|
||||||
|
piaddr(client->active->address),
|
||||||
|
client->name ? client->name : client->interface->name,
|
||||||
|
inet_ntoa (destination.sin_addr),
|
||||||
|
- ntohs (destination.sin_port));
|
||||||
|
+ ntohs (destination.sin_port),
|
||||||
|
+ ntohl(client -> xid));
|
||||||
|
|
||||||
|
#if defined(DHCPv6) && defined(DHCP4o6)
|
||||||
|
if (dhcpv4_over_dhcpv6) {
|
||||||
|
diff --git a/server/dhcp.c b/server/dhcp.c
|
||||||
|
index 20f2a62..0582c4c 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 *));
|
||||||
|
|
||||||
|
static TIME leaseTimeCheck(TIME calculated, TIME alternate);
|
||||||
|
|
||||||
|
+char *print_client_identifier_from_packet (packet)
|
||||||
|
+ struct packet *packet;
|
||||||
|
+{
|
||||||
|
+ struct option_cache *oc;
|
||||||
|
+ struct data_string client_identifier;
|
||||||
|
+ char *ci;
|
||||||
|
+
|
||||||
|
+ memset (&client_identifier, 0, sizeof client_identifier);
|
||||||
|
+
|
||||||
|
+ oc = lookup_option (&dhcp_universe, packet -> options,
|
||||||
|
+ DHO_DHCP_CLIENT_IDENTIFIER);
|
||||||
|
+ if (oc &&
|
||||||
|
+ evaluate_option_cache (&client_identifier,
|
||||||
|
+ packet, (struct lease *)0,
|
||||||
|
+ (struct client_state *)0,
|
||||||
|
+ packet -> options,
|
||||||
|
+ (struct option_state *)0,
|
||||||
|
+ &global_scope, oc, MDL)) {
|
||||||
|
+ ci = print_hw_addr (HTYPE_INFINIBAND, client_identifier.len, client_identifier.data);
|
||||||
|
+ data_string_forget (&client_identifier, MDL);
|
||||||
|
+ return ci;
|
||||||
|
+ } else
|
||||||
|
+ return "\"no client id\"";
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+char *print_hw_addr_or_client_id (packet)
|
||||||
|
+ struct packet *packet;
|
||||||
|
+{
|
||||||
|
+ if (packet -> raw -> htype == HTYPE_INFINIBAND)
|
||||||
|
+ return print_client_identifier_from_packet (packet);
|
||||||
|
+ else
|
||||||
|
+ return print_hw_addr (packet -> raw -> htype,
|
||||||
|
+ packet -> raw -> hlen,
|
||||||
|
+ packet -> raw -> chaddr);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
void
|
||||||
|
dhcp (struct packet *packet) {
|
||||||
|
int ms_nulltp = 0;
|
||||||
|
@@ -129,9 +165,7 @@ dhcp (struct packet *packet) {
|
||||||
|
|
||||||
|
log_info("%s from %s via %s: %s", s,
|
||||||
|
(packet->raw->htype
|
||||||
|
- ? print_hw_addr(packet->raw->htype,
|
||||||
|
- packet->raw->hlen,
|
||||||
|
- packet->raw->chaddr)
|
||||||
|
+ ? print_hw_addr_or_client_id(packet)
|
||||||
|
: "<no identifier>"),
|
||||||
|
packet->raw->giaddr.s_addr
|
||||||
|
? inet_ntoa(packet->raw->giaddr)
|
||||||
|
@@ -328,9 +362,7 @@ void dhcpdiscover (packet, ms_nulltp)
|
||||||
|
#endif
|
||||||
|
snprintf (msgbuf, sizeof msgbuf, "DHCPDISCOVER from %s %s%s%svia %s",
|
||||||
|
(packet -> raw -> htype
|
||||||
|
- ? print_hw_addr (packet -> raw -> htype,
|
||||||
|
- packet -> raw -> hlen,
|
||||||
|
- packet -> raw -> chaddr)
|
||||||
|
+ ? print_hw_addr_or_client_id (packet)
|
||||||
|
: (lease
|
||||||
|
? print_hex_1(lease->uid_len, lease->uid, 60)
|
||||||
|
: "<no identifier>")),
|
||||||
|
@@ -542,9 +574,7 @@ void dhcprequest (packet, ms_nulltp, ip_lease)
|
||||||
|
"DHCPREQUEST for %s%s from %s %s%s%svia %s",
|
||||||
|
piaddr (cip), smbuf,
|
||||||
|
(packet -> raw -> htype
|
||||||
|
- ? print_hw_addr (packet -> raw -> htype,
|
||||||
|
- packet -> raw -> hlen,
|
||||||
|
- packet -> raw -> chaddr)
|
||||||
|
+ ? print_hw_addr_or_client_id(packet)
|
||||||
|
: (lease
|
||||||
|
? print_hex_1(lease->uid_len, lease->uid, 60)
|
||||||
|
: "<no identifier>")),
|
||||||
|
@@ -785,9 +815,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.",
|
||||||
|
- print_hw_addr (packet -> raw -> htype,
|
||||||
|
- packet -> raw -> hlen,
|
||||||
|
- packet -> raw -> chaddr));
|
||||||
|
+ print_hw_addr_or_client_id(packet));
|
||||||
|
}
|
||||||
|
|
||||||
|
oc = lookup_option (&dhcp_universe, packet -> options,
|
||||||
|
@@ -879,9 +907,7 @@ void dhcprelease (packet, ms_nulltp)
|
||||||
|
"DHCPRELEASE of %s from %s %s%s%svia %s (%sfound)",
|
||||||
|
cstr,
|
||||||
|
(packet -> raw -> htype
|
||||||
|
- ? print_hw_addr (packet -> raw -> htype,
|
||||||
|
- packet -> raw -> hlen,
|
||||||
|
- packet -> raw -> chaddr)
|
||||||
|
+ ? print_hw_addr_or_client_id(packet)
|
||||||
|
: (lease
|
||||||
|
? print_hex_1(lease->uid_len, lease->uid, 60)
|
||||||
|
: "<no identifier>")),
|
||||||
|
@@ -986,9 +1012,7 @@ void dhcpdecline (packet, ms_nulltp)
|
||||||
|
"DHCPDECLINE of %s from %s %s%s%svia %s",
|
||||||
|
piaddr (cip),
|
||||||
|
(packet -> raw -> htype
|
||||||
|
- ? print_hw_addr (packet -> raw -> htype,
|
||||||
|
- packet -> raw -> hlen,
|
||||||
|
- packet -> raw -> chaddr)
|
||||||
|
+ ? print_hw_addr_or_client_id(packet)
|
||||||
|
: (lease
|
||||||
|
? print_hex_1(lease->uid_len, lease->uid, 60)
|
||||||
|
: "<no identifier>")),
|
||||||
|
@@ -1732,8 +1756,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) ?
|
||||||
|
- print_hw_addr(packet->raw->htype, packet->raw->hlen,
|
||||||
|
- packet->raw->chaddr) :
|
||||||
|
+ print_hw_addr_or_client_id(packet) :
|
||||||
|
"<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)
|
||||||
|
#endif
|
||||||
|
log_info ("DHCPNAK on %s to %s via %s",
|
||||||
|
piaddr (*cip),
|
||||||
|
- print_hw_addr (packet -> raw -> htype,
|
||||||
|
- packet -> raw -> hlen,
|
||||||
|
- packet -> raw -> chaddr),
|
||||||
|
+ print_hw_addr_or_client_id(packet),
|
||||||
|
packet -> raw -> giaddr.s_addr
|
||||||
|
? inet_ntoa (packet -> raw -> giaddr)
|
||||||
|
: packet -> interface -> name);
|
||||||
|
@@ -3936,7 +3957,7 @@ void dhcp_reply (lease)
|
||||||
|
? (state -> offer == DHCPACK ? "DHCPACK" : "DHCPOFFER")
|
||||||
|
: "BOOTREPLY"),
|
||||||
|
piaddr (lease -> ip_addr),
|
||||||
|
- (lease -> hardware_addr.hlen
|
||||||
|
+ (lease -> hardware_addr.hlen > 1
|
||||||
|
? 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,
|
||||||
|
if (uid_lease) {
|
||||||
|
if (uid_lease->binding_state == FTS_ACTIVE) {
|
||||||
|
log_error ("client %s has duplicate%s on %s",
|
||||||
|
- (print_hw_addr
|
||||||
|
- (packet -> raw -> htype,
|
||||||
|
- packet -> raw -> hlen,
|
||||||
|
- packet -> raw -> chaddr)),
|
||||||
|
+ (print_hw_addr_or_client_id(packet)),
|
||||||
|
" leases",
|
||||||
|
(ip_lease -> subnet ->
|
||||||
|
shared_network -> name));
|
||||||
|
@@ -4667,9 +4685,7 @@ int find_lease (struct lease **lp,
|
||||||
|
log_error("uid lease %s for client %s is duplicate "
|
||||||
|
"on %s",
|
||||||
|
piaddr(uid_lease->ip_addr),
|
||||||
|
- print_hw_addr(packet->raw->htype,
|
||||||
|
- packet->raw->hlen,
|
||||||
|
- packet->raw->chaddr),
|
||||||
|
+ print_hw_addr_or_client_id(packet),
|
||||||
|
uid_lease->subnet->shared_network->name);
|
||||||
|
|
||||||
|
if (!packet -> raw -> ciaddr.s_addr &&
|
||||||
|
--
|
||||||
|
2.14.5
|
||||||
|
|
@ -1,7 +1,19 @@
|
|||||||
diff -up dhcp-4.3.4/client/dhclient.c.duid_uuid dhcp-4.3.4/client/dhclient.c
|
From 1f0473939bcb17095bbef48cd9a81105a3de9846 Mon Sep 17 00:00:00 2001
|
||||||
--- dhcp-4.3.4/client/dhclient.c.duid_uuid 2016-04-29 12:58:14.846150838 +0200
|
From: Pavel Zhukov <pzhukov@redhat.com>
|
||||||
+++ dhcp-4.3.4/client/dhclient.c 2016-04-29 12:58:14.851150839 +0200
|
Date: Thu, 21 Feb 2019 10:36:30 +0100
|
||||||
@@ -3868,6 +3868,59 @@ write_options(struct client_state *clien
|
Subject: [PATCH 16/21] Turn on creating/sending of DUID
|
||||||
|
Cc: pzhukov@redhat.com
|
||||||
|
|
||||||
|
as client identifier with DHCPv4 clients (#560361c#40, rfc4361)
|
||||||
|
---
|
||||||
|
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
|
||||||
|
--- a/client/dhclient.c
|
||||||
|
+++ b/client/dhclient.c
|
||||||
|
@@ -4021,6 +4021,59 @@ write_options(struct client_state *client, struct option_state *options,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,7 +73,7 @@ diff -up dhcp-4.3.4/client/dhclient.c.duid_uuid dhcp-4.3.4/client/dhclient.c
|
|||||||
/*
|
/*
|
||||||
* The "best" default DUID, since we cannot predict any information
|
* The "best" default DUID, since we cannot predict any information
|
||||||
* about the system (such as whether or not the hardware addresses are
|
* about the system (such as whether or not the hardware addresses are
|
||||||
@@ -3888,6 +3941,7 @@ form_duid(struct data_string *duid, cons
|
@@ -4041,6 +4094,7 @@ form_duid(struct data_string *duid, const char *file, int line)
|
||||||
struct interface_info *ip;
|
struct interface_info *ip;
|
||||||
int len;
|
int len;
|
||||||
char *str;
|
char *str;
|
||||||
@ -69,7 +81,7 @@ diff -up dhcp-4.3.4/client/dhclient.c.duid_uuid dhcp-4.3.4/client/dhclient.c
|
|||||||
|
|
||||||
/* For now, just use the first interface on the list. */
|
/* For now, just use the first interface on the list. */
|
||||||
ip = interfaces;
|
ip = interfaces;
|
||||||
@@ -3908,9 +3962,16 @@ form_duid(struct data_string *duid, cons
|
@@ -4061,9 +4115,16 @@ form_duid(struct data_string *duid, const char *file, int line)
|
||||||
(ip->hw_address.hlen > sizeof(ip->hw_address.hbuf)))
|
(ip->hw_address.hlen > sizeof(ip->hw_address.hbuf)))
|
||||||
log_fatal("Impossible hardware address length at %s:%d.", MDL);
|
log_fatal("Impossible hardware address length at %s:%d.", MDL);
|
||||||
|
|
||||||
@ -89,7 +101,7 @@ diff -up dhcp-4.3.4/client/dhclient.c.duid_uuid dhcp-4.3.4/client/dhclient.c
|
|||||||
/*
|
/*
|
||||||
* 2 bytes for the 'duid type' field.
|
* 2 bytes for the 'duid type' field.
|
||||||
* 2 bytes for the 'htype' field.
|
* 2 bytes for the 'htype' field.
|
||||||
@@ -3921,13 +3982,18 @@ form_duid(struct data_string *duid, cons
|
@@ -4074,13 +4135,18 @@ form_duid(struct data_string *duid, const char *file, int line)
|
||||||
len = 4 + (ip->hw_address.hlen - 1);
|
len = 4 + (ip->hw_address.hlen - 1);
|
||||||
if (duid_type == DUID_LLT)
|
if (duid_type == DUID_LLT)
|
||||||
len += 4;
|
len += 4;
|
||||||
@ -109,3 +121,6 @@ diff -up dhcp-4.3.4/client/dhclient.c.duid_uuid dhcp-4.3.4/client/dhclient.c
|
|||||||
putUShort(duid->buffer->data, DUID_LLT);
|
putUShort(duid->buffer->data, DUID_LLT);
|
||||||
putUShort(duid->buffer->data + 2, ip->hw_address.hbuf[0]);
|
putUShort(duid->buffer->data + 2, ip->hw_address.hbuf[0]);
|
||||||
putULong(duid->buffer->data + 4, cur_time - DUID_TIME_EPOCH);
|
putULong(duid->buffer->data + 4, cur_time - DUID_TIME_EPOCH);
|
||||||
|
--
|
||||||
|
2.14.5
|
||||||
|
|
@ -1,7 +1,20 @@
|
|||||||
diff -up dhcp-4.3.4/client/dhclient.c.bind-iface dhcp-4.3.4/client/dhclient.c
|
From 8a2b491f79aab1f04feac89586dfab1e55b47adb Mon Sep 17 00:00:00 2001
|
||||||
--- dhcp-4.3.4/client/dhclient.c.bind-iface 2016-04-29 13:06:50.595257108 +0200
|
From: Pavel Zhukov <pzhukov@redhat.com>
|
||||||
+++ dhcp-4.3.4/client/dhclient.c 2016-04-29 13:08:30.237281528 +0200
|
Date: Thu, 21 Feb 2019 10:39:36 +0100
|
||||||
@@ -3023,6 +3023,14 @@ void send_request (cpp)
|
Subject: [PATCH 17/21] Send unicast request/release via correct interface
|
||||||
|
Cc: pzhukov@redhat.com
|
||||||
|
|
||||||
|
(#800561, #1177351)
|
||||||
|
(Submitted to dhcp-bugs@isc.org - [ISC-Bugs #30544])
|
||||||
|
---
|
||||||
|
client/dhclient.c | 30 ++++++++++++++++++++++++++++++
|
||||||
|
1 file changed, 30 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/client/dhclient.c b/client/dhclient.c
|
||||||
|
index ccc98e4..27fde69 100644
|
||||||
|
--- a/client/dhclient.c
|
||||||
|
+++ b/client/dhclient.c
|
||||||
|
@@ -3171,6 +3171,14 @@ void send_request (cpp)
|
||||||
#endif
|
#endif
|
||||||
if (destination.sin_addr.s_addr != INADDR_BROADCAST &&
|
if (destination.sin_addr.s_addr != INADDR_BROADCAST &&
|
||||||
fallback_interface) {
|
fallback_interface) {
|
||||||
@ -16,7 +29,7 @@ diff -up dhcp-4.3.4/client/dhclient.c.bind-iface dhcp-4.3.4/client/dhclient.c
|
|||||||
result = send_packet(fallback_interface, NULL, &client->packet,
|
result = send_packet(fallback_interface, NULL, &client->packet,
|
||||||
client->packet_length, from, &destination,
|
client->packet_length, from, &destination,
|
||||||
NULL);
|
NULL);
|
||||||
@@ -3032,6 +3040,13 @@ void send_request (cpp)
|
@@ -3180,6 +3188,13 @@ void send_request (cpp)
|
||||||
client->packet_length,
|
client->packet_length,
|
||||||
fallback_interface->name);
|
fallback_interface->name);
|
||||||
}
|
}
|
||||||
@ -30,7 +43,7 @@ diff -up dhcp-4.3.4/client/dhclient.c.bind-iface dhcp-4.3.4/client/dhclient.c
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* Send out a packet. */
|
/* Send out a packet. */
|
||||||
@@ -3144,6 +3159,14 @@ void send_release (cpp)
|
@@ -3297,6 +3312,14 @@ void send_release (cpp)
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
if (fallback_interface) {
|
if (fallback_interface) {
|
||||||
@ -45,7 +58,7 @@ diff -up dhcp-4.3.4/client/dhclient.c.bind-iface dhcp-4.3.4/client/dhclient.c
|
|||||||
result = send_packet(fallback_interface, NULL, &client->packet,
|
result = send_packet(fallback_interface, NULL, &client->packet,
|
||||||
client->packet_length, from, &destination,
|
client->packet_length, from, &destination,
|
||||||
NULL);
|
NULL);
|
||||||
@@ -3153,6 +3176,13 @@ void send_release (cpp)
|
@@ -3306,6 +3329,13 @@ void send_release (cpp)
|
||||||
client->packet_length,
|
client->packet_length,
|
||||||
fallback_interface->name);
|
fallback_interface->name);
|
||||||
}
|
}
|
||||||
@ -59,3 +72,6 @@ diff -up dhcp-4.3.4/client/dhclient.c.bind-iface dhcp-4.3.4/client/dhclient.c
|
|||||||
} else {
|
} else {
|
||||||
/* Send out a packet. */
|
/* Send out a packet. */
|
||||||
result = send_packet(client->interface, NULL, &client->packet,
|
result = send_packet(client->interface, NULL, &client->packet,
|
||||||
|
--
|
||||||
|
2.14.5
|
||||||
|
|
@ -1,7 +1,19 @@
|
|||||||
diff -up dhcp-4.3.0a1/common/discover.c.error2info dhcp-4.3.0a1/common/discover.c
|
From 588ead2d9a9cfe70f14569a8e950c6c42f15c1e3 Mon Sep 17 00:00:00 2001
|
||||||
--- dhcp-4.3.0a1/common/discover.c.error2info 2013-12-20 13:59:15.148553898 +0100
|
From: Pavel Zhukov <pzhukov@redhat.com>
|
||||||
+++ dhcp-4.3.0a1/common/discover.c 2013-12-20 13:59:15.181553438 +0100
|
Date: Thu, 21 Feb 2019 10:40:51 +0100
|
||||||
@@ -779,9 +779,9 @@ discover_interfaces(int state) {
|
Subject: [PATCH 18/21] 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
|
||||||
|
--- a/common/discover.c
|
||||||
|
+++ b/common/discover.c
|
||||||
|
@@ -801,9 +801,9 @@ discover_interfaces(int state) {
|
||||||
|
|
||||||
/* We must have a subnet declaration for each interface. */
|
/* We must have a subnet declaration for each interface. */
|
||||||
if (!tmp->shared_network && (state == DISCOVER_SERVER)) {
|
if (!tmp->shared_network && (state == DISCOVER_SERVER)) {
|
||||||
@ -13,7 +25,7 @@ diff -up dhcp-4.3.0a1/common/discover.c.error2info dhcp-4.3.0a1/common/discover.
|
|||||||
tmp->name,
|
tmp->name,
|
||||||
(tmp->addresses == NULL) ?
|
(tmp->addresses == NULL) ?
|
||||||
"no IPv4 addresses" :
|
"no IPv4 addresses" :
|
||||||
@@ -796,26 +796,26 @@ discover_interfaces(int state) {
|
@@ -818,26 +818,26 @@ discover_interfaces(int state) {
|
||||||
} else {
|
} else {
|
||||||
strcpy(abuf, "no IPv6 addresses");
|
strcpy(abuf, "no IPv6 addresses");
|
||||||
}
|
}
|
||||||
@ -46,3 +58,6 @@ diff -up dhcp-4.3.0a1/common/discover.c.error2info dhcp-4.3.0a1/common/discover.
|
|||||||
goto next;
|
goto next;
|
||||||
} else {
|
} else {
|
||||||
log_error ("You must write a %s",
|
log_error ("You must write a %s",
|
||||||
|
--
|
||||||
|
2.14.5
|
||||||
|
|
@ -0,0 +1,29 @@
|
|||||||
|
From 07b333c48a2fc99d7d502a0c88907b38f61c6230 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/21] dhclient: write DUID_LLT even in stateless mode
|
||||||
|
(#1156356)
|
||||||
|
Cc: pzhukov@redhat.com
|
||||||
|
|
||||||
|
(Submitted to dhcp-bugs@isc.org - [ISC-Bugs #38144])
|
||||||
|
---
|
||||||
|
client/dhclient.c | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/client/dhclient.c b/client/dhclient.c
|
||||||
|
index 27fde69..4e5546a 100644
|
||||||
|
--- a/client/dhclient.c
|
||||||
|
+++ b/client/dhclient.c
|
||||||
|
@@ -1442,6 +1442,9 @@ void run_stateless(int exit_mode, u_int16_t port)
|
||||||
|
data_string_forget(&default_duid, MDL);
|
||||||
|
|
||||||
|
form_duid(&default_duid, MDL);
|
||||||
|
+ if (form_duid(&default_duid, MDL) == ISC_R_SUCCESS &&
|
||||||
|
+ duid_type == DUID_LLT)
|
||||||
|
+ write_duid(&default_duid);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef DHCP4o6
|
||||||
|
--
|
||||||
|
2.14.5
|
||||||
|
|
@ -1,8 +1,20 @@
|
|||||||
|
From f1467835402eee90a350a952f1a411f37475a9df 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/21] Discover all hwaddress for xid uniqueness
|
||||||
|
Cc: pzhukov@redhat.com
|
||||||
|
|
||||||
|
---
|
||||||
|
common/discover.c | 2 ++
|
||||||
|
common/lpf.c | 27 ++++++++++++++++++++++-----
|
||||||
|
includes/dhcpd.h | 3 +++
|
||||||
|
3 files changed, 27 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
diff --git a/common/discover.c b/common/discover.c
|
diff --git a/common/discover.c b/common/discover.c
|
||||||
index 26a78ca..ed01e45 100644
|
index 056342c..e66e1c5 100644
|
||||||
--- a/common/discover.c
|
--- a/common/discover.c
|
||||||
+++ b/common/discover.c
|
+++ b/common/discover.c
|
||||||
@@ -635,6 +635,8 @@ discover_interfaces(int state) {
|
@@ -648,6 +648,8 @@ discover_interfaces(int state) {
|
||||||
interface_dereference(&tmp, MDL);
|
interface_dereference(&tmp, MDL);
|
||||||
tmp = interfaces; /* XXX */
|
tmp = interfaces; /* XXX */
|
||||||
}
|
}
|
||||||
@ -12,10 +24,10 @@ index 26a78ca..ed01e45 100644
|
|||||||
if (dhcp_interface_discovery_hook) {
|
if (dhcp_interface_discovery_hook) {
|
||||||
(*dhcp_interface_discovery_hook)(tmp);
|
(*dhcp_interface_discovery_hook)(tmp);
|
||||||
diff --git a/common/lpf.c b/common/lpf.c
|
diff --git a/common/lpf.c b/common/lpf.c
|
||||||
index 4a252ca..467b055 100644
|
index b732a86..a708a5d 100644
|
||||||
--- a/common/lpf.c
|
--- a/common/lpf.c
|
||||||
+++ b/common/lpf.c
|
+++ b/common/lpf.c
|
||||||
@@ -697,8 +697,22 @@ ioctl_get_ll(char *name)
|
@@ -699,8 +699,22 @@ ioctl_get_ll(char *name)
|
||||||
return sll;
|
return sll;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,7 +50,7 @@ index 4a252ca..467b055 100644
|
|||||||
{
|
{
|
||||||
struct hardware *hw = &info->hw_address;
|
struct hardware *hw = &info->hw_address;
|
||||||
char *name = info->name;
|
char *name = info->name;
|
||||||
@@ -708,7 +722,8 @@ get_hw_addr(struct interface_info *info)
|
@@ -710,7 +724,8 @@ get_hw_addr(struct interface_info *info)
|
||||||
int sll_allocated = 0;
|
int sll_allocated = 0;
|
||||||
char *dup = NULL;
|
char *dup = NULL;
|
||||||
char *colon = NULL;
|
char *colon = NULL;
|
||||||
@ -48,7 +60,7 @@ index 4a252ca..467b055 100644
|
|||||||
if (getifaddrs(&ifaddrs) == -1)
|
if (getifaddrs(&ifaddrs) == -1)
|
||||||
log_fatal("Failed to get interfaces");
|
log_fatal("Failed to get interfaces");
|
||||||
|
|
||||||
@@ -792,14 +807,16 @@ get_hw_addr(struct interface_info *info)
|
@@ -794,14 +809,16 @@ get_hw_addr(struct interface_info *info)
|
||||||
hw->hbuf[4] = 0xef;
|
hw->hbuf[4] = 0xef;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
@ -70,10 +82,10 @@ index 4a252ca..467b055 100644
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
diff --git a/includes/dhcpd.h b/includes/dhcpd.h
|
diff --git a/includes/dhcpd.h b/includes/dhcpd.h
|
||||||
index d534f8c..66a21fb 100644
|
index 0c1a0aa..635c510 100644
|
||||||
--- a/includes/dhcpd.h
|
--- a/includes/dhcpd.h
|
||||||
+++ b/includes/dhcpd.h
|
+++ b/includes/dhcpd.h
|
||||||
@@ -2591,7 +2591,10 @@ void print_dns_status (int, struct dhcp_ddns_cb *, isc_result_t);
|
@@ -2637,7 +2637,10 @@ void print_dns_status (int, struct dhcp_ddns_cb *, isc_result_t);
|
||||||
#endif
|
#endif
|
||||||
const char *print_time(TIME);
|
const char *print_time(TIME);
|
||||||
|
|
||||||
@ -84,3 +96,6 @@ index d534f8c..66a21fb 100644
|
|||||||
char *buf_to_hex (const unsigned char *s, unsigned len,
|
char *buf_to_hex (const unsigned char *s, unsigned len,
|
||||||
const char *file, int line);
|
const char *file, int line);
|
||||||
char *format_lease_id(const unsigned char *s, unsigned len, int format,
|
char *format_lease_id(const unsigned char *s, unsigned len, int format,
|
||||||
|
--
|
||||||
|
2.14.5
|
||||||
|
|
@ -1,5 +1,15 @@
|
|||||||
|
From 1c7b876dc558774c40a2a28da53c19c65e123124 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/21] Load leases DB in non-replay mode only
|
||||||
|
Cc: pzhukov@redhat.com
|
||||||
|
|
||||||
|
---
|
||||||
|
server/confpars.c | 10 +++++++---
|
||||||
|
1 file changed, 7 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
diff --git a/server/confpars.c b/server/confpars.c
|
diff --git a/server/confpars.c b/server/confpars.c
|
||||||
index d79489b..c20d618 100644
|
index 2743979..db21a0b 100644
|
||||||
--- a/server/confpars.c
|
--- a/server/confpars.c
|
||||||
+++ b/server/confpars.c
|
+++ b/server/confpars.c
|
||||||
@@ -134,6 +134,11 @@ isc_result_t read_conf_file (const char *filename, struct group *group,
|
@@ -134,6 +134,11 @@ isc_result_t read_conf_file (const char *filename, struct group *group,
|
||||||
@ -14,19 +24,7 @@ index d79489b..c20d618 100644
|
|||||||
flen = lseek (file, (off_t)0, SEEK_END);
|
flen = lseek (file, (off_t)0, SEEK_END);
|
||||||
if (flen < 0) {
|
if (flen < 0) {
|
||||||
boom:
|
boom:
|
||||||
@@ -174,6 +179,7 @@ isc_result_t read_conf_file (const char *filename, struct group *group,
|
@@ -171,9 +176,11 @@ isc_result_t read_conf_file (const char *filename, struct group *group,
|
||||||
#else
|
|
||||||
status = new_parse(&cfile, file, NULL, 0, filename, 0);
|
|
||||||
#endif
|
|
||||||
+ noreplay:
|
|
||||||
if (status != ISC_R_SUCCESS || cfile == NULL)
|
|
||||||
return status;
|
|
||||||
|
|
||||||
diff --git a/server/confpars.c b/server/confpars.c
|
|
||||||
index 3aecd05..5be4ab1 100644
|
|
||||||
--- a/server/confpars.c
|
|
||||||
+++ b/server/confpars.c
|
|
||||||
@@ -176,6 +176,7 @@ isc_result_t read_conf_file (const char *filename, struct group *group,
|
|
||||||
if (trace_record ())
|
if (trace_record ())
|
||||||
trace_write_packet (ttype, ulen + tflen + 1, dbuf, MDL);
|
trace_write_packet (ttype, ulen + tflen + 1, dbuf, MDL);
|
||||||
status = new_parse(&cfile, -1, fbuf, ulen, filename, 0); /* XXX */
|
status = new_parse(&cfile, -1, fbuf, ulen, filename, 0); /* XXX */
|
||||||
@ -34,7 +32,11 @@ index 3aecd05..5be4ab1 100644
|
|||||||
#else
|
#else
|
||||||
status = new_parse(&cfile, file, NULL, 0, filename, 0);
|
status = new_parse(&cfile, file, NULL, 0, filename, 0);
|
||||||
#endif
|
#endif
|
||||||
@@ -188,9 +189,6 @@ isc_result_t read_conf_file (const char *filename, struct group *group,
|
+ noreplay:
|
||||||
|
if (status != ISC_R_SUCCESS || cfile == NULL)
|
||||||
|
return status;
|
||||||
|
|
||||||
|
@@ -182,9 +189,6 @@ isc_result_t read_conf_file (const char *filename, struct group *group,
|
||||||
else
|
else
|
||||||
status = conf_file_subparse (cfile, group, group_type);
|
status = conf_file_subparse (cfile, group, group_type);
|
||||||
end_parse (&cfile);
|
end_parse (&cfile);
|
||||||
@ -44,3 +46,6 @@ index 3aecd05..5be4ab1 100644
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.14.5
|
||||||
|
|
4
12-dhcpd
4
12-dhcpd
@ -1,5 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
## this script is disabled by default
|
||||||
|
## if you want one to be executed on NM up events
|
||||||
|
## please make it executable. See chmod(1) for more details
|
||||||
|
|
||||||
INTERFACE=$1 # The interface which is brought up or down
|
INTERFACE=$1 # The interface which is brought up or down
|
||||||
STATUS=$2 # The new state of the interface
|
STATUS=$2 # The new state of the interface
|
||||||
|
|
||||||
|
@ -1,86 +0,0 @@
|
|||||||
From ffb24c0bbd4d6f2b4718a1a8f4f2da237cc6ed66 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thomas Markwalder <tmark@isc.org>
|
|
||||||
Date: Fri, 14 Sep 2018 13:41:41 -0400
|
|
||||||
Subject: [PATCH] [master] Added includes of new BIND9 compatibility headers,
|
|
||||||
updated util/bind.sh
|
|
||||||
|
|
||||||
Merges in rt48072.
|
|
||||||
|
|
||||||
(cherry picked from commit 8194daabfd590f17825f0c61e9534bee5c99cc86)
|
|
||||||
---
|
|
||||||
includes/omapip/isclib.h | 3 +++
|
|
||||||
includes/omapip/result.h | 1 +
|
|
||||||
server/dhcpv6.c | 13 +++++++++----
|
|
||||||
3 files changed, 13 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/includes/omapip/isclib.h b/includes/omapip/isclib.h
|
|
||||||
index e2963089..fa5d9ad3 100644
|
|
||||||
--- a/includes/omapip/isclib.h
|
|
||||||
+++ b/includes/omapip/isclib.h
|
|
||||||
@@ -48,6 +48,9 @@
|
|
||||||
#include <string.h>
|
|
||||||
#include <netdb.h>
|
|
||||||
|
|
||||||
+#include <isc/boolean.h>
|
|
||||||
+#include <isc/int.h>
|
|
||||||
+
|
|
||||||
#include <isc/buffer.h>
|
|
||||||
#include <isc/lex.h>
|
|
||||||
#include <isc/lib.h>
|
|
||||||
diff --git a/includes/omapip/result.h b/includes/omapip/result.h
|
|
||||||
index ae5f7d6a..9c1fab23 100644
|
|
||||||
--- a/includes/omapip/result.h
|
|
||||||
+++ b/includes/omapip/result.h
|
|
||||||
@@ -26,6 +26,7 @@
|
|
||||||
#ifndef DHCP_RESULT_H
|
|
||||||
#define DHCP_RESULT_H 1
|
|
||||||
|
|
||||||
+#include <isc/boolean.h>
|
|
||||||
#include <isc/lang.h>
|
|
||||||
#include <isc/resultclass.h>
|
|
||||||
#include <isc/types.h>
|
|
||||||
diff --git a/server/dhcpv6.c b/server/dhcpv6.c
|
|
||||||
index 74487667..1a6ff241 100644
|
|
||||||
--- a/server/dhcpv6.c
|
|
||||||
+++ b/server/dhcpv6.c
|
|
||||||
@@ -1003,7 +1003,8 @@ void check_pool6_threshold(struct reply_state *reply,
|
|
||||||
shared_name,
|
|
||||||
inet_ntop(AF_INET6, &lease->addr,
|
|
||||||
tmp_addr, sizeof(tmp_addr)),
|
|
||||||
- used, count);
|
|
||||||
+ (long long unsigned)(used),
|
|
||||||
+ (long long unsigned)(count));
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
@@ -1035,7 +1036,8 @@ void check_pool6_threshold(struct reply_state *reply,
|
|
||||||
"address: %s; high threshold %d%% %llu/%llu.",
|
|
||||||
shared_name,
|
|
||||||
inet_ntop(AF_INET6, &lease->addr, tmp_addr, sizeof(tmp_addr)),
|
|
||||||
- poolhigh, used, count);
|
|
||||||
+ poolhigh, (long long unsigned)(used),
|
|
||||||
+ (long long unsigned)(count));
|
|
||||||
|
|
||||||
/* handle the low threshold now, if we don't
|
|
||||||
* have one we default to 0. */
|
|
||||||
@@ -1383,12 +1385,15 @@ pick_v6_address(struct reply_state *reply)
|
|
||||||
log_debug("Unable to pick client address: "
|
|
||||||
"no addresses available - shared network %s: "
|
|
||||||
" 2^64-1 < total, %llu active, %llu abandoned",
|
|
||||||
- shared_name, active - abandoned, abandoned);
|
|
||||||
+ shared_name, (long long unsigned)(active - abandoned),
|
|
||||||
+ (long long unsigned)(abandoned));
|
|
||||||
} else {
|
|
||||||
log_debug("Unable to pick client address: "
|
|
||||||
"no addresses available - shared network %s: "
|
|
||||||
"%llu total, %llu active, %llu abandoned",
|
|
||||||
- shared_name, total, active - abandoned, abandoned);
|
|
||||||
+ shared_name, (long long unsigned)(total),
|
|
||||||
+ (long long unsigned)(active - abandoned),
|
|
||||||
+ (long long unsigned)(abandoned));
|
|
||||||
}
|
|
||||||
|
|
||||||
return ISC_R_NORESOURCES;
|
|
||||||
--
|
|
||||||
2.14.5
|
|
||||||
|
|
@ -1,77 +0,0 @@
|
|||||||
From c37721f799e6b32da156759a830011949311205a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Petr Mensik <pemensik@redhat.com>
|
|
||||||
Date: Fri, 16 Feb 2018 17:50:40 +0100
|
|
||||||
Subject: [PATCH] New bind includes never includes isc/util.h from any public
|
|
||||||
headers. Include them to all compiled files that require it.
|
|
||||||
|
|
||||||
---
|
|
||||||
client/dhclient.c | 1 +
|
|
||||||
common/execute.c | 1 +
|
|
||||||
common/parse.c | 1 +
|
|
||||||
common/socket.c | 1 +
|
|
||||||
omapip/connection.c | 1 +
|
|
||||||
5 files changed, 5 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/client/dhclient.c b/client/dhclient.c
|
|
||||||
index 228b4fe..014365d 100644
|
|
||||||
--- a/client/dhclient.c
|
|
||||||
+++ b/client/dhclient.c
|
|
||||||
@@ -38,6 +38,7 @@
|
|
||||||
#include <sys/wait.h>
|
|
||||||
#include <limits.h>
|
|
||||||
#include <isc/file.h>
|
|
||||||
+#include <isc/util.h>
|
|
||||||
#include <dns/result.h>
|
|
||||||
|
|
||||||
#ifdef HAVE_LIBCAP_NG
|
|
||||||
diff --git a/common/execute.c b/common/execute.c
|
|
||||||
index fa4e0f8..1ee1e7d 100644
|
|
||||||
--- a/common/execute.c
|
|
||||||
+++ b/common/execute.c
|
|
||||||
@@ -28,6 +28,7 @@
|
|
||||||
|
|
||||||
#include "dhcpd.h"
|
|
||||||
#include <omapip/omapip_p.h>
|
|
||||||
+#include <isc/util.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/wait.h>
|
|
||||||
|
|
||||||
diff --git a/common/parse.c b/common/parse.c
|
|
||||||
index d08cd2c..729d442 100644
|
|
||||||
--- a/common/parse.c
|
|
||||||
+++ b/common/parse.c
|
|
||||||
@@ -27,6 +27,7 @@
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "dhcpd.h"
|
|
||||||
+#include <isc/util.h>
|
|
||||||
#include <syslog.h>
|
|
||||||
|
|
||||||
/* Enumerations can be specified in option formats, and are used for
|
|
||||||
diff --git a/common/socket.c b/common/socket.c
|
|
||||||
index 2b352a1..94ce334 100644
|
|
||||||
--- a/common/socket.c
|
|
||||||
+++ b/common/socket.c
|
|
||||||
@@ -35,6 +35,7 @@
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "dhcpd.h"
|
|
||||||
+#include <isc/util.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <sys/ioctl.h>
|
|
||||||
#include <sys/uio.h>
|
|
||||||
diff --git a/omapip/connection.c b/omapip/connection.c
|
|
||||||
index 9aac0c8..a74becc 100644
|
|
||||||
--- a/omapip/connection.c
|
|
||||||
+++ b/omapip/connection.c
|
|
||||||
@@ -30,6 +30,7 @@
|
|
||||||
#include "dhcpd.h"
|
|
||||||
|
|
||||||
#include <omapip/omapip_p.h>
|
|
||||||
+#include <isc/util.h>
|
|
||||||
#include <arpa/inet.h>
|
|
||||||
#include <arpa/nameser.h>
|
|
||||||
#include <errno.h>
|
|
||||||
--
|
|
||||||
2.14.3
|
|
||||||
|
|
@ -1,52 +0,0 @@
|
|||||||
commit ccff9ed69d0b26d33ce9cac8e83dab535b64d627
|
|
||||||
Author: Thomas Markwalder <tmark@isc.org>
|
|
||||||
Date: Tue Dec 5 15:12:34 2017 -0500
|
|
||||||
|
|
||||||
[46767] Plugged a socket descriptor leak in OMAPI
|
|
||||||
|
|
||||||
If disconnect is triggered by the reader closing the socket, while there
|
|
||||||
is data left to write, the socket would be orphaned.
|
|
||||||
|
|
||||||
omapip/buffer.c
|
|
||||||
omapi_connection_writea() - added logic to recall disconnect once
|
|
||||||
pending data has been written
|
|
||||||
|
|
||||||
omapip/message.c
|
|
||||||
Removed static declaration from omapi_message_unregister so you can
|
|
||||||
actually compile when DEBUG_PROTOCOL is defined.
|
|
||||||
|
|
||||||
Added a release note
|
|
||||||
|
|
||||||
diff --git a/omapip/buffer.c b/omapip/buffer.c
|
|
||||||
index 6e0621b..a21f0a8 100644
|
|
||||||
--- a/omapip/buffer.c
|
|
||||||
+++ b/omapip/buffer.c
|
|
||||||
@@ -565,6 +565,15 @@ isc_result_t omapi_connection_writer (omapi_object_t *h)
|
|
||||||
omapi_buffer_dereference (&buffer, MDL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ /* If we had data left to write when we're told to disconnect,
|
|
||||||
+ * we need recall disconnect, now that we're done writing.
|
|
||||||
+ * See rt46767. */
|
|
||||||
+ if (c->out_bytes == 0 && c->state == omapi_connection_disconnecting) {
|
|
||||||
+ omapi_disconnect (h, 1);
|
|
||||||
+ return ISC_R_SHUTTINGDOWN;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
return ISC_R_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/omapip/message.c b/omapip/message.c
|
|
||||||
index ee15d82..37abbd2 100644
|
|
||||||
--- a/omapip/message.c
|
|
||||||
+++ b/omapip/message.c
|
|
||||||
@@ -339,7 +339,7 @@ isc_result_t omapi_message_unregister (omapi_object_t *mo)
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef DEBUG_PROTOCOL
|
|
||||||
-static const char *omapi_message_op_name(int op) {
|
|
||||||
+const char *omapi_message_op_name(int op) {
|
|
||||||
switch (op) {
|
|
||||||
case OMAPI_OP_OPEN: return "OMAPI_OP_OPEN";
|
|
||||||
case OMAPI_OP_REFRESH: return "OMAPI_OP_REFRESH";
|
|
@ -1,41 +0,0 @@
|
|||||||
diff --git a/common/options.c b/common/options.c
|
|
||||||
index 83e0384..8a1deca 100644
|
|
||||||
--- a/common/options.c
|
|
||||||
+++ b/common/options.c
|
|
||||||
@@ -1672,7 +1672,8 @@ format_min_length(format, oc)
|
|
||||||
|
|
||||||
|
|
||||||
/* Format the specified option so that a human can easily read it. */
|
|
||||||
-
|
|
||||||
+/* Maximum pretty printed size */
|
|
||||||
+#define MAX_OUTPUT_SIZE 32*1024
|
|
||||||
const char *pretty_print_option (option, data, len, emit_commas, emit_quotes)
|
|
||||||
struct option *option;
|
|
||||||
const unsigned char *data;
|
|
||||||
@@ -1680,8 +1681,9 @@ const char *pretty_print_option (option, data, len, emit_commas, emit_quotes)
|
|
||||||
int emit_commas;
|
|
||||||
int emit_quotes;
|
|
||||||
{
|
|
||||||
- static char optbuf [32768]; /* XXX */
|
|
||||||
- static char *endbuf = &optbuf[sizeof(optbuf)];
|
|
||||||
+ /* We add 128 byte pad so we don't have to add checks everywhere. */
|
|
||||||
+ static char optbuf [MAX_OUTPUT_SIZE + 128]; /* XXX */
|
|
||||||
+ static char *endbuf = optbuf + MAX_OUTPUT_SIZE;
|
|
||||||
int hunksize = 0;
|
|
||||||
int opthunk = 0;
|
|
||||||
int hunkinc = 0;
|
|
||||||
@@ -2132,7 +2134,14 @@ const char *pretty_print_option (option, data, len, emit_commas, emit_quotes)
|
|
||||||
log_error ("Unexpected format code %c",
|
|
||||||
fmtbuf [j]);
|
|
||||||
}
|
|
||||||
+
|
|
||||||
op += strlen (op);
|
|
||||||
+ if (op >= endbuf) {
|
|
||||||
+ log_error ("Option data exceeds"
|
|
||||||
+ " maximum size %d", MAX_OUTPUT_SIZE);
|
|
||||||
+ return ("<error>");
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if (dp == data + len)
|
|
||||||
break;
|
|
||||||
if (j + 1 < numelem && comma != ':')
|
|
@ -1,13 +0,0 @@
|
|||||||
diff --git a/common/options.c b/common/options.c
|
|
||||||
index 83e0384..a58c5fc 100644
|
|
||||||
--- a/common/options.c
|
|
||||||
+++ b/common/options.c
|
|
||||||
@@ -189,6 +189,8 @@ int parse_option_buffer (options, buffer, length, universe)
|
|
||||||
|
|
||||||
/* If the length is outrageous, the options are bad. */
|
|
||||||
if (offset + len > length) {
|
|
||||||
+ /* Avoid reference count overflow */
|
|
||||||
+ option_dereference(&option, MDL);
|
|
||||||
reason = "option length exceeds option buffer length";
|
|
||||||
bogus:
|
|
||||||
log_error("parse_option_buffer: malformed option "
|
|
@ -1,75 +0,0 @@
|
|||||||
diff -up dhcp-4.3.0a1/common/parse.c.64-bit_lease_parse dhcp-4.3.0a1/common/parse.c
|
|
||||||
--- dhcp-4.3.0a1/common/parse.c.64-bit_lease_parse 2013-12-11 01:25:12.000000000 +0100
|
|
||||||
+++ dhcp-4.3.0a1/common/parse.c 2013-12-19 15:45:25.990771814 +0100
|
|
||||||
@@ -938,8 +938,8 @@ TIME
|
|
||||||
parse_date_core(cfile)
|
|
||||||
struct parse *cfile;
|
|
||||||
{
|
|
||||||
- int guess;
|
|
||||||
- int tzoff, year, mon, mday, hour, min, sec;
|
|
||||||
+ TIME guess;
|
|
||||||
+ long int tzoff, year, mon, mday, hour, min, sec;
|
|
||||||
const char *val;
|
|
||||||
enum dhcp_token token;
|
|
||||||
static int months[11] = { 31, 59, 90, 120, 151, 181,
|
|
||||||
@@ -965,7 +965,7 @@ parse_date_core(cfile)
|
|
||||||
}
|
|
||||||
|
|
||||||
skip_token(&val, NULL, cfile); /* consume number */
|
|
||||||
- guess = atoi(val);
|
|
||||||
+ guess = atol(val);
|
|
||||||
|
|
||||||
return((TIME)guess);
|
|
||||||
}
|
|
||||||
@@ -993,7 +993,7 @@ parse_date_core(cfile)
|
|
||||||
somebody invents a time machine, I think we can safely disregard
|
|
||||||
it. This actually works around a stupid Y2K bug that was present
|
|
||||||
in a very early beta release of dhcpd. */
|
|
||||||
- year = atoi(val);
|
|
||||||
+ year = atol(val);
|
|
||||||
if (year > 1900)
|
|
||||||
year -= 1900;
|
|
||||||
|
|
||||||
@@ -1039,7 +1039,7 @@ parse_date_core(cfile)
|
|
||||||
return((TIME)0);
|
|
||||||
}
|
|
||||||
skip_token(&val, NULL, cfile); /* consume day of month */
|
|
||||||
- mday = atoi(val);
|
|
||||||
+ mday = atol(val);
|
|
||||||
|
|
||||||
/* Hour... */
|
|
||||||
token = peek_token(&val, NULL, cfile);
|
|
||||||
@@ -1050,7 +1050,7 @@ parse_date_core(cfile)
|
|
||||||
return((TIME)0);
|
|
||||||
}
|
|
||||||
skip_token(&val, NULL, cfile); /* consume hour */
|
|
||||||
- hour = atoi(val);
|
|
||||||
+ hour = atol(val);
|
|
||||||
|
|
||||||
/* Colon separating hour from minute... */
|
|
||||||
token = peek_token(&val, NULL, cfile);
|
|
||||||
@@ -1072,7 +1072,7 @@ parse_date_core(cfile)
|
|
||||||
return((TIME)0);
|
|
||||||
}
|
|
||||||
skip_token(&val, NULL, cfile); /* consume minute */
|
|
||||||
- min = atoi(val);
|
|
||||||
+ min = atol(val);
|
|
||||||
|
|
||||||
/* Colon separating minute from second... */
|
|
||||||
token = peek_token(&val, NULL, cfile);
|
|
||||||
@@ -1094,13 +1094,13 @@ parse_date_core(cfile)
|
|
||||||
return((TIME)0);
|
|
||||||
}
|
|
||||||
skip_token(&val, NULL, cfile); /* consume second */
|
|
||||||
- sec = atoi(val);
|
|
||||||
+ sec = atol(val);
|
|
||||||
|
|
||||||
tzoff = 0;
|
|
||||||
token = peek_token(&val, NULL, cfile);
|
|
||||||
if (token == NUMBER) {
|
|
||||||
skip_token(&val, NULL, cfile); /* consume tzoff */
|
|
||||||
- tzoff = atoi(val);
|
|
||||||
+ tzoff = atol(val);
|
|
||||||
} else if (token != SEMI) {
|
|
||||||
skip_token(&val, NULL, cfile);
|
|
||||||
parse_warn(cfile,
|
|
@ -1,164 +0,0 @@
|
|||||||
--- a/server/dhcp.c 2017-07-14 15:32:14.611104590 +0200
|
|
||||||
+++ b/server/dhcp.c 2017-07-14 15:34:17.508858018 +0200
|
|
||||||
@@ -87,6 +87,42 @@
|
|
||||||
|
|
||||||
static TIME leaseTimeCheck(TIME calculated, TIME alternate);
|
|
||||||
|
|
||||||
+char *print_client_identifier_from_packet (packet)
|
|
||||||
+ struct packet *packet;
|
|
||||||
+{
|
|
||||||
+ struct option_cache *oc;
|
|
||||||
+ struct data_string client_identifier;
|
|
||||||
+ char *ci;
|
|
||||||
+
|
|
||||||
+ memset (&client_identifier, 0, sizeof client_identifier);
|
|
||||||
+
|
|
||||||
+ oc = lookup_option (&dhcp_universe, packet -> options,
|
|
||||||
+ DHO_DHCP_CLIENT_IDENTIFIER);
|
|
||||||
+ if (oc &&
|
|
||||||
+ evaluate_option_cache (&client_identifier,
|
|
||||||
+ packet, (struct lease *)0,
|
|
||||||
+ (struct client_state *)0,
|
|
||||||
+ packet -> options,
|
|
||||||
+ (struct option_state *)0,
|
|
||||||
+ &global_scope, oc, MDL)) {
|
|
||||||
+ ci = print_hw_addr (HTYPE_INFINIBAND, client_identifier.len, client_identifier.data);
|
|
||||||
+ data_string_forget (&client_identifier, MDL);
|
|
||||||
+ return ci;
|
|
||||||
+ } else
|
|
||||||
+ return "\"no client id\"";
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+char *print_hw_addr_or_client_id (packet)
|
|
||||||
+ struct packet *packet;
|
|
||||||
+{
|
|
||||||
+ if (packet -> raw -> htype == HTYPE_INFINIBAND)
|
|
||||||
+ return print_client_identifier_from_packet (packet);
|
|
||||||
+ else
|
|
||||||
+ return print_hw_addr (packet -> raw -> htype,
|
|
||||||
+ packet -> raw -> hlen,
|
|
||||||
+ packet -> raw -> chaddr);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
void
|
|
||||||
dhcp (struct packet *packet) {
|
|
||||||
int ms_nulltp = 0;
|
|
||||||
@@ -129,9 +165,7 @@
|
|
||||||
|
|
||||||
log_info("%s from %s via %s: %s", s,
|
|
||||||
(packet->raw->htype
|
|
||||||
- ? print_hw_addr(packet->raw->htype,
|
|
||||||
- packet->raw->hlen,
|
|
||||||
- packet->raw->chaddr)
|
|
||||||
+ ? print_hw_addr_or_client_id(packet)
|
|
||||||
: "<no identifier>"),
|
|
||||||
packet->raw->giaddr.s_addr
|
|
||||||
? inet_ntoa(packet->raw->giaddr)
|
|
||||||
@@ -328,9 +362,7 @@
|
|
||||||
#endif
|
|
||||||
snprintf (msgbuf, sizeof msgbuf, "DHCPDISCOVER from %s %s%s%svia %s",
|
|
||||||
(packet -> raw -> htype
|
|
||||||
- ? print_hw_addr (packet -> raw -> htype,
|
|
||||||
- packet -> raw -> hlen,
|
|
||||||
- packet -> raw -> chaddr)
|
|
||||||
+ ? print_hw_addr_or_client_id (packet)
|
|
||||||
: (lease
|
|
||||||
? print_hex_1(lease->uid_len, lease->uid, 60)
|
|
||||||
: "<no identifier>")),
|
|
||||||
@@ -542,9 +574,7 @@
|
|
||||||
"DHCPREQUEST for %s%s from %s %s%s%svia %s",
|
|
||||||
piaddr (cip), smbuf,
|
|
||||||
(packet -> raw -> htype
|
|
||||||
- ? print_hw_addr (packet -> raw -> htype,
|
|
||||||
- packet -> raw -> hlen,
|
|
||||||
- packet -> raw -> chaddr)
|
|
||||||
+ ? print_hw_addr_or_client_id(packet)
|
|
||||||
: (lease
|
|
||||||
? print_hex_1(lease->uid_len, lease->uid, 60)
|
|
||||||
: "<no identifier>")),
|
|
||||||
@@ -785,9 +815,7 @@
|
|
||||||
if ((oc = lookup_option (&dhcp_universe, packet -> options,
|
|
||||||
DHO_DHCP_REQUESTED_ADDRESS))) {
|
|
||||||
log_info ("DHCPRELEASE from %s specified requested-address.",
|
|
||||||
- print_hw_addr (packet -> raw -> htype,
|
|
||||||
- packet -> raw -> hlen,
|
|
||||||
- packet -> raw -> chaddr));
|
|
||||||
+ print_hw_addr_or_client_id(packet));
|
|
||||||
}
|
|
||||||
|
|
||||||
oc = lookup_option (&dhcp_universe, packet -> options,
|
|
||||||
@@ -879,9 +907,7 @@
|
|
||||||
"DHCPRELEASE of %s from %s %s%s%svia %s (%sfound)",
|
|
||||||
cstr,
|
|
||||||
(packet -> raw -> htype
|
|
||||||
- ? print_hw_addr (packet -> raw -> htype,
|
|
||||||
- packet -> raw -> hlen,
|
|
||||||
- packet -> raw -> chaddr)
|
|
||||||
+ ? print_hw_addr_or_client_id(packet)
|
|
||||||
: (lease
|
|
||||||
? print_hex_1(lease->uid_len, lease->uid, 60)
|
|
||||||
: "<no identifier>")),
|
|
||||||
@@ -986,9 +1012,7 @@
|
|
||||||
"DHCPDECLINE of %s from %s %s%s%svia %s",
|
|
||||||
piaddr (cip),
|
|
||||||
(packet -> raw -> htype
|
|
||||||
- ? print_hw_addr (packet -> raw -> htype,
|
|
||||||
- packet -> raw -> hlen,
|
|
||||||
- packet -> raw -> chaddr)
|
|
||||||
+ ? print_hw_addr_or_client_id(packet)
|
|
||||||
: (lease
|
|
||||||
? print_hex_1(lease->uid_len, lease->uid, 60)
|
|
||||||
: "<no identifier>")),
|
|
||||||
@@ -1707,8 +1731,7 @@
|
|
||||||
/* Report what we're sending. */
|
|
||||||
snprintf(msgbuf, sizeof msgbuf, "DHCPACK to %s (%s) via", piaddr(cip),
|
|
||||||
(packet->raw->htype && packet->raw->hlen) ?
|
|
||||||
- print_hw_addr(packet->raw->htype, packet->raw->hlen,
|
|
||||||
- packet->raw->chaddr) :
|
|
||||||
+ print_hw_addr_or_client_id(packet) :
|
|
||||||
"<no client hardware address>");
|
|
||||||
log_info("%s %s", msgbuf, gip.len ? piaddr(gip) :
|
|
||||||
packet->interface->name);
|
|
||||||
@@ -1886,9 +1909,7 @@
|
|
||||||
#endif
|
|
||||||
log_info ("DHCPNAK on %s to %s via %s",
|
|
||||||
piaddr (*cip),
|
|
||||||
- print_hw_addr (packet -> raw -> htype,
|
|
||||||
- packet -> raw -> hlen,
|
|
||||||
- packet -> raw -> chaddr),
|
|
||||||
+ print_hw_addr_or_client_id(packet),
|
|
||||||
packet -> raw -> giaddr.s_addr
|
|
||||||
? inet_ntoa (packet -> raw -> giaddr)
|
|
||||||
: packet -> interface -> name);
|
|
||||||
@@ -3897,7 +3918,7 @@
|
|
||||||
? (state -> offer == DHCPACK ? "DHCPACK" : "DHCPOFFER")
|
|
||||||
: "BOOTREPLY"),
|
|
||||||
piaddr (lease -> ip_addr),
|
|
||||||
- (lease -> hardware_addr.hlen
|
|
||||||
+ (lease -> hardware_addr.hlen > 1
|
|
||||||
? print_hw_addr (lease -> hardware_addr.hbuf [0],
|
|
||||||
lease -> hardware_addr.hlen - 1,
|
|
||||||
&lease -> hardware_addr.hbuf [1])
|
|
||||||
@@ -4450,10 +4471,7 @@
|
|
||||||
if (uid_lease) {
|
|
||||||
if (uid_lease->binding_state == FTS_ACTIVE) {
|
|
||||||
log_error ("client %s has duplicate%s on %s",
|
|
||||||
- (print_hw_addr
|
|
||||||
- (packet -> raw -> htype,
|
|
||||||
- packet -> raw -> hlen,
|
|
||||||
- packet -> raw -> chaddr)),
|
|
||||||
+ (print_hw_addr_or_client_id(packet)),
|
|
||||||
" leases",
|
|
||||||
(ip_lease -> subnet ->
|
|
||||||
shared_network -> name));
|
|
||||||
@@ -4620,9 +4638,7 @@
|
|
||||||
log_error("uid lease %s for client %s is duplicate "
|
|
||||||
"on %s",
|
|
||||||
piaddr(uid_lease->ip_addr),
|
|
||||||
- print_hw_addr(packet->raw->htype,
|
|
||||||
- packet->raw->hlen,
|
|
||||||
- packet->raw->chaddr),
|
|
||||||
+ print_hw_addr_or_client_id(packet),
|
|
||||||
uid_lease->subnet->shared_network->name);
|
|
||||||
|
|
||||||
if (!packet -> raw -> ciaddr.s_addr &&
|
|
@ -1,14 +0,0 @@
|
|||||||
diff -up dhcp-4.3.0a1/common/dispatch.c.dracut dhcp-4.3.0a1/common/dispatch.c
|
|
||||||
--- dhcp-4.3.0a1/common/dispatch.c.dracut 2013-12-11 01:25:12.000000000 +0100
|
|
||||||
+++ dhcp-4.3.0a1/common/dispatch.c 2013-12-19 15:39:50.350505860 +0100
|
|
||||||
@@ -210,6 +210,10 @@ void add_timeout (when, where, what, ref
|
|
||||||
isc_interval_t interval;
|
|
||||||
isc_time_t expires;
|
|
||||||
|
|
||||||
+ if (when == NULL) {
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
/* See if this timeout supersedes an existing timeout. */
|
|
||||||
t = (struct timeout *)0;
|
|
||||||
for (q = timeouts; q; q = q->next) {
|
|
@ -1,63 +0,0 @@
|
|||||||
diff -up dhcp-4.3.4/client/dhclient.c.backoff dhcp-4.3.4/client/dhclient.c
|
|
||||||
--- dhcp-4.3.4/client/dhclient.c.backoff 2016-04-29 12:16:26.976245611 +0200
|
|
||||||
+++ dhcp-4.3.4/client/dhclient.c 2016-04-29 12:16:26.979245609 +0200
|
|
||||||
@@ -1423,6 +1423,8 @@ void state_init (cpp)
|
|
||||||
void *cpp;
|
|
||||||
{
|
|
||||||
struct client_state *client = cpp;
|
|
||||||
+ enum dhcp_state init_state = client->state;
|
|
||||||
+ struct timeval tv;
|
|
||||||
|
|
||||||
ASSERT_STATE(state, S_INIT);
|
|
||||||
|
|
||||||
@@ -1435,9 +1437,18 @@ void state_init (cpp)
|
|
||||||
client -> first_sending = cur_time;
|
|
||||||
client -> interval = client -> config -> initial_interval;
|
|
||||||
|
|
||||||
- /* Add an immediate timeout to cause the first DHCPDISCOVER packet
|
|
||||||
- to go out. */
|
|
||||||
- send_discover (client);
|
|
||||||
+ if (init_state != S_DECLINED) {
|
|
||||||
+ /* Add an immediate timeout to cause the first DHCPDISCOVER packet
|
|
||||||
+ to go out. */
|
|
||||||
+ send_discover(client);
|
|
||||||
+ } else {
|
|
||||||
+ /* We've received an OFFER and it has been DECLINEd by dhclient-script.
|
|
||||||
+ * wait for a random time between 1 and backoff_cutoff seconds before
|
|
||||||
+ * trying again. */
|
|
||||||
+ tv . tv_sec = cur_time + ((1 + (random() >> 2)) % client->config->backoff_cutoff);
|
|
||||||
+ tv . tv_usec = 0;
|
|
||||||
+ add_timeout(&tv, send_discover, client, 0, 0);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
@@ -1734,5 +1745,6 @@ void bind_lease (client)
|
|
||||||
#endif
|
|
||||||
exit(2);
|
|
||||||
} else {
|
|
||||||
+ client -> state = S_DECLINED;
|
|
||||||
state_init(client);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
@@ -4626,6 +4638,7 @@ void client_location_changed ()
|
|
||||||
case S_INIT:
|
|
||||||
case S_REBINDING:
|
|
||||||
case S_STOPPED:
|
|
||||||
+ case S_DECLINED:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
client -> state = S_INIT;
|
|
||||||
diff -up dhcp-4.3.4/includes/dhcpd.h.backoff dhcp-4.3.4/includes/dhcpd.h
|
|
||||||
--- dhcp-4.3.4/includes/dhcpd.h.backoff 2016-04-29 12:16:26.980245609 +0200
|
|
||||||
+++ dhcp-4.3.4/includes/dhcpd.h 2016-04-29 12:17:30.893203533 +0200
|
|
||||||
@@ -1171,7 +1171,8 @@ enum dhcp_state {
|
|
||||||
S_BOUND = 5,
|
|
||||||
S_RENEWING = 6,
|
|
||||||
S_REBINDING = 7,
|
|
||||||
- S_STOPPED = 8
|
|
||||||
+ S_STOPPED = 8,
|
|
||||||
+ S_DECLINED = 9
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Possible pending client operations. */
|
|
@ -1,64 +0,0 @@
|
|||||||
diff -up dhcp-4.3.4/client/dhclient.c.preinit6s dhcp-4.3.4/client/dhclient.c
|
|
||||||
--- dhcp-4.3.4/client/dhclient.c.preinit6s 2016-04-29 13:15:10.361379493 +0200
|
|
||||||
+++ dhcp-4.3.4/client/dhclient.c 2016-04-29 13:17:43.622415423 +0200
|
|
||||||
@@ -812,6 +812,12 @@ main(int argc, char **argv) {
|
|
||||||
|
|
||||||
inaddr_any.s_addr = INADDR_ANY;
|
|
||||||
|
|
||||||
+ /* Discover all the network interfaces. */
|
|
||||||
+ discover_interfaces(DISCOVER_UNCONFIGURED);
|
|
||||||
+
|
|
||||||
+ /* Parse the dhclient.conf file. */
|
|
||||||
+ read_client_conf();
|
|
||||||
+
|
|
||||||
/* Stateless special case. */
|
|
||||||
if (stateless) {
|
|
||||||
if (release_mode || (wanted_ia_na > 0) ||
|
|
||||||
@@ -828,12 +834,6 @@ main(int argc, char **argv) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
- /* Discover all the network interfaces. */
|
|
||||||
- discover_interfaces(DISCOVER_UNCONFIGURED);
|
|
||||||
-
|
|
||||||
- /* Parse the dhclient.conf file. */
|
|
||||||
- read_client_conf();
|
|
||||||
-
|
|
||||||
/* 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);
|
|
||||||
@@ -1288,20 +1288,30 @@ void run_stateless(int exit_mode, u_int1
|
|
||||||
IGNORE_UNUSED(port);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
- /* Discover the network interface. */
|
|
||||||
- discover_interfaces(DISCOVER_REQUESTED);
|
|
||||||
+ struct interface_info *ip;
|
|
||||||
|
|
||||||
if (!interfaces)
|
|
||||||
usage("No interfaces available for stateless command: %s", "-S");
|
|
||||||
|
|
||||||
- /* Parse the dhclient.conf file. */
|
|
||||||
#ifdef DHCP4o6
|
|
||||||
if (dhcpv4_over_dhcpv6) {
|
|
||||||
/* Mark we want to request IRT too! */
|
|
||||||
dhcpv4_over_dhcpv6++;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
- read_client_conf();
|
|
||||||
+
|
|
||||||
+ for (ip = interfaces; ip; ip = ip->next) {
|
|
||||||
+ if ((interfaces_requested > 0) &&
|
|
||||||
+ ((ip->flags & (INTERFACE_REQUESTED |
|
|
||||||
+ INTERFACE_AUTOMATIC)) !=
|
|
||||||
+ INTERFACE_REQUESTED))
|
|
||||||
+ continue;
|
|
||||||
+ script_init(ip->client, "PREINIT6", NULL);
|
|
||||||
+ script_go(ip->client);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ /* Discover the network interface. */
|
|
||||||
+ discover_interfaces(DISCOVER_REQUESTED);
|
|
||||||
|
|
||||||
/* Parse the lease database. */
|
|
||||||
read_client_leases();
|
|
@ -1,34 +0,0 @@
|
|||||||
diff -up dhcp-4.3.1b1/client/dhclient.8.KrJcIv dhcp-4.3.1b1/client/dhclient.8
|
|
||||||
--- dhcp-4.3.1b1/client/dhclient.8.KrJcIv 2014-07-10 17:39:25.852763873 +0200
|
|
||||||
+++ dhcp-4.3.1b1/client/dhclient.8 2014-07-10 17:54:26.841012988 +0200
|
|
||||||
@@ -458,6 +458,9 @@ used to construct a RFC4361 style client
|
|
||||||
in the client's messages. This client id can be overridden by
|
|
||||||
setting a client id in the configuration file. Overridding the
|
|
||||||
client id in this fashion is discouraged.
|
|
||||||
+This option is turned on by default, if you want to redefine or turn off
|
|
||||||
+sending of client id, use send dhcp-client-identifier = "better identifier"
|
|
||||||
+or send dhcp-client-identifier = "" in /etc/dhcp/dhclient.conf.
|
|
||||||
.TP
|
|
||||||
.BI \-I
|
|
||||||
Use the standard DDNS scheme from RFCs 4701 & 4702.
|
|
||||||
diff -up dhcp-4.3.1b1/client/dhclient.c.KrJcIv dhcp-4.3.1b1/client/dhclient.c
|
|
||||||
--- dhcp-4.3.1b1/client/dhclient.c.KrJcIv 2014-07-10 17:54:26.829013157 +0200
|
|
||||||
+++ dhcp-4.3.1b1/client/dhclient.c 2014-07-10 17:55:50.155835918 +0200
|
|
||||||
@@ -73,7 +73,7 @@ struct sockaddr_in sockaddr_broadcast;
|
|
||||||
struct in_addr giaddr;
|
|
||||||
struct data_string default_duid;
|
|
||||||
int duid_type = 0;
|
|
||||||
-int duid_v4 = 0;
|
|
||||||
+int duid_v4 = 1;
|
|
||||||
int std_dhcid = 0;
|
|
||||||
|
|
||||||
/* ASSERT_STATE() does nothing now; it used to be
|
|
||||||
@@ -1301,7 +1301,7 @@ static void setup_ib_interface(struct in
|
|
||||||
}
|
|
||||||
|
|
||||||
/* No client ID specified */
|
|
||||||
- log_fatal("dhcp-client-identifier must be specified for InfiniBand");
|
|
||||||
+ //log_fatal("dhcp-client-identifier must be specified for InfiniBand");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Individual States:
|
|
@ -1,12 +0,0 @@
|
|||||||
diff -up dhcp-4.3.0rc1/common/tables.c.garbage dhcp-4.3.0rc1/common/tables.c
|
|
||||||
--- dhcp-4.3.0rc1/common/tables.c.garbage 2014-01-29 10:03:52.132624677 +0100
|
|
||||||
+++ dhcp-4.3.0rc1/common/tables.c 2014-01-29 10:04:51.413875343 +0100
|
|
||||||
@@ -213,7 +213,7 @@ static struct option dhcp_options[] = {
|
|
||||||
{ "name-service-search", "Sa", &dhcp_universe, 117, 1 },
|
|
||||||
#endif
|
|
||||||
{ "subnet-selection", "I", &dhcp_universe, 118, 1 },
|
|
||||||
- { "domain-search", "Dc", &dhcp_universe, 119, 1 },
|
|
||||||
+ { "domain-search", "D", &dhcp_universe, 119, 1 },
|
|
||||||
{ "vivco", "Evendor-class.", &dhcp_universe, 124, 1 },
|
|
||||||
{ "vivso", "Evendor.", &dhcp_universe, 125, 1 },
|
|
||||||
#if 0
|
|
@ -1,44 +0,0 @@
|
|||||||
diff --git a/omapip/isclib.c b/omapip/isclib.c
|
|
||||||
index 9ec1a0f..42d82ff 100644
|
|
||||||
--- a/omapip/isclib.c
|
|
||||||
+++ b/omapip/isclib.c
|
|
||||||
@@ -185,16 +185,6 @@ dhcp_context_create(int flags,
|
|
||||||
if (result != ISC_R_SUCCESS)
|
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
- result = isc_app_ctxstart(dhcp_gbl_ctx.actx);
|
|
||||||
- if (result != ISC_R_SUCCESS)
|
|
||||||
- return (result);
|
|
||||||
- dhcp_gbl_ctx.actx_started = ISC_TRUE;
|
|
||||||
-
|
|
||||||
- /* Not all OSs support suppressing SIGPIPE through socket
|
|
||||||
- * options, so set the sigal action to be ignore. This allows
|
|
||||||
- * broken connections to fail gracefully with EPIPE on writes */
|
|
||||||
- handle_signal(SIGPIPE, SIG_IGN);
|
|
||||||
-
|
|
||||||
result = isc_taskmgr_createinctx(dhcp_gbl_ctx.mctx,
|
|
||||||
dhcp_gbl_ctx.actx,
|
|
||||||
1, 0,
|
|
||||||
@@ -217,6 +207,21 @@ dhcp_context_create(int flags,
|
|
||||||
result = isc_task_create(dhcp_gbl_ctx.taskmgr, 0, &dhcp_gbl_ctx.task);
|
|
||||||
if (result != ISC_R_SUCCESS)
|
|
||||||
goto cleanup;
|
|
||||||
+
|
|
||||||
+ result = isc_app_ctxstart(dhcp_gbl_ctx.actx);
|
|
||||||
+ if (result != ISC_R_SUCCESS)
|
|
||||||
+ return (result);
|
|
||||||
+ dhcp_gbl_ctx.actx_started = ISC_TRUE;
|
|
||||||
+
|
|
||||||
+ /* Not all OSs support suppressing SIGPIPE through socket
|
|
||||||
+ * options, so set the sigal action to be ignore. This allows
|
|
||||||
+ * broken connections to fail gracefully with EPIPE on writes */
|
|
||||||
+ handle_signal(SIGPIPE, SIG_IGN);
|
|
||||||
+
|
|
||||||
+ /* Reset handlers installed by isc_app_ctxstart()
|
|
||||||
+ * to default for control-c and kill */
|
|
||||||
+ handle_signal(SIGINT, SIG_DFL);
|
|
||||||
+ handle_signal(SIGTERM, SIG_DFL);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined (NSUPDATE)
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
|||||||
diff -up dhcp-4.3.0a1/client/dhc6.c.honor-expired dhcp-4.3.0a1/client/dhc6.c
|
|
||||||
--- dhcp-4.3.0a1/client/dhc6.c.honor-expired 2013-12-19 16:00:28.062183037 +0100
|
|
||||||
+++ dhcp-4.3.0a1/client/dhc6.c 2013-12-19 16:00:28.076182842 +0100
|
|
||||||
@@ -1351,6 +1351,32 @@ start_info_request6(struct client_state
|
|
||||||
go_daemon();
|
|
||||||
}
|
|
||||||
|
|
||||||
+/* Run through the addresses in lease and return true if there's any unexpired.
|
|
||||||
+ * Return false otherwise.
|
|
||||||
+ */
|
|
||||||
+isc_boolean_t
|
|
||||||
+unexpired_address_in_lease(struct dhc6_lease *lease)
|
|
||||||
+{
|
|
||||||
+ struct dhc6_ia *ia;
|
|
||||||
+ struct dhc6_addr *addr;
|
|
||||||
+
|
|
||||||
+ for (ia = lease->bindings ; ia != NULL ; ia = ia->next) {
|
|
||||||
+ for (addr = ia->addrs ; addr != NULL ; addr = addr->next) {
|
|
||||||
+ if (addr->flags & DHC6_ADDR_EXPIRED)
|
|
||||||
+ continue;
|
|
||||||
+
|
|
||||||
+ if (addr->starts + addr->max_life > cur_time) {
|
|
||||||
+ return ISC_TRUE;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ log_info("PRC: Previous lease is devoid of active addresses."
|
|
||||||
+ " Re-initializing.");
|
|
||||||
+
|
|
||||||
+ return ISC_FALSE;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/*
|
|
||||||
* start_confirm6() kicks off an "init-reboot" version of the process, at
|
|
||||||
* startup to find out if old bindings are 'fair' and at runtime whenever
|
|
||||||
@@ -1363,8 +1389,10 @@ start_confirm6(struct client_state *clie
|
|
||||||
|
|
||||||
/* If there is no active lease, there is nothing to check. */
|
|
||||||
if ((client->active_lease == NULL) ||
|
|
||||||
- !active_prefix(client) ||
|
|
||||||
- client->active_lease->released) {
|
|
||||||
+ !active_prefix(client) ||
|
|
||||||
+ client->active_lease->released ||
|
|
||||||
+ !unexpired_address_in_lease(client->active_lease)) {
|
|
||||||
+ dhc6_lease_destroy(&client->active_lease, MDL);
|
|
||||||
start_init6(client);
|
|
||||||
return;
|
|
||||||
}
|
|
@ -1,138 +0,0 @@
|
|||||||
diff -up dhcp-4.3.4/client/dhclient.c.improved-xid dhcp-4.3.4/client/dhclient.c
|
|
||||||
--- dhcp-4.3.4/client/dhclient.c.improved-xid 2016-04-29 12:54:55.997102182 +0200
|
|
||||||
+++ dhcp-4.3.4/client/dhclient.c 2016-04-29 12:57:25.123139587 +0200
|
|
||||||
@@ -1045,6 +1045,26 @@ main(int argc, char **argv) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+ /* We create a backup seed before rediscovering interfaces in order to
|
|
||||||
+ have a seed built using all of the available interfaces
|
|
||||||
+ It's interesting if required interfaces doesn't let us defined
|
|
||||||
+ a really unique seed due to a lack of valid HW addr later
|
|
||||||
+ (this is the case with DHCP over IB)
|
|
||||||
+ We only use the last device as using a sum could broke the
|
|
||||||
+ uniqueness of the seed among multiple nodes
|
|
||||||
+ */
|
|
||||||
+ unsigned backup_seed = 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);
|
|
||||||
+ backup_seed = junk;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+
|
|
||||||
/* 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
|
|
||||||
@@ -1059,14 +1079,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);
|
|
||||||
+ }
|
|
||||||
+ /* 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());
|
|
||||||
|
|
||||||
/* Setup specific Infiniband options */
|
|
||||||
for (ip = interfaces; ip; ip = ip->next) {
|
|
||||||
@@ -1633,7 +1675,7 @@ void dhcpack (packet)
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
- log_info ("DHCPACK from %s", piaddr (packet -> client_addr));
|
|
||||||
+ log_info ("DHCPACK from %s (xid=0x%x)", piaddr (packet -> client_addr), ntohl(client -> xid));
|
|
||||||
|
|
||||||
lease = packet_to_lease (packet, client);
|
|
||||||
if (!lease) {
|
|
||||||
@@ -2541,7 +2583,7 @@ void dhcpnak (packet)
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
- log_info ("DHCPNAK from %s", piaddr (packet -> client_addr));
|
|
||||||
+ log_info ("DHCPNAK from %s (xid=0x%x)", piaddr (packet -> client_addr), ntohl(client -> xid));
|
|
||||||
|
|
||||||
if (!client -> active) {
|
|
||||||
#if defined (DEBUG)
|
|
||||||
@@ -2674,10 +2716,10 @@ void send_discover (cpp)
|
|
||||||
(long)(client -> interval));
|
|
||||||
} else
|
|
||||||
#endif
|
|
||||||
- log_info ("DHCPDISCOVER on %s to %s port %d interval %ld",
|
|
||||||
+ log_info ("DHCPDISCOVER on %s to %s port %d interval %ld (xid=0x%x)",
|
|
||||||
client -> name ? client -> name : client -> interface -> name,
|
|
||||||
inet_ntoa (sockaddr_broadcast.sin_addr),
|
|
||||||
- ntohs (sockaddr_broadcast.sin_port), (long)(client -> interval));
|
|
||||||
+ ntohs (sockaddr_broadcast.sin_port), (long)(client -> interval), ntohl(client -> xid));
|
|
||||||
|
|
||||||
/* Send out a packet. */
|
|
||||||
#if defined(DHCPv6) && defined(DHCP4o6)
|
|
||||||
@@ -2962,10 +3004,10 @@ void send_request (cpp)
|
|
||||||
log_info ("DHCPREQUEST");
|
|
||||||
} else
|
|
||||||
#endif
|
|
||||||
- log_info ("DHCPREQUEST on %s to %s port %d",
|
|
||||||
+ log_info ("DHCPREQUEST on %s to %s port %d (xid=0x%x)",
|
|
||||||
client -> name ? client -> name : client -> interface -> name,
|
|
||||||
inet_ntoa (destination.sin_addr),
|
|
||||||
- ntohs (destination.sin_port));
|
|
||||||
+ ntohs (destination.sin_port), ntohl(client -> xid));
|
|
||||||
|
|
||||||
#if defined(DHCPv6) && defined(DHCP4o6)
|
|
||||||
if (dhcpv4_over_dhcpv6) {
|
|
||||||
@@ -3022,10 +3064,10 @@ void send_decline (cpp)
|
|
||||||
log_info ("DHCPDECLINE");
|
|
||||||
} else
|
|
||||||
#endif
|
|
||||||
- log_info ("DHCPDECLINE on %s to %s port %d",
|
|
||||||
+ log_info ("DHCPDECLINE on %s to %s port %d (xid=0x%x)",
|
|
||||||
client->name ? client->name : client->interface->name,
|
|
||||||
inet_ntoa(sockaddr_broadcast.sin_addr),
|
|
||||||
- ntohs(sockaddr_broadcast.sin_port));
|
|
||||||
+ ntohs(sockaddr_broadcast.sin_port), ntohl(client -> xid));
|
|
||||||
|
|
||||||
/* Send out a packet. */
|
|
||||||
#if defined(DHCPv6) && defined(DHCP4o6)
|
|
||||||
@@ -3084,10 +3126,10 @@ void send_release (cpp)
|
|
||||||
log_info ("DHCPRELEASE");
|
|
||||||
} else
|
|
||||||
#endif
|
|
||||||
- log_info ("DHCPRELEASE on %s to %s port %d",
|
|
||||||
+ log_info ("DHCPRELEASE on %s to %s port %d (xid=0x%x)",
|
|
||||||
client -> name ? client -> name : client -> interface -> name,
|
|
||||||
inet_ntoa (destination.sin_addr),
|
|
||||||
- ntohs (destination.sin_port));
|
|
||||||
+ ntohs (destination.sin_port), ntohl(client -> xid));
|
|
||||||
|
|
||||||
#if defined(DHCPv6) && defined(DHCP4o6)
|
|
||||||
if (dhcpv4_over_dhcpv6) {
|
|
@ -1,217 +0,0 @@
|
|||||||
diff -up dhcp-4.3.5b1/common/options.c.option97 dhcp-4.3.5b1/common/options.c
|
|
||||||
--- dhcp-4.3.5b1/common/options.c.option97 2016-09-12 17:17:13.972691041 +0200
|
|
||||||
+++ dhcp-4.3.5b1/common/options.c 2016-09-12 17:19:17.706790276 +0200
|
|
||||||
@@ -4434,13 +4434,26 @@ int validate_packet(struct packet *packe
|
|
||||||
"a future version of ISC DHCP will reject this");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
- /*
|
|
||||||
- * If hlen is 0 we don't have any identifier, we warn the user
|
|
||||||
- * but continue processing the packet as we can.
|
|
||||||
- */
|
|
||||||
- if (packet->raw->hlen == 0) {
|
|
||||||
- log_debug("Received DHCPv4 packet without client-id"
|
|
||||||
- " option and empty hlen field.");
|
|
||||||
+ oc = lookup_option (&dhcp_universe, packet->options,
|
|
||||||
+ DHO_PXE_CLIENT_ID);
|
|
||||||
+ if (oc) {
|
|
||||||
+ /* Let's check if pxe-client-id is sane */
|
|
||||||
+ if ((oc->data.len < 2) ||
|
|
||||||
+ (oc->data.data[0] == '\0' &&
|
|
||||||
+ oc->data.len != 17)) {
|
|
||||||
+ log_debug("Dropped DHCPv4 packet with wrong "
|
|
||||||
+ "(len == %d) pxe-client-id", oc->data.len);
|
|
||||||
+ return (0);
|
|
||||||
+ }
|
|
||||||
+ } else {
|
|
||||||
+ /*
|
|
||||||
+ * If hlen is 0 we don't have any identifier, we warn the user
|
|
||||||
+ * but continue processing the packet as we can.
|
|
||||||
+ */
|
|
||||||
+ if (packet->raw->hlen == 0) {
|
|
||||||
+ log_debug("Received DHCPv4 packet without client-id"
|
|
||||||
+ " option and empty hlen field.");
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
diff -up dhcp-4.3.5b1/common/tables.c.option97 dhcp-4.3.5b1/common/tables.c
|
|
||||||
--- dhcp-4.3.5b1/common/tables.c.option97 2016-09-12 17:17:13.927691005 +0200
|
|
||||||
+++ dhcp-4.3.5b1/common/tables.c 2016-09-12 17:17:13.972691041 +0200
|
|
||||||
@@ -196,8 +196,9 @@ static struct option dhcp_options[] = {
|
|
||||||
/* Defined by RFC 4578 */
|
|
||||||
{ "pxe-system-type", "S", &dhcp_universe, 93, 1 },
|
|
||||||
{ "pxe-interface-id", "BBB", &dhcp_universe, 94, 1 },
|
|
||||||
- { "pxe-client-id", "BX", &dhcp_universe, 97, 1 },
|
|
||||||
#endif
|
|
||||||
+ { "pxe-client-id", "BX", &dhcp_universe, 97, 1 },
|
|
||||||
+
|
|
||||||
{ "uap-servers", "t", &dhcp_universe, 98, 1 },
|
|
||||||
#if defined(RFC4776_OPTIONS)
|
|
||||||
{ "geoconf-civic", "X", &dhcp_universe, 99, 1 },
|
|
||||||
diff -up dhcp-4.3.5b1/includes/dhcp.h.option97 dhcp-4.3.5b1/includes/dhcp.h
|
|
||||||
--- dhcp-4.3.5b1/includes/dhcp.h.option97 2016-09-12 17:17:13.936691013 +0200
|
|
||||||
+++ dhcp-4.3.5b1/includes/dhcp.h 2016-09-12 17:17:13.972691041 +0200
|
|
||||||
@@ -159,6 +159,7 @@ struct dhcp_packet {
|
|
||||||
#define DHO_AUTHENTICATE 90 /* RFC3118, was 210 */
|
|
||||||
#define DHO_CLIENT_LAST_TRANSACTION_TIME 91
|
|
||||||
#define DHO_ASSOCIATED_IP 92
|
|
||||||
+#define DHO_PXE_CLIENT_ID 97 /* RFC4578 */
|
|
||||||
#define DHO_SUBNET_SELECTION 118 /* RFC3011! */
|
|
||||||
#define DHO_DOMAIN_SEARCH 119 /* RFC3397 */
|
|
||||||
#define DHO_CLASSLESS_STATIC_ROUTES 121 /* RFC3442 */
|
|
||||||
diff -up dhcp-4.3.5b1/server/dhcp.c.option97 dhcp-4.3.5b1/server/dhcp.c
|
|
||||||
--- dhcp-4.3.5b1/server/dhcp.c.option97 2016-09-12 17:17:13.947691021 +0200
|
|
||||||
+++ dhcp-4.3.5b1/server/dhcp.c 2016-09-12 17:17:13.973691042 +0200
|
|
||||||
@@ -221,6 +221,10 @@ dhcp (struct packet *packet) {
|
|
||||||
oc = lookup_option (&dhcp_universe, packet -> options,
|
|
||||||
DHO_DHCP_CLIENT_IDENTIFIER);
|
|
||||||
if (!oc)
|
|
||||||
+ oc = lookup_option (&dhcp_universe,
|
|
||||||
+ packet -> options,
|
|
||||||
+ DHO_PXE_CLIENT_ID);
|
|
||||||
+ if (!oc)
|
|
||||||
goto nolease;
|
|
||||||
|
|
||||||
memset (&data, 0, sizeof data);
|
|
||||||
@@ -818,6 +822,9 @@ void dhcprelease (packet, ms_nulltp)
|
|
||||||
|
|
||||||
oc = lookup_option (&dhcp_universe, packet -> options,
|
|
||||||
DHO_DHCP_CLIENT_IDENTIFIER);
|
|
||||||
+ if (!oc)
|
|
||||||
+ oc = lookup_option (&dhcp_universe, packet -> options,
|
|
||||||
+ DHO_PXE_CLIENT_ID);
|
|
||||||
memset (&data, 0, sizeof data);
|
|
||||||
if (oc &&
|
|
||||||
evaluate_option_cache (&data, packet, (struct lease *)0,
|
|
||||||
@@ -1286,6 +1293,9 @@ void dhcpinform (packet, ms_nulltp)
|
|
||||||
*/
|
|
||||||
oc = lookup_option(&dhcp_universe, packet->options,
|
|
||||||
DHO_DHCP_CLIENT_IDENTIFIER);
|
|
||||||
+ if (!oc)
|
|
||||||
+ oc = lookup_option (&dhcp_universe, packet -> options,
|
|
||||||
+ DHO_PXE_CLIENT_ID);
|
|
||||||
memset(&d1, 0, sizeof(d1));
|
|
||||||
if (oc &&
|
|
||||||
evaluate_option_cache(&d1, packet, NULL, NULL,
|
|
||||||
@@ -2381,6 +2391,9 @@ void ack_lease (packet, lease, offer, wh
|
|
||||||
can be used. */
|
|
||||||
oc = lookup_option (&dhcp_universe, packet -> options,
|
|
||||||
DHO_DHCP_CLIENT_IDENTIFIER);
|
|
||||||
+ if (!oc)
|
|
||||||
+ oc = lookup_option (&dhcp_universe, packet -> options,
|
|
||||||
+ DHO_PXE_CLIENT_ID);
|
|
||||||
if (oc &&
|
|
||||||
evaluate_option_cache (&d1, packet, lease,
|
|
||||||
(struct client_state *)0,
|
|
||||||
@@ -2962,6 +2975,9 @@ void ack_lease (packet, lease, offer, wh
|
|
||||||
/* Record the uid, if given... */
|
|
||||||
oc = lookup_option (&dhcp_universe, packet -> options,
|
|
||||||
DHO_DHCP_CLIENT_IDENTIFIER);
|
|
||||||
+ if (!oc)
|
|
||||||
+ oc = lookup_option (&dhcp_universe, packet -> options,
|
|
||||||
+ DHO_PXE_CLIENT_ID);
|
|
||||||
if (oc &&
|
|
||||||
evaluate_option_cache(&d1, packet, lease, NULL,
|
|
||||||
packet->options, state->options,
|
|
||||||
@@ -4068,6 +4084,9 @@ int find_lease (struct lease **lp,
|
|
||||||
specified unique client identifier. */
|
|
||||||
oc = lookup_option (&dhcp_universe, packet -> options,
|
|
||||||
DHO_DHCP_CLIENT_IDENTIFIER);
|
|
||||||
+ if (!oc)
|
|
||||||
+ oc = lookup_option (&dhcp_universe, packet -> options,
|
|
||||||
+ DHO_PXE_CLIENT_ID);
|
|
||||||
memset (&client_identifier, 0, sizeof client_identifier);
|
|
||||||
if (oc &&
|
|
||||||
evaluate_option_cache (&client_identifier,
|
|
||||||
diff -up dhcp-4.3.5b1/server/dhcpd.conf.5.option97 dhcp-4.3.5b1/server/dhcpd.conf.5
|
|
||||||
--- dhcp-4.3.5b1/server/dhcpd.conf.5.option97 2016-09-12 17:17:13.885690972 +0200
|
|
||||||
+++ dhcp-4.3.5b1/server/dhcpd.conf.5 2016-09-12 17:17:13.974691043 +0200
|
|
||||||
@@ -1587,10 +1587,12 @@ should be a name identifying the host.
|
|
||||||
not specified for the host, \fIhostname\fR is used.
|
|
||||||
.PP
|
|
||||||
\fIHost\fR declarations are matched to actual DHCP or BOOTP clients
|
|
||||||
-by matching the \fRdhcp-client-identifier\fR option specified in the
|
|
||||||
+by matching the \fIdhcp-client-identifier\fR or \fIpxe-client-id\fR
|
|
||||||
+options specified in the
|
|
||||||
\fIhost\fR declaration to the one supplied by the client, or, if the
|
|
||||||
\fIhost\fR declaration or the client does not provide a
|
|
||||||
-\fRdhcp-client-identifier\fR option, by matching the \fIhardware\fR
|
|
||||||
+\fIdhcp-client-identifier\fR or \fIpxe-client-id\fR options,
|
|
||||||
+by matching the \fIhardware\fR
|
|
||||||
parameter in the \fIhost\fR declaration to the network hardware
|
|
||||||
address supplied by the client. BOOTP clients do not normally
|
|
||||||
provide a \fIdhcp-client-identifier\fR, so the hardware address must
|
|
||||||
@@ -1602,7 +1604,8 @@ to identify hosts.
|
|
||||||
.PP
|
|
||||||
Please be aware that
|
|
||||||
.B only
|
|
||||||
-the \fIdhcp-client-identifier\fR option and the hardware address can be
|
|
||||||
+the \fIdhcp-client-identifier\fR and \fIpxe-client-id\fR
|
|
||||||
+options and the hardware address can be
|
|
||||||
used to match a host declaration, or the \fIhost-identifier option\fR
|
|
||||||
parameter for DHCPv6 servers. For example, it is not possible to
|
|
||||||
match a host declaration to a \fIhost-name\fR option. This is
|
|
||||||
diff -up dhcp-4.3.5b1/server/dhcpleasequery.c.option97 dhcp-4.3.5b1/server/dhcpleasequery.c
|
|
||||||
--- dhcp-4.3.5b1/server/dhcpleasequery.c.option97 2016-08-26 20:19:53.000000000 +0200
|
|
||||||
+++ dhcp-4.3.5b1/server/dhcpleasequery.c 2016-09-12 17:17:13.974691043 +0200
|
|
||||||
@@ -273,7 +273,7 @@ dhcpleasequery(struct packet *packet, in
|
|
||||||
*/
|
|
||||||
|
|
||||||
memset(&uid, 0, sizeof(uid));
|
|
||||||
- if (get_option(&uid,
|
|
||||||
+ i = get_option(&uid,
|
|
||||||
&dhcp_universe,
|
|
||||||
packet,
|
|
||||||
NULL,
|
|
||||||
@@ -283,8 +283,20 @@ dhcpleasequery(struct packet *packet, in
|
|
||||||
packet->options,
|
|
||||||
&global_scope,
|
|
||||||
DHO_DHCP_CLIENT_IDENTIFIER,
|
|
||||||
- MDL)) {
|
|
||||||
-
|
|
||||||
+ MDL);
|
|
||||||
+ if (!i)
|
|
||||||
+ i = get_option(&uid,
|
|
||||||
+ &dhcp_universe,
|
|
||||||
+ packet,
|
|
||||||
+ NULL,
|
|
||||||
+ NULL,
|
|
||||||
+ packet->options,
|
|
||||||
+ NULL,
|
|
||||||
+ packet->options,
|
|
||||||
+ &global_scope,
|
|
||||||
+ DHO_PXE_CLIENT_ID,
|
|
||||||
+ MDL);
|
|
||||||
+ if (i) {
|
|
||||||
snprintf(dbg_info,
|
|
||||||
sizeof(dbg_info),
|
|
||||||
"client-id %s",
|
|
||||||
diff -up dhcp-4.3.5b1/server/failover.c.option97 dhcp-4.3.5b1/server/failover.c
|
|
||||||
--- dhcp-4.3.5b1/server/failover.c.option97 2016-08-26 20:19:53.000000000 +0200
|
|
||||||
+++ dhcp-4.3.5b1/server/failover.c 2016-09-12 17:17:13.975691044 +0200
|
|
||||||
@@ -5957,6 +5957,9 @@ int load_balance_mine (struct packet *pa
|
|
||||||
|
|
||||||
oc = lookup_option(&dhcp_universe, packet->options,
|
|
||||||
DHO_DHCP_CLIENT_IDENTIFIER);
|
|
||||||
+ if (!oc)
|
|
||||||
+ oc = lookup_option(&dhcp_universe, packet -> options,
|
|
||||||
+ DHO_PXE_CLIENT_ID);
|
|
||||||
memset(&ds, 0, sizeof ds);
|
|
||||||
if (oc &&
|
|
||||||
evaluate_option_cache(&ds, packet, NULL, NULL,
|
|
||||||
diff -up dhcp-4.3.5b1/server/mdb.c.option97 dhcp-4.3.5b1/server/mdb.c
|
|
||||||
--- dhcp-4.3.5b1/server/mdb.c.option97 2016-08-26 20:19:53.000000000 +0200
|
|
||||||
+++ dhcp-4.3.5b1/server/mdb.c 2016-09-12 17:17:13.975691044 +0200
|
|
||||||
@@ -129,8 +129,9 @@ static int find_uid_statement (struct ex
|
|
||||||
esp -> data.option &&
|
|
||||||
(esp -> data.option -> option -> universe ==
|
|
||||||
&dhcp_universe) &&
|
|
||||||
- (esp -> data.option -> option -> code ==
|
|
||||||
- DHO_DHCP_CLIENT_IDENTIFIER)) {
|
|
||||||
+ ((esp -> data.option -> option -> code ==
|
|
||||||
+ DHO_DHCP_CLIENT_IDENTIFIER) ||
|
|
||||||
+ (esp -> data.option -> option -> code == DHO_PXE_CLIENT_ID))) {
|
|
||||||
if (condp) {
|
|
||||||
log_error ("dhcp client identifier may not be %s",
|
|
||||||
"specified conditionally.");
|
|
@ -1,38 +0,0 @@
|
|||||||
diff -up dhcp-4.3.0a1/doc/examples/dhcpd-dhcpv6.conf.paths dhcp-4.3.0a1/doc/examples/dhcpd-dhcpv6.conf
|
|
||||||
--- dhcp-4.3.0a1/doc/examples/dhcpd-dhcpv6.conf.paths 2013-11-07 20:15:08.000000000 +0100
|
|
||||||
+++ dhcp-4.3.0a1/doc/examples/dhcpd-dhcpv6.conf 2013-12-19 15:34:16.262247711 +0100
|
|
||||||
@@ -42,7 +42,7 @@ option dhcp6.domain-search "test.example
|
|
||||||
option dhcp6.info-refresh-time 21600;
|
|
||||||
|
|
||||||
# The path of the lease file
|
|
||||||
-dhcpv6-lease-file-name "/usr/local/var/db/dhcpd6.leases";
|
|
||||||
+dhcpv6-lease-file-name "/var/lib/dhcpd/dhcpd6.leases";
|
|
||||||
|
|
||||||
# Static definition (must be global)
|
|
||||||
host myclient {
|
|
||||||
diff -up dhcp-4.3.0a1/includes/dhcpd.h.paths dhcp-4.3.0a1/includes/dhcpd.h
|
|
||||||
--- dhcp-4.3.0a1/includes/dhcpd.h.paths 2013-12-19 15:34:16.253247840 +0100
|
|
||||||
+++ dhcp-4.3.0a1/includes/dhcpd.h 2013-12-19 15:34:16.263247697 +0100
|
|
||||||
@@ -1429,7 +1429,7 @@ typedef unsigned char option_mask [16];
|
|
||||||
#else /* !DEBUG */
|
|
||||||
|
|
||||||
#ifndef _PATH_DHCPD_CONF
|
|
||||||
-#define _PATH_DHCPD_CONF "/etc/dhcpd.conf"
|
|
||||||
+#define _PATH_DHCPD_CONF "/etc/dhcp/dhcpd.conf"
|
|
||||||
#endif /* DEBUG */
|
|
||||||
|
|
||||||
#ifndef _PATH_DHCPD_DB
|
|
||||||
@@ -1451,11 +1451,11 @@ typedef unsigned char option_mask [16];
|
|
||||||
#endif /* DEBUG */
|
|
||||||
|
|
||||||
#ifndef _PATH_DHCLIENT_CONF
|
|
||||||
-#define _PATH_DHCLIENT_CONF "/etc/dhclient.conf"
|
|
||||||
+#define _PATH_DHCLIENT_CONF "/etc/dhcp/dhclient.conf"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _PATH_DHCLIENT_SCRIPT
|
|
||||||
-#define _PATH_DHCLIENT_SCRIPT "/sbin/dhclient-script"
|
|
||||||
+#define _PATH_DHCLIENT_SCRIPT "/usr/sbin/dhclient-script"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _PATH_DHCLIENT_PID
|
|
@ -1,351 +0,0 @@
|
|||||||
From 2698385647a6ebd58b5d25147333e494c3da2409 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Petr Mensik <pemensik@redhat.com>
|
|
||||||
Date: Fri, 9 Feb 2018 15:24:53 +0100
|
|
||||||
Subject: [PATCH] Support for isc-config.sh script on --with-libbind parameter
|
|
||||||
|
|
||||||
Move checks only to isc-config section
|
|
||||||
|
|
||||||
Fix detection of bind flags from config
|
|
||||||
|
|
||||||
Add support for with-libbind=config, Improve help message
|
|
||||||
---
|
|
||||||
client/Makefile.am | 5 ++-
|
|
||||||
client/tests/Makefile.am | 8 ++---
|
|
||||||
common/tests/Makefile.am | 14 +++-----
|
|
||||||
configure.ac | 84 ++++++++++++++++++++++++++++++++++++++++++------
|
|
||||||
dhcpctl/Makefile.am | 8 ++---
|
|
||||||
omapip/Makefile.am | 5 ++-
|
|
||||||
relay/Makefile.am | 5 ++-
|
|
||||||
server/Makefile.am | 6 ++--
|
|
||||||
server/tests/Makefile.am | 9 +++---
|
|
||||||
9 files changed, 98 insertions(+), 46 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/client/Makefile.am b/client/Makefile.am
|
|
||||||
index 2cb83d8..b85f5d2 100644
|
|
||||||
--- a/client/Makefile.am
|
|
||||||
+++ b/client/Makefile.am
|
|
||||||
@@ -4,7 +4,7 @@
|
|
||||||
# production code. Sadly, we are not there yet.
|
|
||||||
SUBDIRS = . tests
|
|
||||||
|
|
||||||
-BINDLIBDIR = @BINDDIR@/lib
|
|
||||||
+BIND_LIBS = @BIND_LIBS@
|
|
||||||
|
|
||||||
AM_CPPFLAGS = -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \
|
|
||||||
-DLOCALSTATEDIR='"$(localstatedir)"'
|
|
||||||
@@ -15,7 +15,6 @@ dhclient_SOURCES = clparse.c dhclient.c dhc6.c \
|
|
||||||
scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
|
|
||||||
scripts/netbsd scripts/nextstep scripts/openbsd \
|
|
||||||
scripts/solaris scripts/openwrt
|
|
||||||
-dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
|
|
||||||
- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
|
|
||||||
+dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a $(BIND_LIBS)
|
|
||||||
man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
|
|
||||||
EXTRA_DIST = $(man_MANS)
|
|
||||||
diff --git a/client/tests/Makefile.am b/client/tests/Makefile.am
|
|
||||||
index 5031d0c..bb1fda4 100644
|
|
||||||
--- a/client/tests/Makefile.am
|
|
||||||
+++ b/client/tests/Makefile.am
|
|
||||||
@@ -1,9 +1,9 @@
|
|
||||||
SUBDIRS = .
|
|
||||||
|
|
||||||
-BINDLIBDIR = @BINDDIR@/lib
|
|
||||||
+BIND_LIBS = @BIND_LIBS@
|
|
||||||
|
|
||||||
AM_CPPFLAGS = $(ATF_CFLAGS) -DUNIT_TEST -I$(top_srcdir)/includes
|
|
||||||
-AM_CPPFLAGS += -I@BINDDIR@/include -I$(top_srcdir)
|
|
||||||
+AM_CPPFLAGS += @BIND_CPPFLAGS@ -I$(top_srcdir)
|
|
||||||
AM_CPPFLAGS += -DLOCALSTATEDIR='"."'
|
|
||||||
AM_CPPFLAGS += -DCLIENT_PATH='"."'
|
|
||||||
|
|
||||||
@@ -18,9 +18,7 @@ info:
|
|
||||||
DHCPSRC = ../clparse.c ../dhc6.c ../dhclient.c
|
|
||||||
|
|
||||||
DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.a \
|
|
||||||
- $(top_builddir)/dhcpctl/libdhcpctl.a $(BINDLIBDIR)/libirs.a \
|
|
||||||
- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a \
|
|
||||||
- $(BINDLIBDIR)/libisc.a
|
|
||||||
+ $(top_builddir)/dhcpctl/libdhcpctl.a $(BIND_LIBS)
|
|
||||||
|
|
||||||
ATF_TESTS =
|
|
||||||
if HAVE_ATF
|
|
||||||
diff --git a/common/tests/Makefile.am b/common/tests/Makefile.am
|
|
||||||
index f6a43e4..196aa44 100644
|
|
||||||
--- a/common/tests/Makefile.am
|
|
||||||
+++ b/common/tests/Makefile.am
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
SUBDIRS = .
|
|
||||||
|
|
||||||
-BINDLIBDIR = @BINDDIR@/lib
|
|
||||||
+BIND_LIBS = @BIND_LIBS@
|
|
||||||
|
|
||||||
AM_CPPFLAGS = $(ATF_CFLAGS) -I$(top_srcdir)/includes
|
|
||||||
|
|
||||||
@@ -15,26 +15,22 @@ ATF_TESTS += alloc_unittest dns_unittest misc_unittest ns_name_unittest
|
|
||||||
alloc_unittest_SOURCES = test_alloc.c $(top_srcdir)/tests/t_api_dhcp.c
|
|
||||||
alloc_unittest_LDADD = $(ATF_LDFLAGS)
|
|
||||||
alloc_unittest_LDADD += ../libdhcp.a \
|
|
||||||
- ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
|
|
||||||
- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
|
|
||||||
+ ../../omapip/libomapi.a $(BIND_LIBS)
|
|
||||||
|
|
||||||
dns_unittest_SOURCES = dns_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
|
|
||||||
dns_unittest_LDADD = $(ATF_LDFLAGS)
|
|
||||||
dns_unittest_LDADD += ../libdhcp.a \
|
|
||||||
- ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
|
|
||||||
- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
|
|
||||||
+ ../../omapip/libomapi.a $(BIND_LIBS)
|
|
||||||
|
|
||||||
misc_unittest_SOURCES = misc_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
|
|
||||||
misc_unittest_LDADD = $(ATF_LDFLAGS)
|
|
||||||
misc_unittest_LDADD += ../libdhcp.a \
|
|
||||||
- ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
|
|
||||||
- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
|
|
||||||
+ ../../omapip/libomapi.a $(BIND_LIBS)
|
|
||||||
|
|
||||||
ns_name_unittest_SOURCES = ns_name_test.c $(top_srcdir)/tests/t_api_dhcp.c
|
|
||||||
ns_name_unittest_LDADD = $(ATF_LDFLAGS)
|
|
||||||
ns_name_unittest_LDADD += ../libdhcp.a \
|
|
||||||
- ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
|
|
||||||
- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
|
|
||||||
+ ../../omapip/libomapi.a $(BIND_LIBS)
|
|
||||||
|
|
||||||
check: $(ATF_TESTS)
|
|
||||||
@if test $(top_srcdir) != ${top_builddir}; then \
|
|
||||||
diff --git a/configure.ac b/configure.ac
|
|
||||||
index cdfa352..ef55f8d 100644
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -688,8 +688,12 @@ AC_CHECK_MEMBER(struct tpacket_auxdata.tp_vlan_tci,
|
|
||||||
|
|
||||||
BINDDIR=
|
|
||||||
BINDSRCDIR=
|
|
||||||
+BIND_CONFIG=
|
|
||||||
+BIND_CPPFLAGS=
|
|
||||||
+BIND_LIBS=
|
|
||||||
AC_ARG_WITH(libbind,
|
|
||||||
- AS_HELP_STRING([--with-libbind=PATH],[bind includes and libraries are in PATH
|
|
||||||
+ AS_HELP_STRING([--with-libbind=PATH|config],[bind includes and libraries are in PATH.
|
|
||||||
+ Use config to obtain libraries from isc-config.sh.
|
|
||||||
(default is ./bind)]),
|
|
||||||
use_libbind="$withval", use_libbind="no")
|
|
||||||
case "$use_libbind" in
|
|
||||||
@@ -701,23 +705,85 @@ no)
|
|
||||||
BINDDIR="\${top_srcdir}/bind"
|
|
||||||
BINDSRCDIR="\${top_srcdir}/bind"
|
|
||||||
;;
|
|
||||||
+config)
|
|
||||||
+ AC_PATH_PROG(BIND_CONFIG, [isc-config.sh bind9-config])
|
|
||||||
+ ;;
|
|
||||||
*)
|
|
||||||
- BINDDIR="$use_libbind"
|
|
||||||
- if test ! -d "$srcdir/bind"; then
|
|
||||||
- # no bind directory, create it with a fake Makefile.in
|
|
||||||
- # (AC_CONFIG_FILES and top Makefile refer to it so
|
|
||||||
- # it must exits)
|
|
||||||
- mkdir $srcdir/bind
|
|
||||||
- cat > $srcdir/bind/Makefile.in << EOF
|
|
||||||
+ if test -f "$use_libbind" -a -x "$use_libbind"; then
|
|
||||||
+ # passed full path of isc-config.sh
|
|
||||||
+ BIND_CONFIG="$use_libbind"
|
|
||||||
+ else
|
|
||||||
+ BINDDIR="$use_libbind"
|
|
||||||
+ if test ! -d "$srcdir/bind"; then
|
|
||||||
+ # no bind directory, create it with a fake Makefile.in
|
|
||||||
+ # (AC_CONFIG_FILES and top Makefile refer to it so
|
|
||||||
+ # it must exits)
|
|
||||||
+ mkdir $srcdir/bind
|
|
||||||
+ cat > $srcdir/bind/Makefile.in << EOF
|
|
||||||
# placeholder
|
|
||||||
all check clean distclean distdir install uninstall:
|
|
||||||
|
|
||||||
EOF
|
|
||||||
+ fi
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
+if test -z "$BIND_CONFIG"; then
|
|
||||||
+ BIND_CPPFLAGS="-I${BINDDIR}/include"
|
|
||||||
+ BIND_LIBDIR="${BINDDIR}/lib"
|
|
||||||
+ BIND_LIBS="$(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a"
|
|
||||||
+else
|
|
||||||
+ BIND_CPPFLAGS=`$BIND_CONFIG --cflags`
|
|
||||||
+ BIND_LIBS=`$BIND_CONFIG --libs irs dns isccfg isc`
|
|
||||||
+
|
|
||||||
+ # bind is already built
|
|
||||||
+ AC_CHECKING([Checking bind libraries have no thread support])
|
|
||||||
+ saved_libs="$LIBS"
|
|
||||||
+ saved_CPPFLAGS="$CPPFLAGS"
|
|
||||||
+ CPPFLAGS="${CPPFLAGS} ${BIND_CPPFLAGS}"
|
|
||||||
+ LIBS="${LIBS} ${BIND_LIBS}"
|
|
||||||
+AC_TRY_LINK([
|
|
||||||
+#include <isc/bind9.h>
|
|
||||||
+#include <isc/lib.h>
|
|
||||||
+],[
|
|
||||||
+#ifdef BIND9
|
|
||||||
+#error Export BIND library has to be used with BIND version up to 9.9
|
|
||||||
+#endif
|
|
||||||
+isc_lib_register();
|
|
||||||
+], [AC_MSG_RESULT(Bind export library found)
|
|
||||||
+ BIND_EXPORT=yes], [BIND_EXPORT=no]
|
|
||||||
+)
|
|
||||||
+
|
|
||||||
+# Allow build with disabled threads for dhcp
|
|
||||||
+AC_TRY_LINK([
|
|
||||||
+#include <isc/platform.h>
|
|
||||||
+#include <isc/bind9.h>
|
|
||||||
+#include <isc/lib.h>
|
|
||||||
+],[
|
|
||||||
+#ifdef ISC_PLATFORM_USETHREADS
|
|
||||||
+#error Bind library must not be compiled with threads
|
|
||||||
+#endif
|
|
||||||
+isc_lib_register();
|
|
||||||
+if (isc_bind9 != 0) {}
|
|
||||||
+], [AC_MSG_RESULT(Bind single thread library found)
|
|
||||||
+ BIND_SINGLETHREAD=yes], [BIND_SINGLETHREAD=no]
|
|
||||||
+)
|
|
||||||
+
|
|
||||||
+ if test "x$BIND_EXPORT" != xyes -a "x$BIND_SINGLETHREADED" != xyes
|
|
||||||
+ then
|
|
||||||
+ AC_MSG_RESULT([BIND_CONFIG=${BIND_CONFIG}])
|
|
||||||
+ AC_MSG_RESULT([BIND_CPPFLAGS=${BIND_CPPFLAGS}])
|
|
||||||
+ AC_MSG_RESULT([BIND_LIBS=${BIND_LIBS}])
|
|
||||||
+ AC_MSG_ERROR([Bind libraries are not useable for dhcp])
|
|
||||||
+ fi
|
|
||||||
+ CPPFLAGS="$saved_CPPFLAGS"
|
|
||||||
+ LIBS="$saved_LIBS"
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
AC_SUBST(BINDDIR)
|
|
||||||
AC_SUBST(BINDSRCDIR)
|
|
||||||
+AC_SUBST(BIND_CPPFLAGS)
|
|
||||||
+AC_SUBST(BIND_LIBS)
|
|
||||||
|
|
||||||
# OpenLDAP support.
|
|
||||||
AC_ARG_WITH(ldap,
|
|
||||||
@@ -795,7 +861,7 @@ fi
|
|
||||||
CFLAGS="$CFLAGS $STD_CWARNINGS"
|
|
||||||
|
|
||||||
# Try to add the bind and dhcp include directories
|
|
||||||
-CFLAGS="$CFLAGS -I\$(top_srcdir)/includes -I$BINDDIR/include"
|
|
||||||
+CFLAGS="$CFLAGS -I\$(top_srcdir)/includes $BIND_CPPFLAGS"
|
|
||||||
|
|
||||||
case "$host" in
|
|
||||||
*-darwin*)
|
|
||||||
diff --git a/dhcpctl/Makefile.am b/dhcpctl/Makefile.am
|
|
||||||
index ceb0de1..fa20a78 100644
|
|
||||||
--- a/dhcpctl/Makefile.am
|
|
||||||
+++ b/dhcpctl/Makefile.am
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-BINDLIBDIR = @BINDDIR@/lib
|
|
||||||
+BIND_LIBS = @BIND_LIBS@
|
|
||||||
|
|
||||||
bin_PROGRAMS = omshell
|
|
||||||
lib_LIBRARIES = libdhcpctl.a
|
|
||||||
@@ -8,12 +8,10 @@ EXTRA_DIST = $(man_MANS)
|
|
||||||
|
|
||||||
omshell_SOURCES = omshell.c
|
|
||||||
omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
|
|
||||||
- $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
|
|
||||||
- $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
|
|
||||||
+ $(BIND_LIBS)
|
|
||||||
|
|
||||||
libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c
|
|
||||||
|
|
||||||
cltest_SOURCES = cltest.c
|
|
||||||
cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
|
|
||||||
- $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
|
|
||||||
- $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
|
|
||||||
+ $(BIND_LIBS)
|
|
||||||
diff --git a/omapip/Makefile.am b/omapip/Makefile.am
|
|
||||||
index 446a594..b0d2680 100644
|
|
||||||
--- a/omapip/Makefile.am
|
|
||||||
+++ b/omapip/Makefile.am
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-BINDLIBDIR = @BINDDIR@/lib
|
|
||||||
+BIND_LIBS = @BIND_LIBS@
|
|
||||||
|
|
||||||
lib_LIBRARIES = libomapi.a
|
|
||||||
noinst_PROGRAMS = svtest
|
|
||||||
@@ -12,6 +12,5 @@ man_MANS = omapi.3
|
|
||||||
EXTRA_DIST = $(man_MANS)
|
|
||||||
|
|
||||||
svtest_SOURCES = test.c
|
|
||||||
-svtest_LDADD = libomapi.a $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
|
|
||||||
- $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
|
|
||||||
+svtest_LDADD = libomapi.a $(BIND_LIBS)
|
|
||||||
|
|
||||||
diff --git a/relay/Makefile.am b/relay/Makefile.am
|
|
||||||
index 3060eca..c9a1cba 100644
|
|
||||||
--- a/relay/Makefile.am
|
|
||||||
+++ b/relay/Makefile.am
|
|
||||||
@@ -1,12 +1,11 @@
|
|
||||||
-BINDLIBDIR = @BINDDIR@/lib
|
|
||||||
+BIND_LIBS = @BIND_LIBS@
|
|
||||||
|
|
||||||
AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"'
|
|
||||||
|
|
||||||
sbin_PROGRAMS = dhcrelay
|
|
||||||
dhcrelay_SOURCES = dhcrelay.c
|
|
||||||
dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
|
|
||||||
- $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
|
|
||||||
- $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
|
|
||||||
+ $(BIND_LIBS)
|
|
||||||
man_MANS = dhcrelay.8
|
|
||||||
EXTRA_DIST = $(man_MANS)
|
|
||||||
|
|
||||||
diff --git a/server/Makefile.am b/server/Makefile.am
|
|
||||||
index 54feedf..30cf2b1 100644
|
|
||||||
--- a/server/Makefile.am
|
|
||||||
+++ b/server/Makefile.am
|
|
||||||
@@ -4,7 +4,7 @@
|
|
||||||
# production code. Sadly, we are not there yet.
|
|
||||||
SUBDIRS = . tests
|
|
||||||
|
|
||||||
-BINDLIBDIR = @BINDDIR@/lib
|
|
||||||
+BIND_LIBS = @BIND_LIBS@
|
|
||||||
|
|
||||||
AM_CPPFLAGS = -I.. -DLOCALSTATEDIR='"@localstatedir@"'
|
|
||||||
|
|
||||||
@@ -16,9 +16,7 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c confpars.c db.c class.c failover.c \
|
|
||||||
|
|
||||||
dhcpd_CFLAGS = $(LDAP_CFLAGS)
|
|
||||||
dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
|
|
||||||
- ../dhcpctl/libdhcpctl.a $(BINDLIBDIR)/libirs.a \
|
|
||||||
- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a \
|
|
||||||
- $(BINDLIBDIR)/libisc.a $(LDAP_LIBS)
|
|
||||||
+ ../dhcpctl/libdhcpctl.a $(BIND_LIBS) $(LDAP_LIBS)
|
|
||||||
|
|
||||||
man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
|
|
||||||
EXTRA_DIST = $(man_MANS)
|
|
||||||
diff --git a/server/tests/Makefile.am b/server/tests/Makefile.am
|
|
||||||
index a87c5e7..771de06 100644
|
|
||||||
--- a/server/tests/Makefile.am
|
|
||||||
+++ b/server/tests/Makefile.am
|
|
||||||
@@ -1,9 +1,10 @@
|
|
||||||
SUBDIRS = .
|
|
||||||
|
|
||||||
-BINDLIBDIR = @BINDDIR@/lib
|
|
||||||
+BIND_LIBS = @BIND_LIBS@
|
|
||||||
+
|
|
||||||
|
|
||||||
AM_CPPFLAGS = $(ATF_CFLAGS) -DUNIT_TEST -I$(top_srcdir)/includes
|
|
||||||
-AM_CPPFLAGS += -I@BINDDIR@/include -I$(top_srcdir)
|
|
||||||
+AM_CPPFLAGS += $(BIND_CPPFLAGS) -I$(top_srcdir)
|
|
||||||
AM_CPPFLAGS += -DLOCALSTATEDIR='"."'
|
|
||||||
|
|
||||||
EXTRA_DIST = Atffile
|
|
||||||
@@ -20,9 +21,7 @@ DHCPSRC = ../dhcp.c ../bootp.c ../confpars.c ../db.c ../class.c \
|
|
||||||
../ldap.c ../ldap_casa.c ../dhcpd.c ../leasechain.c
|
|
||||||
|
|
||||||
DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.a \
|
|
||||||
- $(top_builddir)/dhcpctl/libdhcpctl.a $(BINDLIBDIR)/libirs.a \
|
|
||||||
- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a \
|
|
||||||
- $(BINDLIBDIR)/libisc.a
|
|
||||||
+ $(top_builddir)/dhcpctl/libdhcpctl.a $(BIND_LIBS)
|
|
||||||
|
|
||||||
ATF_TESTS =
|
|
||||||
if HAVE_ATF
|
|
||||||
--
|
|
||||||
2.14.3
|
|
||||||
|
|
@ -1,79 +0,0 @@
|
|||||||
diff -up dhcp-4.3.4/configure.ac.sd_notify dhcp-4.3.4/configure.ac
|
|
||||||
--- dhcp-4.3.4/configure.ac.sd_notify 2016-04-29 13:08:52.813287060 +0200
|
|
||||||
+++ dhcp-4.3.4/configure.ac 2016-04-29 13:08:52.872287075 +0200
|
|
||||||
@@ -832,6 +832,17 @@ if test x$ldap = xyes || test x$ldapcryp
|
|
||||||
AC_SUBST(LDAP_CFLAGS, [$LDAP_CFLAGS])
|
|
||||||
fi
|
|
||||||
|
|
||||||
+AC_ARG_WITH(systemd,
|
|
||||||
+ AC_HELP_STRING([--with-systemd],
|
|
||||||
+ [enable sending status notifications to systemd daemon (default is no)]),
|
|
||||||
+ [systemd=$withval],
|
|
||||||
+ [systemd=no])
|
|
||||||
+
|
|
||||||
+if test x$systemd = xyes ; then
|
|
||||||
+ AC_CHECK_LIB(systemd, sd_notifyf, ,
|
|
||||||
+ AC_MSG_FAILURE([*** systemd library not present - do you need to install systemd-libs package?]))
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
# Append selected warning levels to CFLAGS before substitution (but after
|
|
||||||
# AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[],[]) & etc).
|
|
||||||
CFLAGS="$CFLAGS $STD_CWARNINGS"
|
|
||||||
diff -up dhcp-4.3.4/relay/dhcrelay.c.sd_notify dhcp-4.3.4/relay/dhcrelay.c
|
|
||||||
--- dhcp-4.3.4/relay/dhcrelay.c.sd_notify 2016-04-29 13:08:52.814287061 +0200
|
|
||||||
+++ dhcp-4.3.4/relay/dhcrelay.c 2016-04-29 13:08:52.872287075 +0200
|
|
||||||
@@ -37,6 +37,10 @@
|
|
||||||
int keep_capabilities = 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#ifdef HAVE_LIBSYSTEMD
|
|
||||||
+#include <systemd/sd-daemon.h>
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
TIME default_lease_time = 43200; /* 12 hours... */
|
|
||||||
TIME max_lease_time = 86400; /* 24 hours... */
|
|
||||||
struct tree_cache *global_options[256];
|
|
||||||
@@ -709,6 +713,14 @@ main(int argc, char **argv) {
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#ifdef HAVE_LIBSYSTEMD
|
|
||||||
+ /* We are ready to process incomming packets. Let's notify systemd */
|
|
||||||
+ sd_notifyf(0, "READY=1\n"
|
|
||||||
+ "STATUS=Dispatching packets...\n"
|
|
||||||
+ "MAINPID=%lu",
|
|
||||||
+ (unsigned long) getpid());
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
/* Start dispatching packets and timeouts... */
|
|
||||||
dispatch();
|
|
||||||
|
|
||||||
diff -up dhcp-4.3.4/server/dhcpd.c.sd_notify dhcp-4.3.4/server/dhcpd.c
|
|
||||||
--- dhcp-4.3.4/server/dhcpd.c.sd_notify 2016-04-29 13:08:52.873287075 +0200
|
|
||||||
+++ dhcp-4.3.4/server/dhcpd.c 2016-04-29 13:12:00.655333096 +0200
|
|
||||||
@@ -57,6 +57,10 @@ uid_t set_uid = 0;
|
|
||||||
gid_t set_gid = 0;
|
|
||||||
#endif /* PARANOIA */
|
|
||||||
|
|
||||||
+#ifdef HAVE_LIBSYSTEMD
|
|
||||||
+#include <systemd/sd-daemon.h>
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
struct iaddr server_identifier;
|
|
||||||
int server_identifier_matched;
|
|
||||||
|
|
||||||
@@ -931,6 +935,14 @@ main(int argc, char **argv) {
|
|
||||||
/* Log that we are about to start working */
|
|
||||||
log_info("Server starting service.");
|
|
||||||
|
|
||||||
+#ifdef HAVE_LIBSYSTEMD
|
|
||||||
+ /* We are ready to process incomming packets. Let's notify systemd */
|
|
||||||
+ sd_notifyf(0, "READY=1\n"
|
|
||||||
+ "STATUS=Dispatching packets...\n"
|
|
||||||
+ "MAINPID=%lu",
|
|
||||||
+ (unsigned long) getpid());
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
/*
|
|
||||||
* Receive packets and dispatch them...
|
|
||||||
* dispatch() will never return.
|
|
@ -1,231 +0,0 @@
|
|||||||
diff -up dhcp-4.3.4/client/dhc6.c.sendDecline dhcp-4.3.4/client/dhc6.c
|
|
||||||
--- dhcp-4.3.4/client/dhc6.c.sendDecline 2016-03-22 14:16:51.000000000 +0100
|
|
||||||
+++ dhcp-4.3.4/client/dhc6.c 2016-05-02 14:51:57.916578401 +0200
|
|
||||||
@@ -115,6 +115,8 @@ void do_select6(void *input);
|
|
||||||
void do_refresh6(void *input);
|
|
||||||
static void do_release6(void *input);
|
|
||||||
static void start_bound(struct client_state *client);
|
|
||||||
+static void start_decline6(struct client_state *client);
|
|
||||||
+static void do_decline6(void *input);
|
|
||||||
static void start_informed(struct client_state *client);
|
|
||||||
void informed_handler(struct packet *packet, struct client_state *client);
|
|
||||||
void bound_handler(struct packet *packet, struct client_state *client);
|
|
||||||
@@ -2314,6 +2316,7 @@ start_release6(struct client_state *clie
|
|
||||||
cancel_timeout(do_select6, client);
|
|
||||||
cancel_timeout(do_refresh6, client);
|
|
||||||
cancel_timeout(do_release6, client);
|
|
||||||
+ cancel_timeout(do_decline6, client);
|
|
||||||
client->state = S_STOPPED;
|
|
||||||
|
|
||||||
/*
|
|
||||||
@@ -2968,6 +2971,7 @@ dhc6_check_reply(struct client_state *cl
|
|
||||||
break;
|
|
||||||
|
|
||||||
case S_STOPPED:
|
|
||||||
+ case S_DECLINED:
|
|
||||||
action = dhc6_stop_action;
|
|
||||||
break;
|
|
||||||
|
|
||||||
@@ -3084,6 +3088,7 @@ dhc6_check_reply(struct client_state *cl
|
|
||||||
break;
|
|
||||||
|
|
||||||
case S_STOPPED:
|
|
||||||
+ case S_DECLINED:
|
|
||||||
/* Nothing critical to do at this stage. */
|
|
||||||
break;
|
|
||||||
|
|
||||||
@@ -4214,17 +4219,23 @@ reply_handler(struct packet *packet, str
|
|
||||||
cancel_timeout(do_select6, client);
|
|
||||||
cancel_timeout(do_refresh6, client);
|
|
||||||
cancel_timeout(do_release6, client);
|
|
||||||
+ cancel_timeout(do_decline6, client);
|
|
||||||
|
|
||||||
/* If this is in response to a Release/Decline, clean up and return. */
|
|
||||||
- if (client->state == S_STOPPED) {
|
|
||||||
- if (client->active_lease == NULL)
|
|
||||||
- return;
|
|
||||||
+ if ((client->state == S_STOPPED) ||
|
|
||||||
+ (client->state == S_DECLINED)) {
|
|
||||||
+
|
|
||||||
+ if (client->active_lease != NULL) {
|
|
||||||
+ dhc6_lease_destroy(&client->active_lease, MDL);
|
|
||||||
+ client->active_lease = NULL;
|
|
||||||
+ /* We should never wait for nothing!? */
|
|
||||||
+ if (stopping_finished())
|
|
||||||
+ exit(0);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (client->state == S_DECLINED)
|
|
||||||
+ start_init6(client);
|
|
||||||
|
|
||||||
- dhc6_lease_destroy(&client->active_lease, MDL);
|
|
||||||
- client->active_lease = NULL;
|
|
||||||
- /* We should never wait for nothing!? */
|
|
||||||
- if (stopping_finished())
|
|
||||||
- exit(0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -4798,7 +4809,11 @@ start_bound(struct client_state *client)
|
|
||||||
dhc6_marshall_values("new_", client, lease, ia, addr);
|
|
||||||
script_write_requested6(client);
|
|
||||||
|
|
||||||
- script_go(client);
|
|
||||||
+ // when script returns 3, DAD failed
|
|
||||||
+ if (script_go(client) == 3) {
|
|
||||||
+ start_decline6(client);
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
/* XXX: maybe we should loop on the old values instead? */
|
|
||||||
@@ -4851,6 +4866,149 @@ start_bound(struct client_state *client)
|
|
||||||
dhc6_check_times(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
+/*
|
|
||||||
+ * Decline addresses.
|
|
||||||
+ */
|
|
||||||
+void
|
|
||||||
+start_decline6(struct client_state *client)
|
|
||||||
+{
|
|
||||||
+ /* Cancel any pending transmissions */
|
|
||||||
+ cancel_timeout(do_confirm6, client);
|
|
||||||
+ cancel_timeout(do_select6, client);
|
|
||||||
+ cancel_timeout(do_refresh6, client);
|
|
||||||
+ cancel_timeout(do_release6, client);
|
|
||||||
+ cancel_timeout(do_decline6, client);
|
|
||||||
+ client->state = S_DECLINED;
|
|
||||||
+
|
|
||||||
+ if (client->active_lease == NULL)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ /* Set timers per RFC3315 section 18.1.7. */
|
|
||||||
+ client->IRT = DEC_TIMEOUT * 100;
|
|
||||||
+ client->MRT = 0;
|
|
||||||
+ client->MRC = DEC_MAX_RC;
|
|
||||||
+ client->MRD = 0;
|
|
||||||
+
|
|
||||||
+ dhc6_retrans_init(client);
|
|
||||||
+ client->v6_handler = reply_handler;
|
|
||||||
+
|
|
||||||
+ client->refresh_type = DHCPV6_DECLINE;
|
|
||||||
+ do_decline6(client);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/*
|
|
||||||
+ * do_decline6() creates a Decline packet and transmits it.
|
|
||||||
+ */
|
|
||||||
+static void
|
|
||||||
+do_decline6(void *input)
|
|
||||||
+{
|
|
||||||
+ struct client_state *client;
|
|
||||||
+ struct data_string ds;
|
|
||||||
+ struct timeval elapsed, tv;
|
|
||||||
+ int send_ret, added;
|
|
||||||
+
|
|
||||||
+ client = input;
|
|
||||||
+
|
|
||||||
+ if ((client->active_lease == NULL) || !active_prefix(client))
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ if ((client->MRC != 0) && (client->txcount > client->MRC)) {
|
|
||||||
+ log_info("Max retransmission count exceeded.");
|
|
||||||
+ goto decline_done;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ /*
|
|
||||||
+ * Start_time starts at the first transmission.
|
|
||||||
+ */
|
|
||||||
+ if (client->txcount == 0) {
|
|
||||||
+ client->start_time.tv_sec = cur_tv.tv_sec;
|
|
||||||
+ client->start_time.tv_usec = cur_tv.tv_usec;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ /* elapsed = cur - start */
|
|
||||||
+ elapsed.tv_sec = cur_tv.tv_sec - client->start_time.tv_sec;
|
|
||||||
+ elapsed.tv_usec = cur_tv.tv_usec - client->start_time.tv_usec;
|
|
||||||
+ if (elapsed.tv_usec < 0) {
|
|
||||||
+ elapsed.tv_sec -= 1;
|
|
||||||
+ elapsed.tv_usec += 1000000;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ memset(&ds, 0, sizeof(ds));
|
|
||||||
+ if (!buffer_allocate(&ds.buffer, 4, MDL)) {
|
|
||||||
+ log_error("Unable to allocate memory for Decline.");
|
|
||||||
+ goto decline_done;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ ds.data = ds.buffer->data;
|
|
||||||
+ ds.len = 4;
|
|
||||||
+ ds.buffer->data[0] = DHCPV6_DECLINE;
|
|
||||||
+ memcpy(ds.buffer->data + 1, client->dhcpv6_transaction_id, 3);
|
|
||||||
+
|
|
||||||
+ /* Form an elapsed option. */
|
|
||||||
+ /* Maximum value is 65535 1/100s coded as 0xffff. */
|
|
||||||
+ if ((elapsed.tv_sec < 0) || (elapsed.tv_sec > 655) ||
|
|
||||||
+ ((elapsed.tv_sec == 655) && (elapsed.tv_usec > 350000))) {
|
|
||||||
+ client->elapsed = 0xffff;
|
|
||||||
+ } else {
|
|
||||||
+ client->elapsed = elapsed.tv_sec * 100;
|
|
||||||
+ client->elapsed += elapsed.tv_usec / 10000;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ client->elapsed = htons(client->elapsed);
|
|
||||||
+
|
|
||||||
+ log_debug("XMT: Forming Decline.");
|
|
||||||
+ make_client6_options(client, &client->sent_options,
|
|
||||||
+ client->active_lease, DHCPV6_DECLINE);
|
|
||||||
+ dhcpv6_universe.encapsulate(&ds, NULL, NULL, client, NULL,
|
|
||||||
+ client->sent_options, &global_scope,
|
|
||||||
+ &dhcpv6_universe);
|
|
||||||
+
|
|
||||||
+ /* Append IA's (but don't release temporary addresses). */
|
|
||||||
+ if (wanted_ia_na &&
|
|
||||||
+ dhc6_add_ia_na(client, &ds, client->active_lease,
|
|
||||||
+ DHCPV6_DECLINE, 0, &added) != ISC_R_SUCCESS) {
|
|
||||||
+ data_string_forget(&ds, MDL);
|
|
||||||
+ goto decline_done;
|
|
||||||
+ }
|
|
||||||
+ if (wanted_ia_pd &&
|
|
||||||
+ dhc6_add_ia_pd(client, &ds, client->active_lease,
|
|
||||||
+ DHCPV6_DECLINE, 0, &added) != ISC_R_SUCCESS) {
|
|
||||||
+ data_string_forget(&ds, MDL);
|
|
||||||
+ goto decline_done;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ /* Transmit and wait. */
|
|
||||||
+ log_info("XMT: Decline on %s, interval %ld0ms.",
|
|
||||||
+ client->name ? client->name : client->interface->name,
|
|
||||||
+ (long int)client->RT);
|
|
||||||
+
|
|
||||||
+ send_ret = send_packet6(client->interface, ds.data, ds.len,
|
|
||||||
+ &DHCPv6DestAddr);
|
|
||||||
+ if (send_ret != ds.len) {
|
|
||||||
+ log_error("dhc6: sendpacket6() sent %d of %d bytes",
|
|
||||||
+ send_ret, ds.len);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ data_string_forget(&ds, MDL);
|
|
||||||
+
|
|
||||||
+ /* Wait RT */
|
|
||||||
+ tv.tv_sec = cur_tv.tv_sec + client->RT / 100;
|
|
||||||
+ tv.tv_usec = cur_tv.tv_usec + (client->RT % 100) * 10000;
|
|
||||||
+ if (tv.tv_usec >= 1000000) {
|
|
||||||
+ tv.tv_sec += 1;
|
|
||||||
+ tv.tv_usec -= 1000000;
|
|
||||||
+ }
|
|
||||||
+ add_timeout(&tv, do_decline6, client, NULL, NULL);
|
|
||||||
+ dhc6_retrans_advance(client);
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+decline_done:
|
|
||||||
+ dhc6_lease_destroy(&client->active_lease, MDL);
|
|
||||||
+ client->active_lease = NULL;
|
|
||||||
+ start_init6(client);
|
|
||||||
+ return;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/* While bound, ignore packets. In the future we'll want to answer
|
|
||||||
* Reconfigure-Request messages and the like.
|
|
||||||
*/
|
|
@ -1,149 +0,0 @@
|
|||||||
diff --git a/client/Makefile.am b/client/Makefile.am
|
|
||||||
index b85f5d2..b1ecf82 100644
|
|
||||||
--- a/client/Makefile.am
|
|
||||||
+++ b/client/Makefile.am
|
|
||||||
@@ -15,6 +15,6 @@ dhclient_SOURCES = clparse.c dhclient.c dhc6.c \
|
|
||||||
scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
|
|
||||||
scripts/netbsd scripts/nextstep scripts/openbsd \
|
|
||||||
scripts/solaris scripts/openwrt
|
|
||||||
-dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a $(BIND_LIBS)
|
|
||||||
+dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.la $(BIND_LIBS)
|
|
||||||
man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
|
|
||||||
EXTRA_DIST = $(man_MANS)
|
|
||||||
diff --git a/common/tests/Makefile.am b/common/tests/Makefile.am
|
|
||||||
index 196aa44..1ccaa05 100644
|
|
||||||
--- a/common/tests/Makefile.am
|
|
||||||
+++ b/common/tests/Makefile.am
|
|
||||||
@@ -15,22 +15,22 @@ ATF_TESTS += alloc_unittest dns_unittest misc_unittest ns_name_unittest
|
|
||||||
alloc_unittest_SOURCES = test_alloc.c $(top_srcdir)/tests/t_api_dhcp.c
|
|
||||||
alloc_unittest_LDADD = $(ATF_LDFLAGS)
|
|
||||||
alloc_unittest_LDADD += ../libdhcp.a \
|
|
||||||
- ../../omapip/libomapi.a $(BIND_LIBS)
|
|
||||||
+ ../../omapip/libomapi.la $(BIND_LIBS)
|
|
||||||
|
|
||||||
dns_unittest_SOURCES = dns_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
|
|
||||||
dns_unittest_LDADD = $(ATF_LDFLAGS)
|
|
||||||
dns_unittest_LDADD += ../libdhcp.a \
|
|
||||||
- ../../omapip/libomapi.a $(BIND_LIBS)
|
|
||||||
+ ../../omapip/libomapi.la $(BIND_LIBS)
|
|
||||||
|
|
||||||
misc_unittest_SOURCES = misc_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
|
|
||||||
misc_unittest_LDADD = $(ATF_LDFLAGS)
|
|
||||||
misc_unittest_LDADD += ../libdhcp.a \
|
|
||||||
- ../../omapip/libomapi.a $(BIND_LIBS)
|
|
||||||
+ ../../omapip/libomapi.la $(BIND_LIBS)
|
|
||||||
|
|
||||||
ns_name_unittest_SOURCES = ns_name_test.c $(top_srcdir)/tests/t_api_dhcp.c
|
|
||||||
ns_name_unittest_LDADD = $(ATF_LDFLAGS)
|
|
||||||
ns_name_unittest_LDADD += ../libdhcp.a \
|
|
||||||
- ../../omapip/libomapi.a $(BIND_LIBS)
|
|
||||||
+ ../../omapip/libomapi.la $(BIND_LIBS)
|
|
||||||
|
|
||||||
check: $(ATF_TESTS)
|
|
||||||
@if test $(top_srcdir) != ${top_builddir}; then \
|
|
||||||
diff --git a/configure.ac b/configure.ac
|
|
||||||
index f594cfa..adc98a8 100644
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -47,7 +47,8 @@ AM_CONDITIONAL(CROSS_COMPILING, test "$cross_compiling" = "yes")
|
|
||||||
# Use this to define _GNU_SOURCE to pull in the IPv6 Advanced Socket API.
|
|
||||||
AC_USE_SYSTEM_EXTENSIONS
|
|
||||||
|
|
||||||
-AC_PROG_RANLIB
|
|
||||||
+# Use libtool to simplify building of shared libraries
|
|
||||||
+AC_PROG_LIBTOOL
|
|
||||||
|
|
||||||
AC_PATH_PROG(AR, ar)
|
|
||||||
AC_SUBST(AR)
|
|
||||||
diff --git a/dhcpctl/Makefile.am b/dhcpctl/Makefile.am
|
|
||||||
index fa20a78..dd016e4 100644
|
|
||||||
--- a/dhcpctl/Makefile.am
|
|
||||||
+++ b/dhcpctl/Makefile.am
|
|
||||||
@@ -1,17 +1,17 @@
|
|
||||||
BIND_LIBS = @BIND_LIBS@
|
|
||||||
|
|
||||||
bin_PROGRAMS = omshell
|
|
||||||
-lib_LIBRARIES = libdhcpctl.a
|
|
||||||
+lib_LTLIBRARIES = libdhcpctl.la
|
|
||||||
noinst_PROGRAMS = cltest
|
|
||||||
man_MANS = omshell.1 dhcpctl.3
|
|
||||||
EXTRA_DIST = $(man_MANS)
|
|
||||||
|
|
||||||
omshell_SOURCES = omshell.c
|
|
||||||
-omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
|
|
||||||
+omshell_LDADD = libdhcpctl.la ../common/libdhcp.a ../omapip/libomapi.la \
|
|
||||||
$(BIND_LIBS)
|
|
||||||
|
|
||||||
-libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c
|
|
||||||
+libdhcpctl_la_SOURCES = dhcpctl.c callback.c remote.c
|
|
||||||
|
|
||||||
cltest_SOURCES = cltest.c
|
|
||||||
-cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
|
|
||||||
+cltest_LDADD = libdhcpctl.la ../common/libdhcp.a ../omapip/libomapi.la \
|
|
||||||
$(BIND_LIBS)
|
|
||||||
diff --git a/omapip/Makefile.am b/omapip/Makefile.am
|
|
||||||
index b0d2680..265bcef 100644
|
|
||||||
--- a/omapip/Makefile.am
|
|
||||||
+++ b/omapip/Makefile.am
|
|
||||||
@@ -1,9 +1,9 @@
|
|
||||||
BIND_LIBS = @BIND_LIBS@
|
|
||||||
|
|
||||||
-lib_LIBRARIES = libomapi.a
|
|
||||||
+lib_LTLIBRARIES = libomapi.la
|
|
||||||
noinst_PROGRAMS = svtest
|
|
||||||
|
|
||||||
-libomapi_a_SOURCES = protocol.c buffer.c alloc.c result.c connection.c \
|
|
||||||
+libomapi_la_SOURCES = protocol.c buffer.c alloc.c result.c connection.c \
|
|
||||||
errwarn.c listener.c dispatch.c generic.c support.c \
|
|
||||||
handle.c message.c convert.c hash.c auth.c inet_addr.c \
|
|
||||||
array.c trace.c toisc.c iscprint.c isclib.c
|
|
||||||
@@ -12,5 +12,5 @@ man_MANS = omapi.3
|
|
||||||
EXTRA_DIST = $(man_MANS)
|
|
||||||
|
|
||||||
svtest_SOURCES = test.c
|
|
||||||
-svtest_LDADD = libomapi.a $(BIND_LIBS)
|
|
||||||
+svtest_LDADD = libomapi.la $(BIND_LIBS)
|
|
||||||
|
|
||||||
diff --git a/relay/Makefile.am b/relay/Makefile.am
|
|
||||||
index c9a1cba..316a524 100644
|
|
||||||
--- a/relay/Makefile.am
|
|
||||||
+++ b/relay/Makefile.am
|
|
||||||
@@ -4,7 +4,7 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"'
|
|
||||||
|
|
||||||
sbin_PROGRAMS = dhcrelay
|
|
||||||
dhcrelay_SOURCES = dhcrelay.c
|
|
||||||
-dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
|
|
||||||
+dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
|
|
||||||
$(BIND_LIBS)
|
|
||||||
man_MANS = dhcrelay.8
|
|
||||||
EXTRA_DIST = $(man_MANS)
|
|
||||||
diff --git a/server/Makefile.am b/server/Makefile.am
|
|
||||||
index 30cf2b1..f56f310 100644
|
|
||||||
--- a/server/Makefile.am
|
|
||||||
+++ b/server/Makefile.am
|
|
||||||
@@ -15,8 +15,8 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c confpars.c db.c class.c failover.c \
|
|
||||||
dhcpv6.c mdb6.c ldap.c ldap_casa.c leasechain.c ldap_krb_helper.c
|
|
||||||
|
|
||||||
dhcpd_CFLAGS = $(LDAP_CFLAGS)
|
|
||||||
-dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
|
|
||||||
- ../dhcpctl/libdhcpctl.a $(BIND_LIBS) $(LDAP_LIBS)
|
|
||||||
+dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
|
|
||||||
+ ../dhcpctl/libdhcpctl.la $(BIND_LIBS) $(LDAP_LIBS)
|
|
||||||
|
|
||||||
man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
|
|
||||||
EXTRA_DIST = $(man_MANS)
|
|
||||||
diff --git a/server/tests/Makefile.am b/server/tests/Makefile.am
|
|
||||||
index 771de06..8d8a2c1 100644
|
|
||||||
--- a/server/tests/Makefile.am
|
|
||||||
+++ b/server/tests/Makefile.am
|
|
||||||
@@ -20,8 +20,8 @@ DHCPSRC = ../dhcp.c ../bootp.c ../confpars.c ../db.c ../class.c \
|
|
||||||
../ddns.c ../dhcpleasequery.c ../dhcpv6.c ../mdb6.c \
|
|
||||||
../ldap.c ../ldap_casa.c ../dhcpd.c ../leasechain.c
|
|
||||||
|
|
||||||
-DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.a \
|
|
||||||
- $(top_builddir)/dhcpctl/libdhcpctl.a $(BIND_LIBS)
|
|
||||||
+DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.la \
|
|
||||||
+ $(top_builddir)/dhcpctl/libdhcpctl.la $(BIND_LIBS)
|
|
||||||
|
|
||||||
ATF_TESTS =
|
|
||||||
if HAVE_ATF
|
|
@ -1,13 +0,0 @@
|
|||||||
diff -up dhcp-4.3.4/client/dhclient.c.stateless-DUID-LLT dhcp-4.3.4/client/dhclient.c
|
|
||||||
--- dhcp-4.3.4/client/dhclient.c.stateless-DUID-LLT 2016-04-29 13:13:50.467360008 +0200
|
|
||||||
+++ dhcp-4.3.4/client/dhclient.c 2016-04-29 13:14:53.389375428 +0200
|
|
||||||
@@ -1317,6 +1317,9 @@ void run_stateless(int exit_mode, u_int1
|
|
||||||
data_string_forget(&default_duid, MDL);
|
|
||||||
|
|
||||||
form_duid(&default_duid, MDL);
|
|
||||||
+ if (form_duid(&default_duid, MDL) == ISC_R_SUCCESS &&
|
|
||||||
+ duid_type == DUID_LLT)
|
|
||||||
+ write_duid(&default_duid);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef DHCP4o6
|
|
299
dhcp.spec
299
dhcp.spec
@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
Summary: Dynamic host configuration protocol software
|
Summary: Dynamic host configuration protocol software
|
||||||
Name: dhcp
|
Name: dhcp
|
||||||
Version: 4.3.6
|
Version: 4.4.1
|
||||||
Release: 32%{?dist}
|
Release: 3%{?dist}
|
||||||
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
|
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
|
||||||
# dcantrell maintaining the package) made incorrect use of the epoch and
|
# dcantrell maintaining the package) made incorrect use of the epoch and
|
||||||
# that's why it is at 12 now. It should have never been used, but it was.
|
# that's why it is at 12 now. It should have never been used, but it was.
|
||||||
@ -34,52 +34,27 @@ Source6: dhcpd.service
|
|||||||
Source7: dhcpd6.service
|
Source7: dhcpd6.service
|
||||||
Source8: dhcrelay.service
|
Source8: dhcrelay.service
|
||||||
|
|
||||||
Patch0: dhcp-remove-bind.patch
|
Patch1: 0001-change-bug-url.patch
|
||||||
|
Patch2: 0002-additional-dhclient-options.patch
|
||||||
Patch2: dhcp-sharedlib.patch
|
Patch3: 0003-Handle-releasing-interfaces-requested-by-sbin-ifup.patch
|
||||||
Patch3: dhcp-errwarn-message.patch
|
Patch4: 0004-Support-unicast-BOOTP-for-IBM-pSeries-systems-and-ma.patch
|
||||||
Patch4: dhcp-dhclient-options.patch
|
Patch5: 0005-Change-default-requested-options.patch
|
||||||
Patch5: dhcp-release-by-ifup.patch
|
Patch6: 0006-Various-man-page-only-fixes.patch
|
||||||
Patch6: dhcp-dhclient-decline-backoff.patch
|
Patch7: 0007-Change-paths-to-conform-to-our-standards.patch
|
||||||
Patch7: dhcp-unicast-bootp.patch
|
Patch8: 0008-Make-sure-all-open-file-descriptors-are-closed-on-ex.patch
|
||||||
Patch8: dhcp-default-requested-options.patch
|
Patch9: 0009-Fix-garbage-in-format-string-error.patch
|
||||||
|
Patch10: 0010-Handle-null-timeout.patch
|
||||||
Patch10: dhcp-manpages.patch
|
Patch11: 0011-Drop-unnecessary-capabilities.patch
|
||||||
Patch11: dhcp-paths.patch
|
Patch12: 0012-RFC-3442-Classless-Static-Route-Option-for-DHCPv4-51.patch
|
||||||
Patch12: dhcp-CLOEXEC.patch
|
Patch13: 0013-DHCPv6-over-PPP-support-626514.patch
|
||||||
Patch13: dhcp-garbage-chars.patch
|
Patch14: 0014-IPoIB-support-660681.patch
|
||||||
Patch14: dhcp-add_timeout_when_NULL.patch
|
Patch15: 0015-Add-GUID-DUID-to-dhcpd-logs-1064416.patch
|
||||||
Patch15: dhcp-64_bit_lease_parse.patch
|
Patch16: 0016-Turn-on-creating-sending-of-DUID.patch
|
||||||
Patch16: dhcp-capability.patch
|
Patch17: 0017-Send-unicast-request-release-via-correct-interface.patch
|
||||||
|
Patch18: 0018-No-subnet-declaration-for-iface-should-be-info-not-e.patch
|
||||||
Patch18: dhcp-sendDecline.patch
|
Patch19: 0019-dhclient-write-DUID_LLT-even-in-stateless-mode-11563.patch
|
||||||
Patch19: dhcp-rfc3442-classless-static-routes.patch
|
Patch20: 0020-Discover-all-hwaddress-for-xid-uniqueness.patch
|
||||||
Patch20: dhcp-honor-expired.patch
|
Patch21: 0021-Load-leases-DB-in-non-replay-mode-only.patch
|
||||||
Patch21: dhcp-PPP.patch
|
|
||||||
|
|
||||||
Patch23: dhcp-lpf-ib.patch
|
|
||||||
Patch24: dhcp-IPoIB-log-id.patch
|
|
||||||
Patch25: dhcp-improved-xid.patch
|
|
||||||
#Patch26: dhcp-gpxe-cid.patch
|
|
||||||
Patch26: dhcp-duidv4.patch
|
|
||||||
Patch27: dhcp-duid_uuid.patch
|
|
||||||
#Patch28: dhcp-systemtap.patch
|
|
||||||
|
|
||||||
Patch31: dhcp-client-request-release-bind-iface.patch
|
|
||||||
Patch33: dhcp-no-subnet-error2info.patch
|
|
||||||
Patch34: dhcp-sd_notify.patch
|
|
||||||
|
|
||||||
Patch36: dhcp-option97-pxe-client-id.patch
|
|
||||||
Patch37: dhcp-stateless-DUID-LLT.patch
|
|
||||||
Patch38: dhcp-dhclient-preinit6s.patch
|
|
||||||
Patch39: dhcp-handle_ctx_signals.patch
|
|
||||||
Patch40: dhcp-4.3.6-omapi-leak.patch
|
|
||||||
Patch41: dhcp-4.3.6-isc-util.patch
|
|
||||||
Patch42: dhcp-4.3.6-options_overflow.patch
|
|
||||||
Patch43: dhcp-4.3.6-reference_count_overflow.patch
|
|
||||||
Patch44: dhcp-iface_hwaddr_discovery.patch
|
|
||||||
Patch45: dhcp-noreplay.patch
|
|
||||||
Patch46: dhcp-4.3.6-bind-9.11.5.patch
|
|
||||||
|
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
@ -89,7 +64,6 @@ BuildRequires: openldap-devel
|
|||||||
BuildRequires: krb5-devel
|
BuildRequires: krb5-devel
|
||||||
BuildRequires: libcap-ng-devel
|
BuildRequires: libcap-ng-devel
|
||||||
# https://fedorahosted.org/fpc/ticket/502#comment:3
|
# https://fedorahosted.org/fpc/ticket/502#comment:3
|
||||||
BuildRequires: bind-export-devel
|
|
||||||
BuildRequires: systemd systemd-devel
|
BuildRequires: systemd systemd-devel
|
||||||
# dhcp-sd_notify.patch
|
# dhcp-sd_notify.patch
|
||||||
BuildRequires: pkgconfig(libsystemd)
|
BuildRequires: pkgconfig(libsystemd)
|
||||||
@ -191,10 +165,13 @@ easier to administer a large network.
|
|||||||
|
|
||||||
This package provides common files used by dhcp and dhclient package.
|
This package provides common files used by dhcp and dhclient package.
|
||||||
|
|
||||||
%package libs
|
%package libs-static
|
||||||
Summary: Shared libraries used by ISC dhcp client and server
|
Summary: Shared libraries used by ISC dhcp client and server
|
||||||
|
Provides: %{name}-libs%{?_isa}
|
||||||
|
Provides: bundled(bind-export-libs)
|
||||||
|
Provides: bundled(bind-libs)
|
||||||
|
|
||||||
%description libs
|
%description libs-static
|
||||||
This package contains shared libraries used by ISC dhcp client and server
|
This package contains shared libraries used by ISC dhcp client and server
|
||||||
|
|
||||||
|
|
||||||
@ -219,146 +196,8 @@ This package contains doxygen-generated documentation.
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n dhcp-%{DHCPVERSION}
|
%autosetup -p1 -n dhcp-%{DHCPVERSION}
|
||||||
|
|
||||||
# Remove bundled BIND source
|
|
||||||
rm bind/bind.tar.gz
|
|
||||||
|
|
||||||
# Fire away bundled BIND source.
|
|
||||||
%patch0 -p1 -b .remove-bind %{?_rawbuild}
|
|
||||||
|
|
||||||
#Build dhcp's libraries as shared libs instead of static libs.
|
|
||||||
%patch2 -p1 -b .sharedlib
|
|
||||||
|
|
||||||
# Replace the standard ISC warning message about requesting help with an
|
|
||||||
# explanation that this is a patched build of ISC DHCP and bugs should be
|
|
||||||
# reported through bugzilla.redhat.com
|
|
||||||
%patch3 -p1 -b .errwarn
|
|
||||||
|
|
||||||
# Add more dhclient options (-I, -B, -H, -F, -timeout, -V, and -R)
|
|
||||||
%patch4 -p1 -b .options
|
|
||||||
|
|
||||||
# Handle releasing interfaces requested by /sbin/ifup
|
|
||||||
# pid file is assumed to be /var/run/dhclient-$interface.pid
|
|
||||||
%patch5 -p1 -b .ifup
|
|
||||||
|
|
||||||
# If we receive a DHCP offer in dhclient and it's DECLINEd in dhclient-script,
|
|
||||||
# backoff for an amount of time before trying again
|
|
||||||
%patch6 -p1 -b .backoff
|
|
||||||
|
|
||||||
# Support unicast BOOTP for IBM pSeries systems (and maybe others)
|
|
||||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #19146])
|
|
||||||
%patch7 -p1 -b .unicast
|
|
||||||
|
|
||||||
# Add NIS domain, NIS servers, NTP servers, interface-mtu and domain-search
|
|
||||||
# to the list of default requested DHCP options
|
|
||||||
%patch8 -p1 -b .requested
|
|
||||||
|
|
||||||
|
|
||||||
# Various man-page-only fixes
|
|
||||||
%patch10 -p1 -b .man
|
|
||||||
|
|
||||||
# Change paths to conform to our standards
|
|
||||||
%patch11 -p1 -b .paths
|
|
||||||
|
|
||||||
# Make sure all open file descriptors are closed-on-exec for SELinux (#446632)
|
|
||||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #19148])
|
|
||||||
%patch12 -p1 -b .cloexec
|
|
||||||
|
|
||||||
# Fix 'garbage in format string' error (#450042)
|
|
||||||
%patch13 -p1 -b .garbage
|
|
||||||
|
|
||||||
# Handle cases in add_timeout() where the function is called with a NULL
|
|
||||||
# value for the 'when' parameter
|
|
||||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #19867])
|
|
||||||
%patch14 -p1 -b .dracut
|
|
||||||
|
|
||||||
# Ensure 64-bit platforms parse lease file dates & times correctly (#448615, #628258)
|
|
||||||
# (Partly submitted to dhcp-bugs@isc.org - [ISC-Bugs #22033])
|
|
||||||
%patch15 -p1 -b .64-bit_lease_parse
|
|
||||||
|
|
||||||
# Drop unnecessary capabilities in
|
|
||||||
# dhclient (#517649, #546765), dhcpd/dhcrelay (#699713)
|
|
||||||
%patch16 -p1 -b .capability
|
|
||||||
|
|
||||||
# If any of the bound addresses are found to be in use on the link,
|
|
||||||
# the dhcpv6 client sends a Decline message to the server
|
|
||||||
# as described in section 18.1.7 of RFC-3315 (#559147)
|
|
||||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #21237])
|
|
||||||
%patch18 -p1 -b .sendDecline
|
|
||||||
|
|
||||||
# RFC 3442 - Classless Static Route Option for DHCPv4 (#516325)
|
|
||||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #24572])
|
|
||||||
%patch19 -p1 -b .rfc3442
|
|
||||||
|
|
||||||
# check whether there is any unexpired address in previous lease
|
|
||||||
# prior to confirming (INIT-REBOOT) the lease (#585418)
|
|
||||||
# (Submitted to dhcp-suggest@isc.org - [ISC-Bugs #22675])
|
|
||||||
%patch20 -p1 -b .honor-expired
|
|
||||||
|
|
||||||
# DHCPv6 over PPP support (#626514)
|
|
||||||
%patch21 -p1 -b .PPP
|
|
||||||
|
|
||||||
# IPoIB support (#660681)
|
|
||||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #24249])
|
|
||||||
%patch23 -p1 -b .lpf-ib
|
|
||||||
# add GUID/DUID to dhcpd logs (#1064416)
|
|
||||||
%patch24 -p1 -b .IPoIB-log-id
|
|
||||||
%patch25 -p1 -b .improved-xid
|
|
||||||
|
|
||||||
# create client identifier per rfc4390
|
|
||||||
#%%patch26 -p1 -b .gpxe-cid (not needed as we use DUIDs - see next patch)
|
|
||||||
# Turn on creating/sending of DUID as client identifier with DHCPv4 clients (#560361c#40, rfc4361)
|
|
||||||
%patch26 -p1 -b .duidv4
|
|
||||||
# Implement DUID-UUID (RFC 6355) and make it default DUID type (#560361#60)
|
|
||||||
%patch27 -p1 -b .duid_uuid
|
|
||||||
|
|
||||||
# http://sourceware.org/systemtap/wiki/SystemTap
|
|
||||||
#%%patch28 -p1 -b .systemtap
|
|
||||||
|
|
||||||
# send unicast request/release via correct interface (#800561, #1177351)
|
|
||||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #30544])
|
|
||||||
%patch31 -p1 -b .bind-iface
|
|
||||||
|
|
||||||
|
|
||||||
# 'No subnet declaration for <iface>' should be info, not error.
|
|
||||||
%patch33 -p1 -b .error2info
|
|
||||||
|
|
||||||
# support for sending startup notification to systemd (#1077666)
|
|
||||||
%patch34 -p1 -b .sd_notify
|
|
||||||
|
|
||||||
# option 97 - pxe-client-id (#1058674)
|
|
||||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #38110])
|
|
||||||
%patch36 -p1 -b .option97
|
|
||||||
|
|
||||||
# dhclient: write DUID_LLT even in stateless mode (#1156356)
|
|
||||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #38144])
|
|
||||||
%patch37 -p1 -b .stateless-DUID-LLT
|
|
||||||
|
|
||||||
# dhclient: make sure link-local address is ready in stateless mode (#1263466)
|
|
||||||
%patch38 -p1 -b .preinit6s
|
|
||||||
|
|
||||||
# add signal handlers for proper work with share context
|
|
||||||
%patch39 -p1 -b .signals
|
|
||||||
|
|
||||||
# close omapi socker descriptions properly
|
|
||||||
# https://bugzilla.redhat.com/1523547
|
|
||||||
%patch40 -p1 -b .omapi-leak
|
|
||||||
|
|
||||||
# include isc/util.h explicitly, is it no longer contained in used headers
|
|
||||||
%patch41 -p1 -b .isc-util
|
|
||||||
|
|
||||||
## https://bugzilla.redhat.com/show_bug.cgi?id=1550246
|
|
||||||
%patch42 -p1 -b .options-cve
|
|
||||||
%patch43 -p1 -b .refcount-cve
|
|
||||||
|
|
||||||
# ISC-Bugs #47353
|
|
||||||
# https://bugzilla.redhat.com/1163379
|
|
||||||
%patch44 -p1 -b .xid-hwaddr
|
|
||||||
|
|
||||||
#ISC Bugs #48110
|
|
||||||
%patch45 -p1 -b .noreplay
|
|
||||||
%patch46 -p1 -b .bind
|
|
||||||
|
|
||||||
|
|
||||||
# DHCLIENT_DEFAULT_PREFIX_LEN 64 -> 128
|
# DHCLIENT_DEFAULT_PREFIX_LEN 64 -> 128
|
||||||
@ -398,11 +237,9 @@ CFLAGS="%{optflags} -fno-strict-aliasing" \
|
|||||||
--with-cli-pid-file=%{_localstatedir}/run/dhclient.pid \
|
--with-cli-pid-file=%{_localstatedir}/run/dhclient.pid \
|
||||||
--with-cli6-pid-file=%{_localstatedir}/run/dhclient6.pid \
|
--with-cli6-pid-file=%{_localstatedir}/run/dhclient6.pid \
|
||||||
--with-relay-pid-file=%{_localstatedir}/run/dhcrelay.pid \
|
--with-relay-pid-file=%{_localstatedir}/run/dhcrelay.pid \
|
||||||
--with-libbind=/usr/bin/isc-export-config.sh \
|
|
||||||
--with-ldap \
|
--with-ldap \
|
||||||
--with-ldapcrypto \
|
--with-ldapcrypto \
|
||||||
--with-ldap-gssapi \
|
--with-ldap-gssapi \
|
||||||
--disable-static \
|
|
||||||
--enable-log-pid \
|
--enable-log-pid \
|
||||||
%if %{sdt}
|
%if %{sdt}
|
||||||
--enable-systemtap \
|
--enable-systemtap \
|
||||||
@ -411,10 +248,11 @@ CFLAGS="%{optflags} -fno-strict-aliasing" \
|
|||||||
--enable-paranoia --enable-early-chroot \
|
--enable-paranoia --enable-early-chroot \
|
||||||
--enable-binary-leases \
|
--enable-binary-leases \
|
||||||
--with-systemd
|
--with-systemd
|
||||||
make %{?_smp_mflags}
|
make -j1
|
||||||
|
|
||||||
%if ! 0%{?_module_build}
|
%if ! 0%{?_module_build}
|
||||||
pushd doc
|
pushd doc
|
||||||
make %{?_smp_mflags} devel
|
make -j1 devel
|
||||||
popd
|
popd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -437,7 +275,7 @@ mkdir -p %{buildroot}%{dhcpconfdir}/dhclient.d
|
|||||||
# NetworkManager dispatcher script
|
# NetworkManager dispatcher script
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d
|
mkdir -p %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d
|
||||||
install -p -m 0755 %{SOURCE3} %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d
|
install -p -m 0755 %{SOURCE3} %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d
|
||||||
install -p -m 0755 %{SOURCE4} %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d
|
install -p -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d
|
||||||
|
|
||||||
# pm-utils script to handle suspend/resume and dhclient leases
|
# pm-utils script to handle suspend/resume and dhclient leases
|
||||||
install -D -p -m 0755 %{SOURCE5} %{buildroot}%{_libdir}/pm-utils/sleep.d/56dhclient
|
install -D -p -m 0755 %{SOURCE5} %{buildroot}%{_libdir}/pm-utils/sleep.d/56dhclient
|
||||||
@ -523,8 +361,6 @@ install -D -p -m 0644 contrib/ldap/dhcp.schema %{buildroot}%{_sysconfdir}/openld
|
|||||||
# Don't package libtool *.la files
|
# Don't package libtool *.la files
|
||||||
find %{buildroot} -type f -name "*.la" -delete -print
|
find %{buildroot} -type f -name "*.la" -delete -print
|
||||||
|
|
||||||
rm %{buildroot}%{_includedir}/isc-dhcp/dst.h
|
|
||||||
|
|
||||||
%pre server
|
%pre server
|
||||||
# /usr/share/doc/setup/uidgid
|
# /usr/share/doc/setup/uidgid
|
||||||
%global gid_uid 177
|
%global gid_uid 177
|
||||||
@ -582,7 +418,6 @@ exit 0
|
|||||||
# Package upgrade, not uninstall
|
# Package upgrade, not uninstall
|
||||||
%systemd_postun_with_restart dhcrelay.service
|
%systemd_postun_with_restart dhcrelay.service
|
||||||
|
|
||||||
%ldconfig_scriptlets libs
|
|
||||||
|
|
||||||
%triggerun -- dhcp
|
%triggerun -- dhcp
|
||||||
# convert DHC*ARGS from /etc/sysconfig/dhc* to /etc/systemd/system/dhc*.service
|
# convert DHC*ARGS from /etc/sysconfig/dhc* to /etc/systemd/system/dhc*.service
|
||||||
@ -665,16 +500,14 @@ done
|
|||||||
%attr(0644,root,root) %{_mandir}/man5/dhcp-options.5.gz
|
%attr(0644,root,root) %{_mandir}/man5/dhcp-options.5.gz
|
||||||
%attr(0644,root,root) %{_mandir}/man5/dhcp-eval.5.gz
|
%attr(0644,root,root) %{_mandir}/man5/dhcp-eval.5.gz
|
||||||
|
|
||||||
%files libs
|
%files libs-static
|
||||||
%{_libdir}/libdhcpctl.so.*
|
%{_libdir}/libdhcp*.a
|
||||||
%{_libdir}/libomapi.so.*
|
%{_libdir}/libomapi.a
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%doc doc/IANA-arp-parameters doc/api+protocol
|
%doc doc/IANA-arp-parameters doc/api+protocol
|
||||||
%{_includedir}/dhcpctl
|
%{_includedir}/dhcpctl
|
||||||
%{_includedir}/omapip
|
%{_includedir}/omapip
|
||||||
%{_libdir}/libdhcpctl.so
|
|
||||||
%{_libdir}/libomapi.so
|
|
||||||
%attr(0644,root,root) %{_mandir}/man3/dhcpctl.3.gz
|
%attr(0644,root,root) %{_mandir}/man3/dhcpctl.3.gz
|
||||||
%attr(0644,root,root) %{_mandir}/man3/omapi.3.gz
|
%attr(0644,root,root) %{_mandir}/man3/omapi.3.gz
|
||||||
|
|
||||||
@ -684,17 +517,11 @@ done
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 12:4.3.6-32
|
* Thu Feb 28 2019 Pavel Zhukov <pzhukov@redhat.com> - 12:4.4.1-3
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
- New version 4.4.1
|
||||||
|
|
||||||
* Tue Jan 29 2019 Kalev Lember <klember@redhat.com> - 12:4.3.6-31
|
|
||||||
- Rebuild once more now that BIND 9.11.5 is in the build root
|
|
||||||
|
|
||||||
* Tue Nov 06 2018 Petr Menšík <pemensik@redhat.com> - 12:4.3.6-30
|
|
||||||
- Compile on BIND 9.11.5
|
|
||||||
|
|
||||||
* Mon Sep 24 2018 Pavel Zhukov <pzhukov@redhat.com> - 12:4.3.6-29
|
* Mon Sep 24 2018 Pavel Zhukov <pzhukov@redhat.com> - 12:4.3.6-29
|
||||||
- Resolves: 1632246 - Do not fail if iface has no hwaddr
|
- Resolves: 1632246 - Do not fail if iface has no hwaddr
|
||||||
|
|
||||||
* Thu Aug 30 2018 Pavel Zhukov <pzhukov@redhat.com> - 12:4.3.6-28
|
* Thu Aug 30 2018 Pavel Zhukov <pzhukov@redhat.com> - 12:4.3.6-28
|
||||||
- Do not try to map leases file in memory if not in replay mode
|
- Do not try to map leases file in memory if not in replay mode
|
||||||
@ -1204,14 +1031,14 @@ done
|
|||||||
|
|
||||||
* Fri Aug 24 2012 Tomas Hozza <thozza@redhat.com> - 12:4.2.4-14.P1
|
* Fri Aug 24 2012 Tomas Hozza <thozza@redhat.com> - 12:4.2.4-14.P1
|
||||||
- SystemD unit files don't use Environment files any more (#850558)
|
- SystemD unit files don't use Environment files any more (#850558)
|
||||||
- NetworkManager dispatcher script doesn't use DHCPDARGS any more
|
- NetworkManager dispatcher script doesn't use DHCPDARGS any more
|
||||||
|
|
||||||
* Wed Aug 22 2012 Tomas Hozza <thozza@redhat.com> - 12:4.2.4-13.P1
|
* Wed Aug 22 2012 Tomas Hozza <thozza@redhat.com> - 12:4.2.4-13.P1
|
||||||
- fixed SPEC file so it comply with new systemd-rpm macros guidelines (#850089)
|
- fixed SPEC file so it comply with new systemd-rpm macros guidelines (#850089)
|
||||||
|
|
||||||
* Mon Aug 20 2012 Tomas Hozza <thozza@redhat.com> - 12:4.2.4-12.P1
|
* Mon Aug 20 2012 Tomas Hozza <thozza@redhat.com> - 12:4.2.4-12.P1
|
||||||
- dhclient-script: fixed CONFIG variable value passed to need_config (#848858)
|
- dhclient-script: fixed CONFIG variable value passed to need_config (#848858)
|
||||||
- dhclient-script: calling dhclient-up-hooks after setting up route, gateways
|
- dhclient-script: calling dhclient-up-hooks after setting up route, gateways
|
||||||
& interface alias (#848869)
|
& interface alias (#848869)
|
||||||
|
|
||||||
* Fri Aug 17 2012 Jiri Popelka <jpopelka@redhat.com> - 12:4.2.4-11.P1
|
* Fri Aug 17 2012 Jiri Popelka <jpopelka@redhat.com> - 12:4.2.4-11.P1
|
||||||
@ -1224,7 +1051,7 @@ done
|
|||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||||
|
|
||||||
* Wed Jul 25 2012 Tomas Hozza <thozza@redhat.com> - 12:4.2.4-8.P1
|
* Wed Jul 25 2012 Tomas Hozza <thozza@redhat.com> - 12:4.2.4-8.P1
|
||||||
- Dhclient does not correctly parse zero-length options in
|
- Dhclient does not correctly parse zero-length options in
|
||||||
dhclient6.leases (#633318)
|
dhclient6.leases (#633318)
|
||||||
|
|
||||||
* Wed Jul 25 2012 Tomas Hozza <thozza@redhat.com> - 12:4.2.4-7.P1
|
* Wed Jul 25 2012 Tomas Hozza <thozza@redhat.com> - 12:4.2.4-7.P1
|
||||||
@ -2272,7 +2099,7 @@ done
|
|||||||
- add a '-R <request option list>' dhclient argument
|
- add a '-R <request option list>' dhclient argument
|
||||||
|
|
||||||
* Fri May 26 2006 Jason Vas Dias <jvdias@redhat.com> - 12:3.0.4-8.1
|
* Fri May 26 2006 Jason Vas Dias <jvdias@redhat.com> - 12:3.0.4-8.1
|
||||||
- fix a libdhcp4client memory leak (1 strdup) and
|
- fix a libdhcp4client memory leak (1 strdup) and
|
||||||
fill in client->packet.siaddr before bind_lease() for pump
|
fill in client->packet.siaddr before bind_lease() for pump
|
||||||
nextServer option.
|
nextServer option.
|
||||||
|
|
||||||
@ -2283,12 +2110,12 @@ done
|
|||||||
- Enable libdhcp4client build
|
- Enable libdhcp4client build
|
||||||
|
|
||||||
* Tue May 16 2006 Jason Vas Dias <jvdias@redhat.com> - 12:3.0.4-2
|
* Tue May 16 2006 Jason Vas Dias <jvdias@redhat.com> - 12:3.0.4-2
|
||||||
- Fix bug 191470: prevent dhcpd writing 8 byte dhcp-lease-time
|
- Fix bug 191470: prevent dhcpd writing 8 byte dhcp-lease-time
|
||||||
option in packets on 64-bit platforms
|
option in packets on 64-bit platforms
|
||||||
|
|
||||||
* Sun May 14 2006 Jason Vas Dias <jvdias@redhat.com> - 12:3.0.4-2
|
* Sun May 14 2006 Jason Vas Dias <jvdias@redhat.com> - 12:3.0.4-2
|
||||||
- Add the libdhcp4client library package for use by the new libdhcp
|
- Add the libdhcp4client library package for use by the new libdhcp
|
||||||
package, which enables dhclient to be invoked by programs in a
|
package, which enables dhclient to be invoked by programs in a
|
||||||
single process from the library. The normal dhclient code is
|
single process from the library. The normal dhclient code is
|
||||||
unmodified by this.
|
unmodified by this.
|
||||||
|
|
||||||
@ -2328,8 +2155,8 @@ done
|
|||||||
binaries are in /bin rather than /usr/bin
|
binaries are in /bin rather than /usr/bin
|
||||||
|
|
||||||
* Mon Jan 16 2006 Jason Vas Dias <jvdias@redhat.com> - 11:3.0.3-20
|
* Mon Jan 16 2006 Jason Vas Dias <jvdias@redhat.com> - 11:3.0.3-20
|
||||||
- fix bug 177845: allow client ip-address as default router
|
- fix bug 177845: allow client ip-address as default router
|
||||||
- fix bug 176615: fix DDNS update when Windows-NT client sends
|
- fix bug 176615: fix DDNS update when Windows-NT client sends
|
||||||
host-name with trailing nul
|
host-name with trailing nul
|
||||||
|
|
||||||
* Tue Dec 20 2005 Jason Vas Dias <jvdias@redhat.com> - 11:3.0.3-18
|
* Tue Dec 20 2005 Jason Vas Dias <jvdias@redhat.com> - 11:3.0.3-18
|
||||||
@ -2342,7 +2169,7 @@ done
|
|||||||
- fix gcc 4.1 compile warnings (-Werror)
|
- fix gcc 4.1 compile warnings (-Werror)
|
||||||
|
|
||||||
* Fri Nov 18 2005 Jason Vas Dias <jvdias@redhat.com> - 11:3.0.3-12
|
* Fri Nov 18 2005 Jason Vas Dias <jvdias@redhat.com> - 11:3.0.3-12
|
||||||
- fix bug 173619: dhclient-script should reconfig on RENEW if
|
- fix bug 173619: dhclient-script should reconfig on RENEW if
|
||||||
subnet-mask, broadcast-address, mtu, routers, etc.
|
subnet-mask, broadcast-address, mtu, routers, etc.
|
||||||
have changed
|
have changed
|
||||||
- apply upstream improvements to trailing nul options fix of bug 160655
|
- apply upstream improvements to trailing nul options fix of bug 160655
|
||||||
@ -2357,13 +2184,13 @@ done
|
|||||||
* Tue Oct 18 2005 Jason Vas Dias <jvdias@redhat.com> - 11:3.0.3-10
|
* Tue Oct 18 2005 Jason Vas Dias <jvdias@redhat.com> - 11:3.0.3-10
|
||||||
- Allow dhclient route metrics to be specified with DHCP options:
|
- Allow dhclient route metrics to be specified with DHCP options:
|
||||||
The dhcp-options(5) man-page states:
|
The dhcp-options(5) man-page states:
|
||||||
'option routers ... Routers should be listed in order of preference'
|
'option routers ... Routers should be listed in order of preference'
|
||||||
and
|
and
|
||||||
'option static-routes ... are listed in descending order of priority' .
|
'option static-routes ... are listed in descending order of priority' .
|
||||||
No preference / priority could be set with previous dhclient-script .
|
No preference / priority could be set with previous dhclient-script .
|
||||||
Now, dhclient-script provides:
|
Now, dhclient-script provides:
|
||||||
Default Gateway (option 'routers') metrics:
|
Default Gateway (option 'routers') metrics:
|
||||||
Instead of allowing only one default gateway, if more than one router
|
Instead of allowing only one default gateway, if more than one router
|
||||||
is specified in the routers option, routers following the first router
|
is specified in the routers option, routers following the first router
|
||||||
will have a 'metric' of their position in the list (1,...N>1).
|
will have a 'metric' of their position in the list (1,...N>1).
|
||||||
Option static-routes metrics:
|
Option static-routes metrics:
|
||||||
@ -2381,7 +2208,7 @@ done
|
|||||||
- fix bug 169164: separate /var/lib/{dhcpd,dhclient} directories
|
- fix bug 169164: separate /var/lib/{dhcpd,dhclient} directories
|
||||||
- fix bug 167292: update failover port info in dhcpd.conf.5; give
|
- fix bug 167292: update failover port info in dhcpd.conf.5; give
|
||||||
failover ports default values in server/confpars.c
|
failover ports default values in server/confpars.c
|
||||||
|
|
||||||
* Mon Sep 12 2005 Jason Vas Dias <jvdias@redhat.com> - 11:3.0.3-6
|
* Mon Sep 12 2005 Jason Vas Dias <jvdias@redhat.com> - 11:3.0.3-6
|
||||||
- fix bug 167273: time-offset should not set timezone by default
|
- fix bug 167273: time-offset should not set timezone by default
|
||||||
tzdata's Etc/* files are named with reverse sign
|
tzdata's Etc/* files are named with reverse sign
|
||||||
@ -2404,17 +2231,17 @@ done
|
|||||||
- don't explicitly require 2.2 era kernel, it's fairly overkill at this point
|
- don't explicitly require 2.2 era kernel, it's fairly overkill at this point
|
||||||
|
|
||||||
* Fri Jul 29 2005 Jason Vas Dias <jvdias@redhat.com> 11:3.0.3-1
|
* Fri Jul 29 2005 Jason Vas Dias <jvdias@redhat.com> 11:3.0.3-1
|
||||||
- Upgrade to upstream version 3.0.3
|
- Upgrade to upstream version 3.0.3
|
||||||
- Don't apply the 'default boot file server' patch: legacy
|
- Don't apply the 'default boot file server' patch: legacy
|
||||||
dhcp behaviour broke RFC 2131, which requires that the siaddr
|
dhcp behaviour broke RFC 2131, which requires that the siaddr
|
||||||
field only be non-zero if the next-server or tftp-server-name
|
field only be non-zero if the next-server or tftp-server-name
|
||||||
options are specified.
|
options are specified.
|
||||||
- Try removing the 1-5 second wait on dhclient startup altogether.
|
- Try removing the 1-5 second wait on dhclient startup altogether.
|
||||||
- fix bug 163367: supply default configuration file for dhcpd
|
- fix bug 163367: supply default configuration file for dhcpd
|
||||||
|
|
||||||
* Thu Jul 14 2005 Jason Vas Dias <jvdias@redhat.com> 10:3.0.3rc1-1
|
* Thu Jul 14 2005 Jason Vas Dias <jvdias@redhat.com> 10:3.0.3rc1-1
|
||||||
- Upgrade to upstream version 3.0.3rc1
|
- Upgrade to upstream version 3.0.3rc1
|
||||||
- fix bug 163203: silence ISC blurb on configtest
|
- fix bug 163203: silence ISC blurb on configtest
|
||||||
- fix default 'boot file server' value (packet->siaddr):
|
- fix default 'boot file server' value (packet->siaddr):
|
||||||
In dhcp-3.0.2(-), this was defaulted to the server address;
|
In dhcp-3.0.2(-), this was defaulted to the server address;
|
||||||
now it defaults to 0.0.0.0 (a rather silly default!) and
|
now it defaults to 0.0.0.0 (a rather silly default!) and
|
||||||
@ -2443,17 +2270,17 @@ done
|
|||||||
- this is now corrected.
|
- this is now corrected.
|
||||||
|
|
||||||
* Mon Apr 25 2005 Jason Vas Dias <jvdias@redhat.com> 10:3.0.2-10
|
* Mon Apr 25 2005 Jason Vas Dias <jvdias@redhat.com> 10:3.0.2-10
|
||||||
- dhclient-script dhcdbd extensions.
|
- dhclient-script dhcdbd extensions.
|
||||||
- Tested to have no effect unless dhcdbd invokes dhclient.
|
- Tested to have no effect unless dhcdbd invokes dhclient.
|
||||||
|
|
||||||
* Thu Apr 21 2005 Jason Vas Dias <jvdias@redhat.com> 10:3.0.2-9
|
* Thu Apr 21 2005 Jason Vas Dias <jvdias@redhat.com> 10:3.0.2-9
|
||||||
- bugs 153244 & 155143 are now fixed with SELinux policy;
|
- bugs 153244 & 155143 are now fixed with SELinux policy;
|
||||||
autotrans now works for dhcpc_t, so restorecons are not required,
|
autotrans now works for dhcpc_t, so restorecons are not required,
|
||||||
and dhclient runs OK under dhcpc_t with SELinux enforcing.
|
and dhclient runs OK under dhcpc_t with SELinux enforcing.
|
||||||
- fix bug 155506: 'predhclien' typo (emacs!).
|
- fix bug 155506: 'predhclien' typo (emacs!).
|
||||||
|
|
||||||
* Mon Apr 18 2005 Jason Vas Dias <jvdias@redhat.com> 10:3.0.2-8
|
* Mon Apr 18 2005 Jason Vas Dias <jvdias@redhat.com> 10:3.0.2-8
|
||||||
- Fix bugs 153244 & 155143:
|
- Fix bugs 153244 & 155143:
|
||||||
o restore dhclient-script 'restorecon's
|
o restore dhclient-script 'restorecon's
|
||||||
o give dhclient and dhclient-script an exec context of
|
o give dhclient and dhclient-script an exec context of
|
||||||
'system_u:object_r:sbin_t' that allows them to run
|
'system_u:object_r:sbin_t' that allows them to run
|
||||||
@ -2468,7 +2295,7 @@ done
|
|||||||
- about user or vendor defined option space options to environment.
|
- about user or vendor defined option space options to environment.
|
||||||
-
|
-
|
||||||
- fix bug 153244: dhclient should not use restorecon
|
- fix bug 153244: dhclient should not use restorecon
|
||||||
- fix bug 151023: dhclient no 'headers & libraries'
|
- fix bug 151023: dhclient no 'headers & libraries'
|
||||||
- fix bug 149780: add 'DHCLIENT_IGNORE_GATEWAY' variable
|
- fix bug 149780: add 'DHCLIENT_IGNORE_GATEWAY' variable
|
||||||
- remove all usage of /sbin/route from dhclient-script
|
- remove all usage of /sbin/route from dhclient-script
|
||||||
|
|
||||||
@ -2550,7 +2377,7 @@ done
|
|||||||
- clean-up last patch: new-host.patch adds host_reference(host)
|
- clean-up last patch: new-host.patch adds host_reference(host)
|
||||||
- without host_dereference(host) before returns in ack_lease
|
- without host_dereference(host) before returns in ack_lease
|
||||||
- (dhcp-3.0.1-host_dereference.patch)
|
- (dhcp-3.0.1-host_dereference.patch)
|
||||||
|
|
||||||
* Mon Sep 27 2004 Jason Vas Dias <jvdias@redhat.com> 7:3.0.1-9
|
* Mon Sep 27 2004 Jason Vas Dias <jvdias@redhat.com> 7:3.0.1-9
|
||||||
- Fix bug 133522:
|
- Fix bug 133522:
|
||||||
- PXE Boot clients with static leases not given 'file' option
|
- PXE Boot clients with static leases not given 'file' option
|
||||||
@ -2562,7 +2389,7 @@ done
|
|||||||
- If "deny booting" is defined for some group of hosts,
|
- If "deny booting" is defined for some group of hosts,
|
||||||
- then after one of those hosts is denied booting, all
|
- then after one of those hosts is denied booting, all
|
||||||
- hosts are denied booting, because of a pointer not being
|
- hosts are denied booting, because of a pointer not being
|
||||||
- cleared in the lease record.
|
- cleared in the lease record.
|
||||||
- An upstream patch was obtained which will be in dhcp-3.0.2.
|
- An upstream patch was obtained which will be in dhcp-3.0.2.
|
||||||
|
|
||||||
* Mon Aug 16 2004 Jason Vas Dias <jvdias@redhat.com> 7:3.0.1-7
|
* Mon Aug 16 2004 Jason Vas Dias <jvdias@redhat.com> 7:3.0.1-7
|
||||||
@ -2894,7 +2721,7 @@ done
|
|||||||
* Mon Apr 05 1999 Cristian Gafton <gafton@redhat.com>
|
* Mon Apr 05 1999 Cristian Gafton <gafton@redhat.com>
|
||||||
- copy the source file in prep, not move
|
- copy the source file in prep, not move
|
||||||
|
|
||||||
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
|
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
|
||||||
- auto rebuild in the new build environment (release 4)
|
- auto rebuild in the new build environment (release 4)
|
||||||
|
|
||||||
* Mon Jan 11 1999 Erik Troan <ewt@redhat.com>
|
* Mon Jan 11 1999 Erik Troan <ewt@redhat.com>
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (dhcp-4.3.6.tar.gz) = de4962dc2aa174df17a3a1456719a777a42d238c3d6ad1771ccc460fa70c9e9cefcce52c7437f7acde61b9c3a2e84e9d49fd2dc33c7e9243053ceed5b247be03
|
SHA512 (dhcp-4.4.1.tar.gz) = 684ae349f224918c9f8cec7bd6c55cd0b83ad2b5827375b2876ca088eb05b7ff1364e50f6dc24f2485c610d9be94d4ba3020f60a0fa0ef63962349d191b887e7
|
||||||
|
Loading…
Reference in New Issue
Block a user