SHA256
1
0
forked from pool/dhcp
dhcp/dhcp-4.2.5-dhclient-send-hostname-rml.patch

123 lines
3.5 KiB
Diff
Raw Normal View History

- Update to ISC dhcp-4.2.5 release. See RELNOTES file for the complete list of changes -- digest of fixes not in dhcp-4.2.4-P2: - Correct code to calculate rebind timing values in client [ISC-Bugs #29062] - Fix some issues in the code for parsing and printing options. [ISC-Bugs #22625,#27289,#27296,#27314] - Update the memory leakage debug code to work with v6. [ISC-Bugs #30297] - Relax the requirements for deleting an A or AAAA record. This relaxation was codified in RFC 4703. [ISC-Bugs #30734] - Modify the failover code to handle incorrect peer names better. [ISC-Bugs #30320] - Fix a set of issues that were discovered via a code inspection tool. [ISC-Bugs #23833] - Parsing unquoted base64 strings improved. [ISC-Bugs #23048] - The client now passes information about the options it requested from the server to the script code via environment variables. These variables are of the form requested_<option_name>=1 with the option name being the same as used in the new_* and old_* variables. [ISC-Bugs #29068] - Check the status value when trying to read from a connection to see if it may have been closed. If it appears closed don't try to read from it again. This avoids a potential busy-wait like loop when the peer names are mismatched. [ISC-Bugs #31231] - Remove an unused variable to keep compilers happy. [ISC-Bugs #31983] - Removed obsolete parsing and printing option patch [dhcp-4.2.4-parsing-and-printing-options.patch] - Merged dhcp-4.2.2-dhclient-send-hostname-rml.diff [dhcp-4.2.5-dhclient-send-hostname-rml.patch] OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=96
2013-01-11 12:58:29 +01:00
From ebc6e17683e4a4d7f2316c1ea46d680955df7d26 Mon Sep 17 00:00:00 2001
From: Marius Tomaschewski <mt@suse.de>
Date: Thu, 18 Aug 2011 10:49:07 +0200
Subject: [PATCH] dhcp-4.2.5-dhclient-send-hostname-rml
---
client/dhclient.8 | 8 ++++++++
client/dhclient.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++--
2 Dateien geändert, 56 Zeilen hinzugefügt(+), 2 Zeilen entfernt(-)
diff --git a/client/dhclient.8 b/client/dhclient.8
- Update to ISC dhcp-4.2.5 release. See RELNOTES file for the complete list of changes -- digest of fixes not in dhcp-4.2.4-P2: - Correct code to calculate rebind timing values in client [ISC-Bugs #29062] - Fix some issues in the code for parsing and printing options. [ISC-Bugs #22625,#27289,#27296,#27314] - Update the memory leakage debug code to work with v6. [ISC-Bugs #30297] - Relax the requirements for deleting an A or AAAA record. This relaxation was codified in RFC 4703. [ISC-Bugs #30734] - Modify the failover code to handle incorrect peer names better. [ISC-Bugs #30320] - Fix a set of issues that were discovered via a code inspection tool. [ISC-Bugs #23833] - Parsing unquoted base64 strings improved. [ISC-Bugs #23048] - The client now passes information about the options it requested from the server to the script code via environment variables. These variables are of the form requested_<option_name>=1 with the option name being the same as used in the new_* and old_* variables. [ISC-Bugs #29068] - Check the status value when trying to read from a connection to see if it may have been closed. If it appears closed don't try to read from it again. This avoids a potential busy-wait like loop when the peer names are mismatched. [ISC-Bugs #31231] - Remove an unused variable to keep compilers happy. [ISC-Bugs #31983] - Removed obsolete parsing and printing option patch [dhcp-4.2.4-parsing-and-printing-options.patch] - Merged dhcp-4.2.2-dhclient-send-hostname-rml.diff [dhcp-4.2.5-dhclient-send-hostname-rml.patch] OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=96
2013-01-11 12:58:29 +01:00
index 3539591..4a7647a 100644
--- a/client/dhclient.8
+++ b/client/dhclient.8
- Updated to ISC dhcp-4.2.2 release, providing two security fixes (CVE-2011-2748,CVE-2011-2749,[ISC-Bugs #24960],bnc#712653), that allowed remote attackers to cause a denial of service (a daemon exit) via crafted BOOTP packets. Further also DNS update fix to detect overlapping pools or misconfigured fixed-address entries, that caused a server crash during DNS update and other fixes. For a complete list, please see the RELNOTES file provided in the package and also available online at http://www.isc.org/. - Merged/adopted dhclient option-checks, send-hostname-rml, ldap patch, xen-checksum, close-on-exec patches and removed obsolete in6_pktinfo-prototype and relay-no-ip-on-interface patches. - Moved server pid files into chroot directory even chroot is not used and create a link in /var/run, so it can write one when started as user without chroot and avoid stop problems when the chroot sysconfig setting changed (bnc#712438). - Disabled log-info level messages in dhclient(6) quiet mode to avoid excessive logging of non-critical messages (bnc#711420). - Fixed dhclient-script to not remove alias IP when it didn't changed to not wipe out iptables connmark when renewing the lease (bnc#700771). Thanks to James Carter for the patch. - Fixed DDNS-howto.txt reference in the config file; it has been moved to the dhcp-doc package (bnc#697279). - Removed GPL licensed files (bind-*/contrib/dbus) from bind.tgz to ensure, they're not used to build non-GPL dhcp (bnc#714004). - Changed to apply strict-aliasing/RELRO for >= 12.x only OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=75
2011-08-29 17:37:53 +02:00
@@ -60,6 +60,10 @@ dhclient - Dynamic Host Configuration Protocol Client
.I LL|LLT
]
[
+.B -H
+.I hostname
+]
+[
- Updated to ISC dhcp-4.2.2 release, providing two security fixes (CVE-2011-2748,CVE-2011-2749,[ISC-Bugs #24960],bnc#712653), that allowed remote attackers to cause a denial of service (a daemon exit) via crafted BOOTP packets. Further also DNS update fix to detect overlapping pools or misconfigured fixed-address entries, that caused a server crash during DNS update and other fixes. For a complete list, please see the RELNOTES file provided in the package and also available online at http://www.isc.org/. - Merged/adopted dhclient option-checks, send-hostname-rml, ldap patch, xen-checksum, close-on-exec patches and removed obsolete in6_pktinfo-prototype and relay-no-ip-on-interface patches. - Moved server pid files into chroot directory even chroot is not used and create a link in /var/run, so it can write one when started as user without chroot and avoid stop problems when the chroot sysconfig setting changed (bnc#712438). - Disabled log-info level messages in dhclient(6) quiet mode to avoid excessive logging of non-critical messages (bnc#711420). - Fixed dhclient-script to not remove alias IP when it didn't changed to not wipe out iptables connmark when renewing the lease (bnc#700771). Thanks to James Carter for the patch. - Fixed DDNS-howto.txt reference in the config file; it has been moved to the dhcp-doc package (bnc#697279). - Removed GPL licensed files (bind-*/contrib/dbus) from bind.tgz to ensure, they're not used to build non-GPL dhcp (bnc#714004). - Changed to apply strict-aliasing/RELRO for >= 12.x only OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=75
2011-08-29 17:37:53 +02:00
.B -p
- Update to ISC dhcp-4.2.5 release. See RELNOTES file for the complete list of changes -- digest of fixes not in dhcp-4.2.4-P2: - Correct code to calculate rebind timing values in client [ISC-Bugs #29062] - Fix some issues in the code for parsing and printing options. [ISC-Bugs #22625,#27289,#27296,#27314] - Update the memory leakage debug code to work with v6. [ISC-Bugs #30297] - Relax the requirements for deleting an A or AAAA record. This relaxation was codified in RFC 4703. [ISC-Bugs #30734] - Modify the failover code to handle incorrect peer names better. [ISC-Bugs #30320] - Fix a set of issues that were discovered via a code inspection tool. [ISC-Bugs #23833] - Parsing unquoted base64 strings improved. [ISC-Bugs #23048] - The client now passes information about the options it requested from the server to the script code via environment variables. These variables are of the form requested_<option_name>=1 with the option name being the same as used in the new_* and old_* variables. [ISC-Bugs #29068] - Check the status value when trying to read from a connection to see if it may have been closed. If it appears closed don't try to read from it again. This avoids a potential busy-wait like loop when the peer names are mismatched. [ISC-Bugs #31231] - Remove an unused variable to keep compilers happy. [ISC-Bugs #31983] - Removed obsolete parsing and printing option patch [dhcp-4.2.4-parsing-and-printing-options.patch] - Merged dhcp-4.2.2-dhclient-send-hostname-rml.diff [dhcp-4.2.5-dhclient-send-hostname-rml.patch] OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=96
2013-01-11 12:58:29 +01:00
.I port-number
]
- Update to ISC dhcp-4.2.5 release. See RELNOTES file for the complete list of changes -- digest of fixes not in dhcp-4.2.4-P2: - Correct code to calculate rebind timing values in client [ISC-Bugs #29062] - Fix some issues in the code for parsing and printing options. [ISC-Bugs #22625,#27289,#27296,#27314] - Update the memory leakage debug code to work with v6. [ISC-Bugs #30297] - Relax the requirements for deleting an A or AAAA record. This relaxation was codified in RFC 4703. [ISC-Bugs #30734] - Modify the failover code to handle incorrect peer names better. [ISC-Bugs #30320] - Fix a set of issues that were discovered via a code inspection tool. [ISC-Bugs #23833] - Parsing unquoted base64 strings improved. [ISC-Bugs #23048] - The client now passes information about the options it requested from the server to the script code via environment variables. These variables are of the form requested_<option_name>=1 with the option name being the same as used in the new_* and old_* variables. [ISC-Bugs #29068] - Check the status value when trying to read from a connection to see if it may have been closed. If it appears closed don't try to read from it again. This avoids a potential busy-wait like loop when the peer names are mismatched. [ISC-Bugs #31231] - Remove an unused variable to keep compilers happy. [ISC-Bugs #31983] - Removed obsolete parsing and printing option patch [dhcp-4.2.4-parsing-and-printing-options.patch] - Merged dhcp-4.2.2-dhclient-send-hostname-rml.diff [dhcp-4.2.5-dhclient-send-hostname-rml.patch] OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=96
2013-01-11 12:58:29 +01:00
@@ -316,6 +320,10 @@ transmits these messages to 255.255.255.255 (the IP limited broadcast
address). Overriding this is mostly useful for debugging purposes. This
feature is not supported in DHCPv6 (\fB-6\fR) mode.
.TP
+.BI \-H \ hostname
+This flag may be used to specify a client hostname that should be sent to
+the DHCP server. Note, that this option is a SUSE/Novell extension.
+.TP
- Update to ISC dhcp-4.2.5 release. See RELNOTES file for the complete list of changes -- digest of fixes not in dhcp-4.2.4-P2: - Correct code to calculate rebind timing values in client [ISC-Bugs #29062] - Fix some issues in the code for parsing and printing options. [ISC-Bugs #22625,#27289,#27296,#27314] - Update the memory leakage debug code to work with v6. [ISC-Bugs #30297] - Relax the requirements for deleting an A or AAAA record. This relaxation was codified in RFC 4703. [ISC-Bugs #30734] - Modify the failover code to handle incorrect peer names better. [ISC-Bugs #30320] - Fix a set of issues that were discovered via a code inspection tool. [ISC-Bugs #23833] - Parsing unquoted base64 strings improved. [ISC-Bugs #23048] - The client now passes information about the options it requested from the server to the script code via environment variables. These variables are of the form requested_<option_name>=1 with the option name being the same as used in the new_* and old_* variables. [ISC-Bugs #29068] - Check the status value when trying to read from a connection to see if it may have been closed. If it appears closed don't try to read from it again. This avoids a potential busy-wait like loop when the peer names are mismatched. [ISC-Bugs #31231] - Remove an unused variable to keep compilers happy. [ISC-Bugs #31983] - Removed obsolete parsing and printing option patch [dhcp-4.2.4-parsing-and-printing-options.patch] - Merged dhcp-4.2.2-dhclient-send-hostname-rml.diff [dhcp-4.2.5-dhclient-send-hostname-rml.patch] OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=96
2013-01-11 12:58:29 +01:00
.BI \-g \ relay
.\" mockup relay
Set the giaddr field of all packets to the \fIrelay\fR IP address
diff --git a/client/dhclient.c b/client/dhclient.c
- Update to ISC dhcp-4.2.5 release. See RELNOTES file for the complete list of changes -- digest of fixes not in dhcp-4.2.4-P2: - Correct code to calculate rebind timing values in client [ISC-Bugs #29062] - Fix some issues in the code for parsing and printing options. [ISC-Bugs #22625,#27289,#27296,#27314] - Update the memory leakage debug code to work with v6. [ISC-Bugs #30297] - Relax the requirements for deleting an A or AAAA record. This relaxation was codified in RFC 4703. [ISC-Bugs #30734] - Modify the failover code to handle incorrect peer names better. [ISC-Bugs #30320] - Fix a set of issues that were discovered via a code inspection tool. [ISC-Bugs #23833] - Parsing unquoted base64 strings improved. [ISC-Bugs #23048] - The client now passes information about the options it requested from the server to the script code via environment variables. These variables are of the form requested_<option_name>=1 with the option name being the same as used in the new_* and old_* variables. [ISC-Bugs #29068] - Check the status value when trying to read from a connection to see if it may have been closed. If it appears closed don't try to read from it again. This avoids a potential busy-wait like loop when the peer names are mismatched. [ISC-Bugs #31231] - Remove an unused variable to keep compilers happy. [ISC-Bugs #31983] - Removed obsolete parsing and printing option patch [dhcp-4.2.4-parsing-and-printing-options.patch] - Merged dhcp-4.2.2-dhclient-send-hostname-rml.diff [dhcp-4.2.5-dhclient-send-hostname-rml.patch] OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=96
2013-01-11 12:58:29 +01:00
index 0c1ed24..de93499 100644
--- a/client/dhclient.c
+++ b/client/dhclient.c
- Updated to ISC dhcp-4.2.2 release, providing two security fixes (CVE-2011-2748,CVE-2011-2749,[ISC-Bugs #24960],bnc#712653), that allowed remote attackers to cause a denial of service (a daemon exit) via crafted BOOTP packets. Further also DNS update fix to detect overlapping pools or misconfigured fixed-address entries, that caused a server crash during DNS update and other fixes. For a complete list, please see the RELNOTES file provided in the package and also available online at http://www.isc.org/. - Merged/adopted dhclient option-checks, send-hostname-rml, ldap patch, xen-checksum, close-on-exec patches and removed obsolete in6_pktinfo-prototype and relay-no-ip-on-interface patches. - Moved server pid files into chroot directory even chroot is not used and create a link in /var/run, so it can write one when started as user without chroot and avoid stop problems when the chroot sysconfig setting changed (bnc#712438). - Disabled log-info level messages in dhclient(6) quiet mode to avoid excessive logging of non-critical messages (bnc#711420). - Fixed dhclient-script to not remove alias IP when it didn't changed to not wipe out iptables connmark when renewing the lease (bnc#700771). Thanks to James Carter for the patch. - Fixed DDNS-howto.txt reference in the config file; it has been moved to the dhcp-doc package (bnc#697279). - Removed GPL licensed files (bind-*/contrib/dbus) from bind.tgz to ensure, they're not used to build non-GPL dhcp (bnc#714004). - Changed to apply strict-aliasing/RELRO for >= 12.x only OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=75
2011-08-29 17:37:53 +02:00
@@ -119,6 +119,7 @@ main(int argc, char **argv) {
int no_dhclient_db = 0;
int no_dhclient_pid = 0;
int no_dhclient_script = 0;
+ char *dhclient_hostname = NULL;
#ifdef DHCPv6
int local_family_set = 0;
#endif /* DHCPv6 */
- Updated to ISC dhcp-4.2.2 release, providing two security fixes (CVE-2011-2748,CVE-2011-2749,[ISC-Bugs #24960],bnc#712653), that allowed remote attackers to cause a denial of service (a daemon exit) via crafted BOOTP packets. Further also DNS update fix to detect overlapping pools or misconfigured fixed-address entries, that caused a server crash during DNS update and other fixes. For a complete list, please see the RELNOTES file provided in the package and also available online at http://www.isc.org/. - Merged/adopted dhclient option-checks, send-hostname-rml, ldap patch, xen-checksum, close-on-exec patches and removed obsolete in6_pktinfo-prototype and relay-no-ip-on-interface patches. - Moved server pid files into chroot directory even chroot is not used and create a link in /var/run, so it can write one when started as user without chroot and avoid stop problems when the chroot sysconfig setting changed (bnc#712438). - Disabled log-info level messages in dhclient(6) quiet mode to avoid excessive logging of non-critical messages (bnc#711420). - Fixed dhclient-script to not remove alias IP when it didn't changed to not wipe out iptables connmark when renewing the lease (bnc#700771). Thanks to James Carter for the patch. - Fixed DDNS-howto.txt reference in the config file; it has been moved to the dhcp-doc package (bnc#697279). - Removed GPL licensed files (bind-*/contrib/dbus) from bind.tgz to ensure, they're not used to build non-GPL dhcp (bnc#714004). - Changed to apply strict-aliasing/RELRO for >= 12.x only OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=75
2011-08-29 17:37:53 +02:00
@@ -231,6 +232,22 @@ main(int argc, char **argv) {
if (++i == argc)
usage();
mockup_relay = argv[i];
+ } else if (!strcmp (argv[i], "-H")) {
- Updated to ISC dhcp-4.2.2 release, providing two security fixes (CVE-2011-2748,CVE-2011-2749,[ISC-Bugs #24960],bnc#712653), that allowed remote attackers to cause a denial of service (a daemon exit) via crafted BOOTP packets. Further also DNS update fix to detect overlapping pools or misconfigured fixed-address entries, that caused a server crash during DNS update and other fixes. For a complete list, please see the RELNOTES file provided in the package and also available online at http://www.isc.org/. - Merged/adopted dhclient option-checks, send-hostname-rml, ldap patch, xen-checksum, close-on-exec patches and removed obsolete in6_pktinfo-prototype and relay-no-ip-on-interface patches. - Moved server pid files into chroot directory even chroot is not used and create a link in /var/run, so it can write one when started as user without chroot and avoid stop problems when the chroot sysconfig setting changed (bnc#712438). - Disabled log-info level messages in dhclient(6) quiet mode to avoid excessive logging of non-critical messages (bnc#711420). - Fixed dhclient-script to not remove alias IP when it didn't changed to not wipe out iptables connmark when renewing the lease (bnc#700771). Thanks to James Carter for the patch. - Fixed DDNS-howto.txt reference in the config file; it has been moved to the dhcp-doc package (bnc#697279). - Removed GPL licensed files (bind-*/contrib/dbus) from bind.tgz to ensure, they're not used to build non-GPL dhcp (bnc#714004). - Changed to apply strict-aliasing/RELRO for >= 12.x only OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=75
2011-08-29 17:37:53 +02:00
+ size_t len;
+ if (++i == argc || !argv[i] || *(argv[i]) == '\0')
+ usage ();
- Updated to ISC dhcp-4.2.2 release, providing two security fixes (CVE-2011-2748,CVE-2011-2749,[ISC-Bugs #24960],bnc#712653), that allowed remote attackers to cause a denial of service (a daemon exit) via crafted BOOTP packets. Further also DNS update fix to detect overlapping pools or misconfigured fixed-address entries, that caused a server crash during DNS update and other fixes. For a complete list, please see the RELNOTES file provided in the package and also available online at http://www.isc.org/. - Merged/adopted dhclient option-checks, send-hostname-rml, ldap patch, xen-checksum, close-on-exec patches and removed obsolete in6_pktinfo-prototype and relay-no-ip-on-interface patches. - Moved server pid files into chroot directory even chroot is not used and create a link in /var/run, so it can write one when started as user without chroot and avoid stop problems when the chroot sysconfig setting changed (bnc#712438). - Disabled log-info level messages in dhclient(6) quiet mode to avoid excessive logging of non-critical messages (bnc#711420). - Fixed dhclient-script to not remove alias IP when it didn't changed to not wipe out iptables connmark when renewing the lease (bnc#700771). Thanks to James Carter for the patch. - Fixed DDNS-howto.txt reference in the config file; it has been moved to the dhcp-doc package (bnc#697279). - Removed GPL licensed files (bind-*/contrib/dbus) from bind.tgz to ensure, they're not used to build non-GPL dhcp (bnc#714004). - Changed to apply strict-aliasing/RELRO for >= 12.x only OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=75
2011-08-29 17:37:53 +02:00
+ len = strlen (argv[i]);
+ if (len > HOST_NAME_MAX) {
+ log_error("-H option host-name string \"%s\" is too long:"
+ "maximum length is %d characters",
+ argv[i], HOST_NAME_MAX);
+ exit(1);
- Updated to ISC dhcp-4.2.2 release, providing two security fixes (CVE-2011-2748,CVE-2011-2749,[ISC-Bugs #24960],bnc#712653), that allowed remote attackers to cause a denial of service (a daemon exit) via crafted BOOTP packets. Further also DNS update fix to detect overlapping pools or misconfigured fixed-address entries, that caused a server crash during DNS update and other fixes. For a complete list, please see the RELNOTES file provided in the package and also available online at http://www.isc.org/. - Merged/adopted dhclient option-checks, send-hostname-rml, ldap patch, xen-checksum, close-on-exec patches and removed obsolete in6_pktinfo-prototype and relay-no-ip-on-interface patches. - Moved server pid files into chroot directory even chroot is not used and create a link in /var/run, so it can write one when started as user without chroot and avoid stop problems when the chroot sysconfig setting changed (bnc#712438). - Disabled log-info level messages in dhclient(6) quiet mode to avoid excessive logging of non-critical messages (bnc#711420). - Fixed dhclient-script to not remove alias IP when it didn't changed to not wipe out iptables connmark when renewing the lease (bnc#700771). Thanks to James Carter for the patch. - Fixed DDNS-howto.txt reference in the config file; it has been moved to the dhcp-doc package (bnc#697279). - Removed GPL licensed files (bind-*/contrib/dbus) from bind.tgz to ensure, they're not used to build non-GPL dhcp (bnc#714004). - Changed to apply strict-aliasing/RELRO for >= 12.x only OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=75
2011-08-29 17:37:53 +02:00
+ } else if(check_domain_name(argv[i], len, 0) != 0) {
+ log_error("suspect host-name in -H \"%s\"",
+ argv[i]);
+ exit(1);
+ }
+ dhclient_hostname = argv [i];
} else if (!strcmp(argv[i], "-nw")) {
nowait = 1;
} else if (!strcmp(argv[i], "-n")) {
- Updated to ISC dhcp-4.2.2 release, providing two security fixes (CVE-2011-2748,CVE-2011-2749,[ISC-Bugs #24960],bnc#712653), that allowed remote attackers to cause a denial of service (a daemon exit) via crafted BOOTP packets. Further also DNS update fix to detect overlapping pools or misconfigured fixed-address entries, that caused a server crash during DNS update and other fixes. For a complete list, please see the RELNOTES file provided in the package and also available online at http://www.isc.org/. - Merged/adopted dhclient option-checks, send-hostname-rml, ldap patch, xen-checksum, close-on-exec patches and removed obsolete in6_pktinfo-prototype and relay-no-ip-on-interface patches. - Moved server pid files into chroot directory even chroot is not used and create a link in /var/run, so it can write one when started as user without chroot and avoid stop problems when the chroot sysconfig setting changed (bnc#712438). - Disabled log-info level messages in dhclient(6) quiet mode to avoid excessive logging of non-critical messages (bnc#711420). - Fixed dhclient-script to not remove alias IP when it didn't changed to not wipe out iptables connmark when renewing the lease (bnc#700771). Thanks to James Carter for the patch. - Fixed DDNS-howto.txt reference in the config file; it has been moved to the dhcp-doc package (bnc#697279). - Removed GPL licensed files (bind-*/contrib/dbus) from bind.tgz to ensure, they're not used to build non-GPL dhcp (bnc#714004). - Changed to apply strict-aliasing/RELRO for >= 12.x only OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=75
2011-08-29 17:37:53 +02:00
@@ -484,6 +501,35 @@ main(int argc, char **argv) {
/* Parse the dhclient.conf file. */
read_client_conf();
+ /* If the user specified a hostname, send it here and now */
+ if ((dhclient_hostname != NULL) && (*dhclient_hostname != '\0') ) {
+ struct parse *cfile = NULL;
+ char buf[HOST_NAME_MAX + 40];
+ int len;
+
- Updated to ISC dhcp-4.2.2 release, providing two security fixes (CVE-2011-2748,CVE-2011-2749,[ISC-Bugs #24960],bnc#712653), that allowed remote attackers to cause a denial of service (a daemon exit) via crafted BOOTP packets. Further also DNS update fix to detect overlapping pools or misconfigured fixed-address entries, that caused a server crash during DNS update and other fixes. For a complete list, please see the RELNOTES file provided in the package and also available online at http://www.isc.org/. - Merged/adopted dhclient option-checks, send-hostname-rml, ldap patch, xen-checksum, close-on-exec patches and removed obsolete in6_pktinfo-prototype and relay-no-ip-on-interface patches. - Moved server pid files into chroot directory even chroot is not used and create a link in /var/run, so it can write one when started as user without chroot and avoid stop problems when the chroot sysconfig setting changed (bnc#712438). - Disabled log-info level messages in dhclient(6) quiet mode to avoid excessive logging of non-critical messages (bnc#711420). - Fixed dhclient-script to not remove alias IP when it didn't changed to not wipe out iptables connmark when renewing the lease (bnc#700771). Thanks to James Carter for the patch. - Fixed DDNS-howto.txt reference in the config file; it has been moved to the dhcp-doc package (bnc#697279). - Removed GPL licensed files (bind-*/contrib/dbus) from bind.tgz to ensure, they're not used to build non-GPL dhcp (bnc#714004). - Changed to apply strict-aliasing/RELRO for >= 12.x only OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=75
2011-08-29 17:37:53 +02:00
+ snprintf (buf, sizeof(buf), "send host-name \"%s\";",
+ dhclient_hostname);
+ len = strlen(buf);
+
- Updated to ISC dhcp-4.2.2 release, providing two security fixes (CVE-2011-2748,CVE-2011-2749,[ISC-Bugs #24960],bnc#712653), that allowed remote attackers to cause a denial of service (a daemon exit) via crafted BOOTP packets. Further also DNS update fix to detect overlapping pools or misconfigured fixed-address entries, that caused a server crash during DNS update and other fixes. For a complete list, please see the RELNOTES file provided in the package and also available online at http://www.isc.org/. - Merged/adopted dhclient option-checks, send-hostname-rml, ldap patch, xen-checksum, close-on-exec patches and removed obsolete in6_pktinfo-prototype and relay-no-ip-on-interface patches. - Moved server pid files into chroot directory even chroot is not used and create a link in /var/run, so it can write one when started as user without chroot and avoid stop problems when the chroot sysconfig setting changed (bnc#712438). - Disabled log-info level messages in dhclient(6) quiet mode to avoid excessive logging of non-critical messages (bnc#711420). - Fixed dhclient-script to not remove alias IP when it didn't changed to not wipe out iptables connmark when renewing the lease (bnc#700771). Thanks to James Carter for the patch. - Fixed DDNS-howto.txt reference in the config file; it has been moved to the dhcp-doc package (bnc#697279). - Removed GPL licensed files (bind-*/contrib/dbus) from bind.tgz to ensure, they're not used to build non-GPL dhcp (bnc#714004). - Changed to apply strict-aliasing/RELRO for >= 12.x only OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=75
2011-08-29 17:37:53 +02:00
+ status = new_parse (&cfile, -1, buf, len,
+ "host-name option", 0);
+ if (status != ISC_R_SUCCESS)
+ log_fatal ("Cannot parse send host-name statement!");
+
+ for (;;) {
+ const char *val = NULL;
+ int token;
+
+ token = peek_token (&val, (unsigned *)0, cfile);
+ if (token == END_OF_FILE)
+ break;
+
- Updated to ISC dhcp-4.2.2 release, providing two security fixes (CVE-2011-2748,CVE-2011-2749,[ISC-Bugs #24960],bnc#712653), that allowed remote attackers to cause a denial of service (a daemon exit) via crafted BOOTP packets. Further also DNS update fix to detect overlapping pools or misconfigured fixed-address entries, that caused a server crash during DNS update and other fixes. For a complete list, please see the RELNOTES file provided in the package and also available online at http://www.isc.org/. - Merged/adopted dhclient option-checks, send-hostname-rml, ldap patch, xen-checksum, close-on-exec patches and removed obsolete in6_pktinfo-prototype and relay-no-ip-on-interface patches. - Moved server pid files into chroot directory even chroot is not used and create a link in /var/run, so it can write one when started as user without chroot and avoid stop problems when the chroot sysconfig setting changed (bnc#712438). - Disabled log-info level messages in dhclient(6) quiet mode to avoid excessive logging of non-critical messages (bnc#711420). - Fixed dhclient-script to not remove alias IP when it didn't changed to not wipe out iptables connmark when renewing the lease (bnc#700771). Thanks to James Carter for the patch. - Fixed DDNS-howto.txt reference in the config file; it has been moved to the dhcp-doc package (bnc#697279). - Removed GPL licensed files (bind-*/contrib/dbus) from bind.tgz to ensure, they're not used to build non-GPL dhcp (bnc#714004). - Changed to apply strict-aliasing/RELRO for >= 12.x only OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=75
2011-08-29 17:37:53 +02:00
+ parse_client_statement (cfile, NULL,
+ &top_level_config);
+ }
+ end_parse (&cfile);
+ }
+
/* Parse the lease database. */
read_client_leases();
- Updated to ISC dhcp-4.2.2 release, providing two security fixes (CVE-2011-2748,CVE-2011-2749,[ISC-Bugs #24960],bnc#712653), that allowed remote attackers to cause a denial of service (a daemon exit) via crafted BOOTP packets. Further also DNS update fix to detect overlapping pools or misconfigured fixed-address entries, that caused a server crash during DNS update and other fixes. For a complete list, please see the RELNOTES file provided in the package and also available online at http://www.isc.org/. - Merged/adopted dhclient option-checks, send-hostname-rml, ldap patch, xen-checksum, close-on-exec patches and removed obsolete in6_pktinfo-prototype and relay-no-ip-on-interface patches. - Moved server pid files into chroot directory even chroot is not used and create a link in /var/run, so it can write one when started as user without chroot and avoid stop problems when the chroot sysconfig setting changed (bnc#712438). - Disabled log-info level messages in dhclient(6) quiet mode to avoid excessive logging of non-critical messages (bnc#711420). - Fixed dhclient-script to not remove alias IP when it didn't changed to not wipe out iptables connmark when renewing the lease (bnc#700771). Thanks to James Carter for the patch. - Fixed DDNS-howto.txt reference in the config file; it has been moved to the dhcp-doc package (bnc#697279). - Removed GPL licensed files (bind-*/contrib/dbus) from bind.tgz to ensure, they're not used to build non-GPL dhcp (bnc#714004). - Changed to apply strict-aliasing/RELRO for >= 12.x only OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=75
2011-08-29 17:37:53 +02:00
@@ -708,9 +754,9 @@ static void usage()
- Updated to ISC dhcp-4.2.2 release, providing two security fixes (CVE-2011-2748,CVE-2011-2749,[ISC-Bugs #24960],bnc#712653), that allowed remote attackers to cause a denial of service (a daemon exit) via crafted BOOTP packets. Further also DNS update fix to detect overlapping pools or misconfigured fixed-address entries, that caused a server crash during DNS update and other fixes. For a complete list, please see the RELNOTES file provided in the package and also available online at http://www.isc.org/. - Merged/adopted dhclient option-checks, send-hostname-rml, ldap patch, xen-checksum, close-on-exec patches and removed obsolete in6_pktinfo-prototype and relay-no-ip-on-interface patches. - Moved server pid files into chroot directory even chroot is not used and create a link in /var/run, so it can write one when started as user without chroot and avoid stop problems when the chroot sysconfig setting changed (bnc#712438). - Disabled log-info level messages in dhclient(6) quiet mode to avoid excessive logging of non-critical messages (bnc#711420). - Fixed dhclient-script to not remove alias IP when it didn't changed to not wipe out iptables connmark when renewing the lease (bnc#700771). Thanks to James Carter for the patch. - Fixed DDNS-howto.txt reference in the config file; it has been moved to the dhcp-doc package (bnc#697279). - Removed GPL licensed files (bind-*/contrib/dbus) from bind.tgz to ensure, they're not used to build non-GPL dhcp (bnc#714004). - Changed to apply strict-aliasing/RELRO for >= 12.x only OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=75
2011-08-29 17:37:53 +02:00
log_fatal("Usage: dhclient "
#ifdef DHCPv6
- Updated to ISC dhcp-4.2.2 release, providing two security fixes (CVE-2011-2748,CVE-2011-2749,[ISC-Bugs #24960],bnc#712653), that allowed remote attackers to cause a denial of service (a daemon exit) via crafted BOOTP packets. Further also DNS update fix to detect overlapping pools or misconfigured fixed-address entries, that caused a server crash during DNS update and other fixes. For a complete list, please see the RELNOTES file provided in the package and also available online at http://www.isc.org/. - Merged/adopted dhclient option-checks, send-hostname-rml, ldap patch, xen-checksum, close-on-exec patches and removed obsolete in6_pktinfo-prototype and relay-no-ip-on-interface patches. - Moved server pid files into chroot directory even chroot is not used and create a link in /var/run, so it can write one when started as user without chroot and avoid stop problems when the chroot sysconfig setting changed (bnc#712438). - Disabled log-info level messages in dhclient(6) quiet mode to avoid excessive logging of non-critical messages (bnc#711420). - Fixed dhclient-script to not remove alias IP when it didn't changed to not wipe out iptables connmark when renewing the lease (bnc#700771). Thanks to James Carter for the patch. - Fixed DDNS-howto.txt reference in the config file; it has been moved to the dhcp-doc package (bnc#697279). - Removed GPL licensed files (bind-*/contrib/dbus) from bind.tgz to ensure, they're not used to build non-GPL dhcp (bnc#714004). - Changed to apply strict-aliasing/RELRO for >= 12.x only OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=75
2011-08-29 17:37:53 +02:00
- "[-4|-6] [-SNTP1dvrx] [-nw] [-p <port>] [-D LL|LLT]\n"
+ "[-4|-6] [-SNTP1dvrx] [-nw] [-H <hostname>] [-p <port>] [-D LL|LLT]\n"
#else /* DHCPv6 */
- Updated to ISC dhcp-4.2.2 release, providing two security fixes (CVE-2011-2748,CVE-2011-2749,[ISC-Bugs #24960],bnc#712653), that allowed remote attackers to cause a denial of service (a daemon exit) via crafted BOOTP packets. Further also DNS update fix to detect overlapping pools or misconfigured fixed-address entries, that caused a server crash during DNS update and other fixes. For a complete list, please see the RELNOTES file provided in the package and also available online at http://www.isc.org/. - Merged/adopted dhclient option-checks, send-hostname-rml, ldap patch, xen-checksum, close-on-exec patches and removed obsolete in6_pktinfo-prototype and relay-no-ip-on-interface patches. - Moved server pid files into chroot directory even chroot is not used and create a link in /var/run, so it can write one when started as user without chroot and avoid stop problems when the chroot sysconfig setting changed (bnc#712438). - Disabled log-info level messages in dhclient(6) quiet mode to avoid excessive logging of non-critical messages (bnc#711420). - Fixed dhclient-script to not remove alias IP when it didn't changed to not wipe out iptables connmark when renewing the lease (bnc#700771). Thanks to James Carter for the patch. - Fixed DDNS-howto.txt reference in the config file; it has been moved to the dhcp-doc package (bnc#697279). - Removed GPL licensed files (bind-*/contrib/dbus) from bind.tgz to ensure, they're not used to build non-GPL dhcp (bnc#714004). - Changed to apply strict-aliasing/RELRO for >= 12.x only OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=75
2011-08-29 17:37:53 +02:00
- "[-1dvrx] [-nw] [-p <port>]\n"
+ "[-1dvrx] [-nw] [-H <hostname>] [-p <port>]\n"
#endif /* DHCPv6 */
- Updated to ISC dhcp-4.2.2 release, providing two security fixes (CVE-2011-2748,CVE-2011-2749,[ISC-Bugs #24960],bnc#712653), that allowed remote attackers to cause a denial of service (a daemon exit) via crafted BOOTP packets. Further also DNS update fix to detect overlapping pools or misconfigured fixed-address entries, that caused a server crash during DNS update and other fixes. For a complete list, please see the RELNOTES file provided in the package and also available online at http://www.isc.org/. - Merged/adopted dhclient option-checks, send-hostname-rml, ldap patch, xen-checksum, close-on-exec patches and removed obsolete in6_pktinfo-prototype and relay-no-ip-on-interface patches. - Moved server pid files into chroot directory even chroot is not used and create a link in /var/run, so it can write one when started as user without chroot and avoid stop problems when the chroot sysconfig setting changed (bnc#712438). - Disabled log-info level messages in dhclient(6) quiet mode to avoid excessive logging of non-critical messages (bnc#711420). - Fixed dhclient-script to not remove alias IP when it didn't changed to not wipe out iptables connmark when renewing the lease (bnc#700771). Thanks to James Carter for the patch. - Fixed DDNS-howto.txt reference in the config file; it has been moved to the dhcp-doc package (bnc#697279). - Removed GPL licensed files (bind-*/contrib/dbus) from bind.tgz to ensure, they're not used to build non-GPL dhcp (bnc#714004). - Changed to apply strict-aliasing/RELRO for >= 12.x only OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=75
2011-08-29 17:37:53 +02:00
" [-s server-addr] [-cf config-file] "
"[-lf lease-file]\n"
- Update to ISC dhcp-4.2.5 release. See RELNOTES file for the complete list of changes -- digest of fixes not in dhcp-4.2.4-P2: - Correct code to calculate rebind timing values in client [ISC-Bugs #29062] - Fix some issues in the code for parsing and printing options. [ISC-Bugs #22625,#27289,#27296,#27314] - Update the memory leakage debug code to work with v6. [ISC-Bugs #30297] - Relax the requirements for deleting an A or AAAA record. This relaxation was codified in RFC 4703. [ISC-Bugs #30734] - Modify the failover code to handle incorrect peer names better. [ISC-Bugs #30320] - Fix a set of issues that were discovered via a code inspection tool. [ISC-Bugs #23833] - Parsing unquoted base64 strings improved. [ISC-Bugs #23048] - The client now passes information about the options it requested from the server to the script code via environment variables. These variables are of the form requested_<option_name>=1 with the option name being the same as used in the new_* and old_* variables. [ISC-Bugs #29068] - Check the status value when trying to read from a connection to see if it may have been closed. If it appears closed don't try to read from it again. This avoids a potential busy-wait like loop when the peer names are mismatched. [ISC-Bugs #31231] - Remove an unused variable to keep compilers happy. [ISC-Bugs #31983] - Removed obsolete parsing and printing option patch [dhcp-4.2.4-parsing-and-printing-options.patch] - Merged dhcp-4.2.2-dhclient-send-hostname-rml.diff [dhcp-4.2.5-dhclient-send-hostname-rml.patch] OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=96
2013-01-11 12:58:29 +01:00
--
1.7.10.4