SHA256
1
0
forked from pool/dhcp
dhcp/0011-Fixed-linux-interface-discovery-using-getifaddrs.patch

111 lines
3.7 KiB
Diff
Raw Normal View History

- Initially switched to use systemd service files under systemd and enabled Restart=on-abort (fate#315133). - Update to ISC dhcp-4.2.6 release. See RELNOTES file for the complete list of changes -- digest of fixes not in dhcp-4.2.5: - Tidy up receive packet processing. Thanks to Brad Plank of GTA for reporting the issue and suggesting a possible patch. [ISC-Bugs #34447] - Fix the socket handling for DHCPv6 clients to allow multiple instances of a client on a single machine to work properly. Previously only one client would receive the packets. Thanks to Jiri Popelka at Red Hat for the bug report and a potential patch. [ISC-Bugs #34784] - Added support for gentle shutdown after signal is received. [ISC-Bugs #32692] [ISC-Bugs 34945] - Enhance the DHCPv6 server logging to include the addresses that are assigned to the clients. This can be enabled by defining LOG_V6_ADDRESSES in site.h. [ISC-Bugs #26377] - Fix an operation in the DDNS code to be a bitwise instead of logical or. [ISC-Bugs #35138] - Merged patches for dhcp-4.2.6 version to apply without fuzzy, prepended patch number prefixes to match spec file patch nr, added patch markup tags / bug numbers to the spec file. - Applied contrib-lease-path pach to contrib.tar.gz [- contrib-lease-path.diff] - Changed to require automake and use its config.sub and guess files instead of maintaining a patch. [- config-guess-sub-update.patch] - Enabled to log DHCPv6 addresses assigned by server to clients [+ 0016-server-log-DHCPv6-addresses-assigned-to-clients.patch] - Cleaned up documentation, rpmlint adjustments. OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=121
2014-02-10 19:14:12 +01:00
From bd50ec560d7bec064190e4d430c066e170732c0e Mon Sep 17 00:00:00 2001
- 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: Marius Tomaschewski <mt@suse.de>
Date: Tue, 27 Nov 2012 17:44:06 +0100
Subject: [PATCH] Fixed linux interface discovery using getifaddrs
For complete changelog, please read the RELNOTES file shipped along with this package or online at: - Replaced hostname patch with a dhcpv6 and fqdn aware variant: [- 0006-dhcp-4.2.5-dhclient-send-hostname-rml.patch, + 0006-dhcp-4.3.2-dhclient-send-hostname-or-fqdn.patch] - Adjusted patch numbers in the spec file: [- 0008-dhcp-4.1.1-P1-lpf-bind-msg-fix.patch, - 0010-dhcp-4.2.2-dhclient-option-checks.patch, - 0011-dhcp-4.2.6-close-on-exec.patch, - 0012-dhcp-4.2.2-quiet-dhclient.patch, - 0014-Fixed-linux-interface-discovery-using-getifaddrs.patch, - 0020-dhcp-4.2.x-chown-server-leases.bnc868253.patch, - 0024-dhcp-4.2.x-dhcpv6-decline-on-DAD-failure.872609.patch, + 0008-dhcp-4.2.2-dhclient-option-checks.patch, + 0009-dhcp-4.2.6-close-on-exec.patch, + 0010-dhcp-4.2.2-quiet-dhclient.patch, + 0011-Fixed-linux-interface-discovery-using-getifaddrs.patch, + 0012-dhcp-4.2.x-chown-server-leases.bnc868253.patch, + 0013-dhcp-4.2.x-dhcpv6-decline-on-DAD-failure.872609.patch] - Fixed to not pass DHCPv6 address lifetimes a positive (unsigned 32bit) integers to scripts and properly format timestamps as long to not break them on 64bit architectures (bsc#926159). [+ 0014-dhclient6-unsigned-lifetimes-for-script-bsc-926159.patch] - dhclient: expose next-server DHCPv4 option to script (bsc#928390) [+ 0015-Expose-next-server-DHCPv4-option-to-dhclient-script.patch] - Replaced infiniband support patch with fixed variant (bsc#910984): [- 0017-dhcp-4.2.6-lpf-ip-over-ib-support.patch, - 0018-dhcp-4.2.6-improved-xid.patch, + 0016-infiniband-support.patch] - Moved dhcp-devel package include files and static libraries OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=154
2015-09-14 17:35:16 +02:00
References: bnc#791289,[ISC-Bugs #31992]
- 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
Unlike dhcp 3.x, dhcp 4.x scans interfaces from /proc/net/dev,
which provides only true interface names. When the address set
on the interface has a label assigned (linux 2.0 alias interface
compatibility), then the SIOCGIFADDR requires the label / alias
name as argument instead of the interface name to return this
address. When this is the only address assigned to an interface,
dhcp-server is unable to find any address and fails to start.
Changed to use getifaddrs() function, which retrieves all IP
addresses on linux systems and is available since GLIBC 2.3.
Accepting request 508601 from home:ndas:branches:network:dhcp - fixed a typo in nis-servers option name breaking the config file introduced in previous change to workaround issues in NetworkManager parser. - Update to dhcp-4.3.5 - Corrected a bug which could cause the server to sporadically crash while loading lease files with the lease-id-format is set to "hex". Our thanks to Jay Ford, University of Iowa for reporting the issue. [ISC-Bugs #43185] - Eliminated a noisy, but otherwise harmless debug log statment that may appear during server startup when building with --enable-binary-leases and configuring multiple pools in a shared network. Thanks to Fernando Soto from BlueCat Networks for reporting the issue and supplying a patch. [ISC-Bugs #43262] - Fixed util/bindvar.sh error handling. [ISC-Bugs #41973] - Correct error message in relay to use remote id length instead of circuit id length. [ISC-Bugs #42556] - Add logic to test directory Makefiles to avoid copying Attfile(s) when building within the source tree. This eliminates a noisy but otherwise harmless error message when running "make check". [ISC-Bugs #41883] - Leases are now scrubbed of certain prior use information when pool re-balancing reassigns them from one FO peer to the other. This corrects an issue where leases that were offered but not used by the client retained the client hostname from the original client. Thanks to Pavel Polacek, Jan Evangelista Purkyne University for reporting the issue. [ISC-Bugs #42008] - In the LDAP code and schema add some missing '6' characters to use the v6 instead of the v4 versions. Thanks to Denis Taranushin for OBS-URL: https://build.opensuse.org/request/show/508601 OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=174
2017-07-06 17:49:46 +02:00
- 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
---
- Initially switched to use systemd service files under systemd and enabled Restart=on-abort (fate#315133). - Update to ISC dhcp-4.2.6 release. See RELNOTES file for the complete list of changes -- digest of fixes not in dhcp-4.2.5: - Tidy up receive packet processing. Thanks to Brad Plank of GTA for reporting the issue and suggesting a possible patch. [ISC-Bugs #34447] - Fix the socket handling for DHCPv6 clients to allow multiple instances of a client on a single machine to work properly. Previously only one client would receive the packets. Thanks to Jiri Popelka at Red Hat for the bug report and a potential patch. [ISC-Bugs #34784] - Added support for gentle shutdown after signal is received. [ISC-Bugs #32692] [ISC-Bugs 34945] - Enhance the DHCPv6 server logging to include the addresses that are assigned to the clients. This can be enabled by defining LOG_V6_ADDRESSES in site.h. [ISC-Bugs #26377] - Fix an operation in the DDNS code to be a bitwise instead of logical or. [ISC-Bugs #35138] - Merged patches for dhcp-4.2.6 version to apply without fuzzy, prepended patch number prefixes to match spec file patch nr, added patch markup tags / bug numbers to the spec file. - Applied contrib-lease-path pach to contrib.tar.gz [- contrib-lease-path.diff] - Changed to require automake and use its config.sub and guess files instead of maintaining a patch. [- config-guess-sub-update.patch] - Enabled to log DHCPv6 addresses assigned by server to clients [+ 0016-server-log-DHCPv6-addresses-assigned-to-clients.patch] - Cleaned up documentation, rpmlint adjustments. OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=121
2014-02-10 19:14:12 +01:00
common/discover.c | 51 ++++++++++++++++++++++++++++++++++++++++++++-------
1 file changed, 44 insertions(+), 7 deletions(-)
- 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
diff --git a/common/discover.c b/common/discover.c
Accepting request 508601 from home:ndas:branches:network:dhcp - fixed a typo in nis-servers option name breaking the config file introduced in previous change to workaround issues in NetworkManager parser. - Update to dhcp-4.3.5 - Corrected a bug which could cause the server to sporadically crash while loading lease files with the lease-id-format is set to "hex". Our thanks to Jay Ford, University of Iowa for reporting the issue. [ISC-Bugs #43185] - Eliminated a noisy, but otherwise harmless debug log statment that may appear during server startup when building with --enable-binary-leases and configuring multiple pools in a shared network. Thanks to Fernando Soto from BlueCat Networks for reporting the issue and supplying a patch. [ISC-Bugs #43262] - Fixed util/bindvar.sh error handling. [ISC-Bugs #41973] - Correct error message in relay to use remote id length instead of circuit id length. [ISC-Bugs #42556] - Add logic to test directory Makefiles to avoid copying Attfile(s) when building within the source tree. This eliminates a noisy but otherwise harmless error message when running "make check". [ISC-Bugs #41883] - Leases are now scrubbed of certain prior use information when pool re-balancing reassigns them from one FO peer to the other. This corrects an issue where leases that were offered but not used by the client retained the client hostname from the original client. Thanks to Pavel Polacek, Jan Evangelista Purkyne University for reporting the issue. [ISC-Bugs #42008] - In the LDAP code and schema add some missing '6' characters to use the v6 instead of the v4 versions. Thanks to Denis Taranushin for OBS-URL: https://build.opensuse.org/request/show/508601 OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=174
2017-07-06 17:49:46 +02:00
index 4463178..c48d67b 100644
- 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
--- a/common/discover.c
+++ b/common/discover.c
Accepting request 508601 from home:ndas:branches:network:dhcp - fixed a typo in nis-servers option name breaking the config file introduced in previous change to workaround issues in NetworkManager parser. - Update to dhcp-4.3.5 - Corrected a bug which could cause the server to sporadically crash while loading lease files with the lease-id-format is set to "hex". Our thanks to Jay Ford, University of Iowa for reporting the issue. [ISC-Bugs #43185] - Eliminated a noisy, but otherwise harmless debug log statment that may appear during server startup when building with --enable-binary-leases and configuring multiple pools in a shared network. Thanks to Fernando Soto from BlueCat Networks for reporting the issue and supplying a patch. [ISC-Bugs #43262] - Fixed util/bindvar.sh error handling. [ISC-Bugs #41973] - Correct error message in relay to use remote id length instead of circuit id length. [ISC-Bugs #42556] - Add logic to test directory Makefiles to avoid copying Attfile(s) when building within the source tree. This eliminates a noisy but otherwise harmless error message when running "make check". [ISC-Bugs #41883] - Leases are now scrubbed of certain prior use information when pool re-balancing reassigns them from one FO peer to the other. This corrects an issue where leases that were offered but not used by the client retained the client hostname from the original client. Thanks to Pavel Polacek, Jan Evangelista Purkyne University for reporting the issue. [ISC-Bugs #42008] - In the LDAP code and schema add some missing '6' characters to use the v6 instead of the v4 versions. Thanks to Denis Taranushin for OBS-URL: https://build.opensuse.org/request/show/508601 OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=174
2017-07-06 17:49:46 +02:00
@@ -373,7 +373,7 @@ end_iface_scan(struct iface_conf_list *ifaces) {
- 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
ifaces->sock = -1;
}
-#elif __linux /* !HAVE_SIOCGLIFCONF */
+#elif __linux && !(defined(__GNUC_PREREQ) && __GNUC_PREREQ(2,3)) /* !HAVE_SIOCGLIFCONF */
/*
* Linux support
* -------------
Accepting request 508601 from home:ndas:branches:network:dhcp - fixed a typo in nis-servers option name breaking the config file introduced in previous change to workaround issues in NetworkManager parser. - Update to dhcp-4.3.5 - Corrected a bug which could cause the server to sporadically crash while loading lease files with the lease-id-format is set to "hex". Our thanks to Jay Ford, University of Iowa for reporting the issue. [ISC-Bugs #43185] - Eliminated a noisy, but otherwise harmless debug log statment that may appear during server startup when building with --enable-binary-leases and configuring multiple pools in a shared network. Thanks to Fernando Soto from BlueCat Networks for reporting the issue and supplying a patch. [ISC-Bugs #43262] - Fixed util/bindvar.sh error handling. [ISC-Bugs #41973] - Correct error message in relay to use remote id length instead of circuit id length. [ISC-Bugs #42556] - Add logic to test directory Makefiles to avoid copying Attfile(s) when building within the source tree. This eliminates a noisy but otherwise harmless error message when running "make check". [ISC-Bugs #41883] - Leases are now scrubbed of certain prior use information when pool re-balancing reassigns them from one FO peer to the other. This corrects an issue where leases that were offered but not used by the client retained the client hostname from the original client. Thanks to Pavel Polacek, Jan Evangelista Purkyne University for reporting the issue. [ISC-Bugs #42008] - In the LDAP code and schema add some missing '6' characters to use the v6 instead of the v4 versions. Thanks to Denis Taranushin for OBS-URL: https://build.opensuse.org/request/show/508601 OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=174
2017-07-06 17:49:46 +02:00
@@ -382,6 +382,14 @@ end_iface_scan(struct iface_conf_list *ifaces) {
- 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
* about interfaces, along with selected ioctl() calls.
*
* Linux low level access is documented in the netdevice man page.
+ *
+ * Note: Use getifaddrs instead
+ * Unfortunately this discover discards all interfaces where the
+ * only address has a label assigned (linux 2.0 alias interface
+ * compatibility) as the SIOCGIFADDR requires the the alias name
+ * (eth0:0) in ifr_name to fetch the address and /proc/net/dev
+ * on linux > 2.0 lists only the interface names (eth0) without
+ * any aliases.
*/
/*
Accepting request 508601 from home:ndas:branches:network:dhcp - fixed a typo in nis-servers option name breaking the config file introduced in previous change to workaround issues in NetworkManager parser. - Update to dhcp-4.3.5 - Corrected a bug which could cause the server to sporadically crash while loading lease files with the lease-id-format is set to "hex". Our thanks to Jay Ford, University of Iowa for reporting the issue. [ISC-Bugs #43185] - Eliminated a noisy, but otherwise harmless debug log statment that may appear during server startup when building with --enable-binary-leases and configuring multiple pools in a shared network. Thanks to Fernando Soto from BlueCat Networks for reporting the issue and supplying a patch. [ISC-Bugs #43262] - Fixed util/bindvar.sh error handling. [ISC-Bugs #41973] - Correct error message in relay to use remote id length instead of circuit id length. [ISC-Bugs #42556] - Add logic to test directory Makefiles to avoid copying Attfile(s) when building within the source tree. This eliminates a noisy but otherwise harmless error message when running "make check". [ISC-Bugs #41883] - Leases are now scrubbed of certain prior use information when pool re-balancing reassigns them from one FO peer to the other. This corrects an issue where leases that were offered but not used by the client retained the client hostname from the original client. Thanks to Pavel Polacek, Jan Evangelista Purkyne University for reporting the issue. [ISC-Bugs #42008] - In the LDAP code and schema add some missing '6' characters to use the v6 instead of the v4 versions. Thanks to Denis Taranushin for OBS-URL: https://build.opensuse.org/request/show/508601 OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=174
2017-07-06 17:49:46 +02:00
@@ -755,11 +763,11 @@ end_iface_scan(struct iface_conf_list *ifaces) {
- 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
#else
/*
- * BSD support
- * -----------
+ * BSD & Linux support
+ * -------------------
*
* FreeBSD, NetBSD, OpenBSD, and OS X all have the getifaddrs()
- * function.
+ * function. Linux has it since glibc 2.3.
*
* The getifaddrs() man page describes the use.
*/
Accepting request 508601 from home:ndas:branches:network:dhcp - fixed a typo in nis-servers option name breaking the config file introduced in previous change to workaround issues in NetworkManager parser. - Update to dhcp-4.3.5 - Corrected a bug which could cause the server to sporadically crash while loading lease files with the lease-id-format is set to "hex". Our thanks to Jay Ford, University of Iowa for reporting the issue. [ISC-Bugs #43185] - Eliminated a noisy, but otherwise harmless debug log statment that may appear during server startup when building with --enable-binary-leases and configuring multiple pools in a shared network. Thanks to Fernando Soto from BlueCat Networks for reporting the issue and supplying a patch. [ISC-Bugs #43262] - Fixed util/bindvar.sh error handling. [ISC-Bugs #41973] - Correct error message in relay to use remote id length instead of circuit id length. [ISC-Bugs #42556] - Add logic to test directory Makefiles to avoid copying Attfile(s) when building within the source tree. This eliminates a noisy but otherwise harmless error message when running "make check". [ISC-Bugs #41883] - Leases are now scrubbed of certain prior use information when pool re-balancing reassigns them from one FO peer to the other. This corrects an issue where leases that were offered but not used by the client retained the client hostname from the original client. Thanks to Pavel Polacek, Jan Evangelista Purkyne University for reporting the issue. [ISC-Bugs #42008] - In the LDAP code and schema add some missing '6' characters to use the v6 instead of the v4 versions. Thanks to Denis Taranushin for OBS-URL: https://build.opensuse.org/request/show/508601 OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=174
2017-07-06 17:49:46 +02:00
@@ -817,10 +825,39 @@ next_iface(struct iface_info *info, int *err, struct iface_conf_list *ifaces) {
- 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
return 0;
}
Accepting request 508601 from home:ndas:branches:network:dhcp - fixed a typo in nis-servers option name breaking the config file introduced in previous change to workaround issues in NetworkManager parser. - Update to dhcp-4.3.5 - Corrected a bug which could cause the server to sporadically crash while loading lease files with the lease-id-format is set to "hex". Our thanks to Jay Ford, University of Iowa for reporting the issue. [ISC-Bugs #43185] - Eliminated a noisy, but otherwise harmless debug log statment that may appear during server startup when building with --enable-binary-leases and configuring multiple pools in a shared network. Thanks to Fernando Soto from BlueCat Networks for reporting the issue and supplying a patch. [ISC-Bugs #43262] - Fixed util/bindvar.sh error handling. [ISC-Bugs #41973] - Correct error message in relay to use remote id length instead of circuit id length. [ISC-Bugs #42556] - Add logic to test directory Makefiles to avoid copying Attfile(s) when building within the source tree. This eliminates a noisy but otherwise harmless error message when running "make check". [ISC-Bugs #41883] - Leases are now scrubbed of certain prior use information when pool re-balancing reassigns them from one FO peer to the other. This corrects an issue where leases that were offered but not used by the client retained the client hostname from the original client. Thanks to Pavel Polacek, Jan Evangelista Purkyne University for reporting the issue. [ISC-Bugs #42008] - In the LDAP code and schema add some missing '6' characters to use the v6 instead of the v4 versions. Thanks to Denis Taranushin for OBS-URL: https://build.opensuse.org/request/show/508601 OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=174
2017-07-06 17:49:46 +02:00
memset(info, 0, sizeof(struct iface_info));
- strncpy(info->name, ifaces->next->ifa_name, sizeof(info->name) - 1);
- 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
- memcpy(&info->addr, ifaces->next->ifa_addr,
- ifaces->next->ifa_addr->sa_len);
+ info->addr.ss_family = AF_UNSPEC;
info->flags = ifaces->next->ifa_flags;
+#ifdef __linux
+ if (strchr(ifaces->next->ifa_name, ':')) {
+ /*
+ * the name contains a ':', which may
+ * be a IPv4 "alias interface" label;
+ * resolve to the true interface name
+ */
+ if_indextoname(if_nametoindex(ifaces->next->ifa_name),
+ info->name);
+ } else {
Accepting request 508601 from home:ndas:branches:network:dhcp - fixed a typo in nis-servers option name breaking the config file introduced in previous change to workaround issues in NetworkManager parser. - Update to dhcp-4.3.5 - Corrected a bug which could cause the server to sporadically crash while loading lease files with the lease-id-format is set to "hex". Our thanks to Jay Ford, University of Iowa for reporting the issue. [ISC-Bugs #43185] - Eliminated a noisy, but otherwise harmless debug log statment that may appear during server startup when building with --enable-binary-leases and configuring multiple pools in a shared network. Thanks to Fernando Soto from BlueCat Networks for reporting the issue and supplying a patch. [ISC-Bugs #43262] - Fixed util/bindvar.sh error handling. [ISC-Bugs #41973] - Correct error message in relay to use remote id length instead of circuit id length. [ISC-Bugs #42556] - Add logic to test directory Makefiles to avoid copying Attfile(s) when building within the source tree. This eliminates a noisy but otherwise harmless error message when running "make check". [ISC-Bugs #41883] - Leases are now scrubbed of certain prior use information when pool re-balancing reassigns them from one FO peer to the other. This corrects an issue where leases that were offered but not used by the client retained the client hostname from the original client. Thanks to Pavel Polacek, Jan Evangelista Purkyne University for reporting the issue. [ISC-Bugs #42008] - In the LDAP code and schema add some missing '6' characters to use the v6 instead of the v4 versions. Thanks to Denis Taranushin for OBS-URL: https://build.opensuse.org/request/show/508601 OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=174
2017-07-06 17:49:46 +02:00
+ strncpy(info->name, ifaces->next->ifa_name, sizeof(info->name) - 1);
- 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
+ }
+
+ if (ifaces->next->ifa_addr != NULL) {
+ if (ifaces->next->ifa_addr->sa_family == AF_INET) {
+ memcpy(&info->addr, ifaces->next->ifa_addr,
+ sizeof(struct sockaddr_in));
+ } else
+ if (ifaces->next->ifa_addr->sa_family == AF_INET6) {
+ memcpy(&info->addr, ifaces->next->ifa_addr,
+ sizeof(struct sockaddr_in6));
+ }
+ /* else e.g. AF_PACKET / link layer address */
+ }
+#else
Accepting request 508601 from home:ndas:branches:network:dhcp - fixed a typo in nis-servers option name breaking the config file introduced in previous change to workaround issues in NetworkManager parser. - Update to dhcp-4.3.5 - Corrected a bug which could cause the server to sporadically crash while loading lease files with the lease-id-format is set to "hex". Our thanks to Jay Ford, University of Iowa for reporting the issue. [ISC-Bugs #43185] - Eliminated a noisy, but otherwise harmless debug log statment that may appear during server startup when building with --enable-binary-leases and configuring multiple pools in a shared network. Thanks to Fernando Soto from BlueCat Networks for reporting the issue and supplying a patch. [ISC-Bugs #43262] - Fixed util/bindvar.sh error handling. [ISC-Bugs #41973] - Correct error message in relay to use remote id length instead of circuit id length. [ISC-Bugs #42556] - Add logic to test directory Makefiles to avoid copying Attfile(s) when building within the source tree. This eliminates a noisy but otherwise harmless error message when running "make check". [ISC-Bugs #41883] - Leases are now scrubbed of certain prior use information when pool re-balancing reassigns them from one FO peer to the other. This corrects an issue where leases that were offered but not used by the client retained the client hostname from the original client. Thanks to Pavel Polacek, Jan Evangelista Purkyne University for reporting the issue. [ISC-Bugs #42008] - In the LDAP code and schema add some missing '6' characters to use the v6 instead of the v4 versions. Thanks to Denis Taranushin for OBS-URL: https://build.opensuse.org/request/show/508601 OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=174
2017-07-06 17:49:46 +02:00
+ strncpy(info->name, ifaces->next->ifa_name, sizeof(info->name) - 1);
- 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
+ if (ifaces->next->ifa_addr != NULL) {
+ memcpy(&info->addr, ifaces->next->ifa_addr,
+ ifaces->next->ifa_addr->sa_len);
+ }
+#endif
ifaces->next = ifaces->next->ifa_next;
*err = 0;
return 1;
--
Accepting request 508601 from home:ndas:branches:network:dhcp - fixed a typo in nis-servers option name breaking the config file introduced in previous change to workaround issues in NetworkManager parser. - Update to dhcp-4.3.5 - Corrected a bug which could cause the server to sporadically crash while loading lease files with the lease-id-format is set to "hex". Our thanks to Jay Ford, University of Iowa for reporting the issue. [ISC-Bugs #43185] - Eliminated a noisy, but otherwise harmless debug log statment that may appear during server startup when building with --enable-binary-leases and configuring multiple pools in a shared network. Thanks to Fernando Soto from BlueCat Networks for reporting the issue and supplying a patch. [ISC-Bugs #43262] - Fixed util/bindvar.sh error handling. [ISC-Bugs #41973] - Correct error message in relay to use remote id length instead of circuit id length. [ISC-Bugs #42556] - Add logic to test directory Makefiles to avoid copying Attfile(s) when building within the source tree. This eliminates a noisy but otherwise harmless error message when running "make check". [ISC-Bugs #41883] - Leases are now scrubbed of certain prior use information when pool re-balancing reassigns them from one FO peer to the other. This corrects an issue where leases that were offered but not used by the client retained the client hostname from the original client. Thanks to Pavel Polacek, Jan Evangelista Purkyne University for reporting the issue. [ISC-Bugs #42008] - In the LDAP code and schema add some missing '6' characters to use the v6 instead of the v4 versions. Thanks to Denis Taranushin for OBS-URL: https://build.opensuse.org/request/show/508601 OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=174
2017-07-06 17:49:46 +02:00
2.13.1
- 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