![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community, here is the log from the commit of package dhcp for openSUSE:Factory checked in at 2015-10-17 16:36:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/dhcp (Old) and /work/SRC/openSUSE:Factory/.dhcp.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "dhcp" Changes: -------- --- /work/SRC/openSUSE:Factory/dhcp/dhcp.changes 2015-02-16 17:24:16.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.dhcp.new/dhcp.changes 2015-10-17 16:36:41.000000000 +0200 @@ -1,0 +2,71 @@ +Tue Oct 13 12:59:00 UTC 2015 - mt@suse.de + +- Applied a patch by Jiri Popelka catching dhcp server aborts with + "Unable to set up timer: out of range" on very long or infinite + timer intervals / lease lifetimes (bsc#947780) + [+ 0019-dhcp-4.2.4-P1-interval.patch] +- Corrected patch references in and a missed (bsc#919959) patch + description in previous changelog entry. + +------------------------------------------------------------------- +Mon Sep 14 14:39:34 UTC 2015 - mt@suse.de + +- Update to dhcp-4.3.3 (fate#319067) provinding many bug fixes, + features and obsoletes several patches we were using before. + For complete changelog, please read the RELNOTES file shipped + along with this package or online at: + https://kb.isc.org/article/AA-01297/82/DHCP-4.3.3-Release-Notes.html +- 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] +- Removed obsolete patches included upstream now: + [- 0007-dhcp-4.2.6-ldap-mt01.patch, + - 0009-dhcp-4.2.6-xen-checksum.patch, + - 0013-dhcp-4.2.3-P1-dhclient-log-pid.patch, + - 0015-Ignore-SIGPIPE-to-not-die-in-socket-code.patch, + - 0016-server-log-DHCPv6-addresses-assigned-to-clients.patch, + - 0019-dhcp-4.2.x-ldap-debug-write.bnc835818.patch, + - 0021-dhcp-4.2.4-P2-bnc878846-conf-to-ldap.patch, + - 0022-dhcp-4.2.x-contrib-conf-to-ldap-reorder.886094.patch, + - 0023-dhcp-4.2.x-ddns-tsig-hmac-sha-support.890731.patch, + - 0025-dhcp-4.2.x-dhcpv6-retransmission-until-MRD.872609.patch, + - 0026-dhcp-4.2.x-disable-unused-ddns-port-in-server.891655.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, + + 0007-dhcp-4.1.1-P1-lpf-bind-msg-fix.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, + - 0027-dhcp-4.2.x-handle-ifa_addr-NULL.909189.patch, + + 0016-infiniband-support.patch] +- Moved dhcp-devel package include files and static libraries + to /usr/include/dhcp and /usr/lib/dhcp subdirectories. + DHCP requires a specific bind library version and conflicts + with the files shipped by bind-devel package, which is not + source and binary compatible (bsc#910686). +- Corrected changes to provide complete patch file references. +- Fixed server to not report success before send (bsc#919959) + [+ 0017-server-no-success-report-before-send.919959.patch] +- Fixed dhclient to check pre-init results reported by dhclient-script + and fail if pre-init fails for a requested interface (bsc#912098). + [+ 0018-client-fail-on-script-pre-init-error-bsc-912098.patch] + +------------------------------------------------------------------- Old: ---- 0006-dhcp-4.2.5-dhclient-send-hostname-rml.patch 0007-dhcp-4.2.6-ldap-mt01.patch 0008-dhcp-4.1.1-P1-lpf-bind-msg-fix.patch 0009-dhcp-4.2.6-xen-checksum.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 0013-dhcp-4.2.3-P1-dhclient-log-pid.patch 0014-Fixed-linux-interface-discovery-using-getifaddrs.patch 0015-Ignore-SIGPIPE-to-not-die-in-socket-code.patch 0016-server-log-DHCPv6-addresses-assigned-to-clients.patch 0017-dhcp-4.2.6-lpf-ip-over-ib-support.patch 0018-dhcp-4.2.6-improved-xid.patch 0019-dhcp-4.2.x-ldap-debug-write.bnc835818.patch 0020-dhcp-4.2.x-chown-server-leases.bnc868253.patch 0021-dhcp-4.2.4-P2-bnc878846-conf-to-ldap.patch 0022-dhcp-4.2.x-contrib-conf-to-ldap-reorder.886094.patch 0023-dhcp-4.2.x-ddns-tsig-hmac-sha-support.890731.patch 0024-dhcp-4.2.x-dhcpv6-decline-on-DAD-failure.872609.patch 0025-dhcp-4.2.x-dhcpv6-retransmission-until-MRD.872609.patch 0026-dhcp-4.2.x-disable-unused-ddns-port-in-server.891655.patch 0027-dhcp-4.2.x-handle-ifa_addr-NULL.909189.patch dhcp-4.2.6.tar.gz dhcp-4.2.6.tar.gz.asc New: ---- 0006-dhcp-4.3.2-dhclient-send-hostname-or-fqdn.patch 0007-dhcp-4.1.1-P1-lpf-bind-msg-fix.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 0014-dhclient6-unsigned-lifetimes-for-script-bsc-926159.patch 0015-Expose-next-server-DHCPv4-option-to-dhclient-script.patch 0016-infiniband-support.patch 0017-server-no-success-report-before-send.919959.patch 0018-client-fail-on-script-pre-init-error-bsc-912098.patch 0019-dhcp-4.2.4-P1-interval.patch dhcp-4.3.3.tar.gz dhcp-4.3.3.tar.gz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ dhcp.spec ++++++ --- /var/tmp/diff_new_pack.gDPltf/_old 2015-10-17 16:36:42.000000000 +0200 +++ /var/tmp/diff_new_pack.gDPltf/_new 2015-10-17 16:36:42.000000000 +0200 @@ -16,7 +16,7 @@ # -%define isc_version 4.2.6 +%define isc_version 4.3.3 %define susefw2dir %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services %define omc_prefix /usr/share/omc %define omc_svcdir %{omc_prefix}/svcinfo.d @@ -41,7 +41,7 @@ %endif BuildRequires: dos2unix BuildRequires: libtool -Version: 4.2.6 +Version: 4.3.3 Release: 0 Summary: Common Files Used by ISC DHCP Software License: BSD-3-Clause @@ -91,49 +91,33 @@ Patch3: 0003-dhcp-4.2.2-man-includes.patch Patch4: 0004-dhcp-4.1.1-tmpfile.patch Patch5: 0005-dhcp-4.1.1-dhclient-exec-filedes.patch -Patch6: 0006-dhcp-4.2.5-dhclient-send-hostname-rml.patch -# PATCH-FIX-UPSTREAM ldap-patch bnc#788787,bnc#784640 -Patch7: 0007-dhcp-4.2.6-ldap-mt01.patch +Patch6: 0006-dhcp-4.3.2-dhclient-send-hostname-or-fqdn.patch # PATCH-FIX-UPSTREAM lpf-bind-msg-fix bnc#617795 -Patch8: 0008-dhcp-4.1.1-P1-lpf-bind-msg-fix.patch -# PATCH-FIX-SLE xen-checksum bnc#668194 -Patch9: 0009-dhcp-4.2.6-xen-checksum.patch +Patch7: 0007-dhcp-4.1.1-P1-lpf-bind-msg-fix.patch # PATCH-FIX-SLE dhclient-option-checks bnc#675052 -Patch10: 0010-dhcp-4.2.2-dhclient-option-checks.patch +Patch8: 0008-dhcp-4.2.2-dhclient-option-checks.patch # PATCH-FIX-OPENSUSE close-on-exec bnc#732910 -Patch11: 0011-dhcp-4.2.6-close-on-exec.patch +Patch9: 0009-dhcp-4.2.6-close-on-exec.patch # PATCH-FIX-OPENSUSE quiet-dhclient bnc#711420 -Patch12: 0012-dhcp-4.2.2-quiet-dhclient.patch -# PATCH-FIX-OPENSUSE dhclient-log-pid -Patch13: 0013-dhcp-4.2.3-P1-dhclient-log-pid.patch +Patch10: 0010-dhcp-4.2.2-quiet-dhclient.patch # PATCH-FIX-UPSTREAM use-getifaddrs bnc#791289,ISC-Bugs#31992 -Patch14: 0014-Fixed-linux-interface-discovery-using-getifaddrs.patch -# PATCH-FIX-UPSTREAM no-die-on-SIGPIPE bnc#794578,ISC-Bugs#32222 -Patch15: 0015-Ignore-SIGPIPE-to-not-die-in-socket-code.patch -# PATCH-FEATURE-UPSTREAM log-dhcpv6-client-addresses ISC-Bugs#26377 -Patch16: 0016-server-log-DHCPv6-addresses-assigned-to-clients.patch -# PATCH-FIX-SLE dhcp-4.2.6-lpf-ip-over-ib-support bnc#870535 -Patch17: 0017-dhcp-4.2.6-lpf-ip-over-ib-support.patch -# PATCH-FIX-SLE dhcp-4.2.6-improved-xid bnc#870535 -Patch18: 0018-dhcp-4.2.6-improved-xid.patch -# PATCH-FIX-SLE dhcp-4.2.x-ldap-debug-write bug#835818 -Patch19: 0019-dhcp-4.2.x-ldap-debug-write.bnc835818.patch +Patch11: 0011-Fixed-linux-interface-discovery-using-getifaddrs.patch # PATCH-FIX-OPENSUSE dhcp-4.2.x-chown-server-leases bnc#868253 -Patch20: 0020-dhcp-4.2.x-chown-server-leases.bnc868253.patch -# PATCH-FIX-SLE dhcp-4.2.4-P2-bnc878846-conf-to-ldap bnc#878846 -Patch21: 0021-dhcp-4.2.4-P2-bnc878846-conf-to-ldap.patch -# PATCH-FIX-SLE dhcp-4.2.x-contrib-conf-to-ldap-reorder bnc#886094 -Patch22: 0022-dhcp-4.2.x-contrib-conf-to-ldap-reorder.886094.patch -# PATCH-FIX-OPENSUSE dhcp-4.2.x-ddns-tsig-hmac-sha-support bnc#890731 -Patch23: 0023-dhcp-4.2.x-ddns-tsig-hmac-sha-support.890731.patch +Patch12: 0012-dhcp-4.2.x-chown-server-leases.bnc868253.patch # PATCH-FIX-SLE dhcp-4.2.x-dhcpv6-decline-on-DAD-failure bnc#872609 -Patch24: 0024-dhcp-4.2.x-dhcpv6-decline-on-DAD-failure.872609.patch -# PATCH-FIX-SLE dhcp-4.2.x-dhcpv6-retransmission-until-MRD bnc#872609 -Patch25: 0025-dhcp-4.2.x-dhcpv6-retransmission-until-MRD.872609.patch -# PATCH-FIX-SLE dhcp-4.2.x-disable-unused-ddns-port-in-server bnc#891655 -Patch26: 0026-dhcp-4.2.x-disable-unused-ddns-port-in-server.891655.patch -# PATCH-FIX-SLE dhcp-4.2.x-handle-ifa_addr-NULL bsc#909189 -Patch27: 0027-dhcp-4.2.x-handle-ifa_addr-NULL.909189.patch +Patch13: 0013-dhcp-4.2.x-dhcpv6-decline-on-DAD-failure.872609.patch +# PATCH-FIX-SLE dhclient6-unsigned-lifetimes-for-script bsc#926159 +Patch14: 0014-dhclient6-unsigned-lifetimes-for-script-bsc-926159.patch +# PATCH-FIX-SLE Expose-next-server-DHCPv4-option-to-dhclient-script bsc#928390 +Patch15: 0015-Expose-next-server-DHCPv4-option-to-dhclient-script.patch +# PATCH-FIX-SLE infiniband-support bnc#870535,bsc#909189,bsc#910984 +Patch16: 0016-infiniband-support.patch +# PATCH-FIX-SLE server-no-success-report-before-send bsc#919959 +Patch17: 0017-server-no-success-report-before-send.919959.patch +# PATCH-FIX-SLE client-fail-on-script-pre-init-error bsc#912098 +Patch18: 0018-client-fail-on-script-pre-init-error-bsc-912098.patch +# PATCH-FIX-SLE dhcp-4.2.4-P1-interval bsc#947780 +Patch19: 0019-dhcp-4.2.4-P1-interval.patch ## PreReq: /bin/touch /sbin/chkconfig sysconfig BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -167,7 +151,6 @@ Summary: Header Files and Libraries for dhcpctl API Group: Development/Libraries/C and C++ Requires: dhcp = %{version} -Conflicts: bind-devel %if %{with_doc_package} @@ -253,9 +236,7 @@ %patch4 -p1 %patch5 -p1 %patch6 -p1 -%if %{with_ldap} %patch7 -p1 -%endif %patch8 -p1 %patch9 -p1 %patch10 -p1 @@ -268,14 +249,6 @@ %patch17 -p1 %patch18 -p1 %patch19 -p1 -%patch20 -p1 -%patch21 -p1 -%patch22 -p1 -%patch23 -p1 -%patch24 -p1 -%patch25 -p1 -%patch26 -p1 -%patch27 -p1 ## find . -type f -name \*.cat\* -exec rm -f {} \; dos2unix contrib/ms2isc/* @@ -317,8 +290,8 @@ export CFLAGS FFLAGS CXXFLAGS # %{?suse_update_config:%{suse_update_config -f}} -libtoolize --force -autoreconf -i +#libtoolize --force +#autoreconf -f -i # %configure \ --enable-dhcpv6 \ @@ -495,15 +468,20 @@ find contrib doc/examples -type f | xargs chmod -x # install bind libs+includes needed for dhcp-devel pushd bind -install -d -m0755 $RPM_BUILD_ROOT%_includedir/ +install -d -m0755 $RPM_BUILD_ROOT%_includedir/dhcp/ for i in include/* ; do - cp -r $i $RPM_BUILD_ROOT%_includedir/ + cp -r $i $RPM_BUILD_ROOT%_includedir/dhcp/ done -install -d -m0755 $RPM_BUILD_ROOT%_libdir/ +install -d -m0755 $RPM_BUILD_ROOT%_libdir/dhcp/ for l in lib/lib*.a ; do - install -m0644 $l $RPM_BUILD_ROOT%_libdir/ + install -m0644 $l $RPM_BUILD_ROOT%_libdir/dhcp/ done popd +# move also all dhcp-devel files to dhcp subdirectories +mv $RPM_BUILD_ROOT%_includedir/{dhcpctl,isc-dhcp,omapip} \ + $RPM_BUILD_ROOT%_includedir/dhcp/ +mv $RPM_BUILD_ROOT%_libdir/lib*.* \ + $RPM_BUILD_ROOT%_libdir/dhcp/ %pre server /usr/sbin/useradd -r -g nogroup -s /bin/false -c "DHCP server daemon" -d /var/lib/dhcp dhcpd 2> /dev/null ||: @@ -727,8 +705,10 @@ %files devel %defattr(-,root,root) -%_libdir/lib* -%{_prefix}/include/* +%dir %_libdir/dhcp +%_libdir/dhcp/lib* +%dir %{_prefix}/include/dhcp +%{_prefix}/include/dhcp/* %doc %{_mandir}/man3/omapi.3.gz %doc %{_mandir}/man3/dhcpctl.3.gz ++++++ 0004-dhcp-4.1.1-tmpfile.patch ++++++ --- /var/tmp/diff_new_pack.gDPltf/_old 2015-10-17 16:36:42.000000000 +0200 +++ /var/tmp/diff_new_pack.gDPltf/_new 2015-10-17 16:36:42.000000000 +0200 @@ -1,32 +1,25 @@ -From 1638d046d2a914164e19c6244df5b4deadaf6938 Mon Sep 17 00:00:00 2001 +From 70f2683580a88180238804546dd24a6a41427282 Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski <mt@suse.de> Date: Thu, 18 Aug 2011 10:06:01 +0200 Subject: [PATCH] dhcp-4.1.1-tmpfile ---- - server/db.c | 17 ++++++----------- - 1 file changed, 6 insertions(+), 11 deletions(-) +Signed-off-by: Marius Tomaschewski <mt@suse.de> diff --git a/server/db.c b/server/db.c -index 82f3841..c2630ea 100644 +index 5238ed8..0c642ad 100644 --- a/server/db.c +++ b/server/db.c -@@ -1088,21 +1088,16 @@ int new_lease_file () - - db_validity = lease_file_is_corrupt; - -- /* %Audit% Truncated filename causes panic. %2004.06.17,Safe% -- * This should never happen since the path is a configuration -- * variable from build-time or command-line. But if it should, -- * either by malice or ignorance, we panic, since the potential -- * for havoc is high. -- */ +@@ -1116,15 +1116,19 @@ int new_lease_file () + * either by malice or ignorance, we panic, since the potential + * for havoc is high. + */ - if (snprintf (newfname, sizeof newfname, "%s.%d", - path_dhcpd_db, (int)t) >= sizeof newfname) -- log_fatal("new_lease_file: lease file path too long"); -- ++ if (snprintf (newfname, sizeof newfname, "%s.XXXXXX", ++ path_dhcpd_db) >= sizeof newfname) + log_fatal("new_lease_file: lease file path too long"); + - db_fd = open (newfname, O_WRONLY | O_TRUNC | O_CREAT, 0664); -+ snprintf (newfname, sizeof(newfname), "%s.XXXXXX", path_dhcpd_db); + db_fd = mkstemp (newfname); if (db_fd < 0) { log_error ("Can't create new lease file: %m"); @@ -36,9 +29,9 @@ + log_error ("Can't fchmod new lease file: %m"); + goto fail; + } - if ((new_db_file = fdopen(db_fd, "w")) == NULL) { - log_error("Can't fdopen new lease file: %m"); - close(db_fd); + + #if defined (PARANOIA) + /* -- -1.8.4 +2.1.4 ++++++ 0006-dhcp-4.3.2-dhclient-send-hostname-or-fqdn.patch ++++++
From ec55fe43e597e5ea0f8dff5b8edef091c0911801 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.3.2-dhclient-send-hostname-or-fqdn
Signed-off-by: Marius Tomaschewski <mt@suse.de> diff --git a/client/dhclient.8 b/client/dhclient.8 index 5b05698..d9a26b7 100644 --- a/client/dhclient.8 +++ b/client/dhclient.8 @@ -66,6 +66,10 @@ dhclient - Dynamic Host Configuration Protocol Client .I LL|LLT ] [ +.B -H +.I hostname +] +[ .B -p .I port-number ] @@ -326,6 +330,11 @@ 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 as host-name (ipv4 only) or fqdn to perform dns update. +Note, that this option is a SUSE/Novell extension. +.TP .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 index cf612d1..0e39161 100644 --- a/client/dhclient.c +++ b/client/dhclient.c @@ -124,6 +124,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 */ @@ -241,6 +242,24 @@ main(int argc, char **argv) { if (++i == argc) usage(); mockup_relay = argv[i]; + } else if (!strcmp (argv[i], "-H")) { + size_t len; + if (++i == argc || !argv[i] || *(argv[i]) == '\0') + usage (); + len = strlen (argv[i]); + if (len > HOST_NAME_MAX) { + log_error("-H option hostname string \"%s\" is too long:" + "maximum length is %d characters", + argv[i], HOST_NAME_MAX); + exit(1); + } else if(check_domain_name(argv[i], len, + local_family == AF_INET6 ? 1 : 0) != 0) { + log_error("suspect %s in -H option: \"%s\"", + local_family == AF_INET6 ? "fqdn" : "hostname", + argv[i]); + exit(1); + } + dhclient_hostname = argv [i]; } else if (!strcmp(argv[i], "-nw")) { nowait = 1; } else if (!strcmp(argv[i], "-n")) { @@ -510,6 +529,48 @@ 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[1024] = {'\0'}; + int len; + + if (strchr(dhclient_hostname, '.')) { + len = strlen(dhclient_hostname); + snprintf (buf, sizeof(buf), + "send fqdn.fqdn \"%s%s\";\n" + "send fqdn.encoded on;\n" + "send fqdn.server-update on;\n" + "also request %s;\n", + dhclient_hostname, + dhclient_hostname[len - 1] == '.' ? "" : ".", + local_family == AF_INET6 ? "dhcp6.fqdn" : "fqdn"); + } else if (local_family == AF_INET) { + snprintf (buf, sizeof(buf), + "send host-name \"%s\";", + dhclient_hostname); + } + if ((len = strlen(buf))) { + status = new_parse (&cfile, -1, buf, len, + "hostname update options", 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; + + parse_client_statement (cfile, NULL, + &top_level_config); + } + end_parse (&cfile); + } + } + /* Parse the lease database. */ read_client_leases(); @@ -756,6 +817,7 @@ static void usage() #else /* DHCPv6 */ "[-I1dvrxi] [-nw] [-p <port>] [-D LL|LLT] \n" #endif /* DHCPv6 */ + " [-H hostname]\n" " [-s server-addr] [-cf config-file]\n" " [-df duid-file] [-lf lease-file]\n" " [-pf pid-file] [--no-pid] [-e VAR=val]\n" -- 2.1.4 ++++++ 0008-dhcp-4.1.1-P1-lpf-bind-msg-fix.patch -> 0007-dhcp-4.1.1-P1-lpf-bind-msg-fix.patch ++++++ --- /work/SRC/openSUSE:Factory/dhcp/0008-dhcp-4.1.1-P1-lpf-bind-msg-fix.patch 2014-02-13 06:44:48.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.dhcp.new/0007-dhcp-4.1.1-P1-lpf-bind-msg-fix.patch 2015-10-17 16:36:40.000000000 +0200 @@ -2,6 +2,7 @@ From: Marius Tomaschewski <mt@suse.de> Date: Tue, 12 Jun 2012 08:54:23 +0200 Subject: [PATCH] dhcp-4.1.1-P1-lpf-bind-msg-fix +References: bnc#617795 --- common/lpf.c | 2 +- ++++++ 0010-dhcp-4.2.2-dhclient-option-checks.patch -> 0008-dhcp-4.2.2-dhclient-option-checks.patch ++++++ --- /work/SRC/openSUSE:Factory/dhcp/0010-dhcp-4.2.2-dhclient-option-checks.patch 2014-02-13 06:44:48.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.dhcp.new/0008-dhcp-4.2.2-dhclient-option-checks.patch 2015-10-17 16:36:40.000000000 +0200 @@ -2,6 +2,7 @@ From: Marius Tomaschewski <mt@suse.de> Date: Wed, 27 Apr 2011 13:56:47 +0200 Subject: [PATCH] dhcp-4.2.2-dhclient-option-checks +References: bnc#643845 --- client/dhclient.c | 6 +++--- ++++++ 0011-dhcp-4.2.6-close-on-exec.patch -> 0009-dhcp-4.2.6-close-on-exec.patch ++++++ --- /work/SRC/openSUSE:Factory/dhcp/0011-dhcp-4.2.6-close-on-exec.patch 2014-02-13 06:44:48.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.dhcp.new/0009-dhcp-4.2.6-close-on-exec.patch 2015-10-17 16:36:40.000000000 +0200 @@ -1,29 +1,15 @@ -From 0ae45af28ebda5770465f84ac0f69f28ed6b7b07 Mon Sep 17 00:00:00 2001 +From ecb183516cf0b51ebf0a02f3b46248479fa51e43 Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski <mt@suse.de> Date: Thu, 18 Aug 2011 14:09:06 +0200 Subject: [PATCH] dhcp-4.2.6-close-on-exec ---- - client/clparse.c | 4 ++-- - client/dhclient.c | 10 +++++----- - common/bpf.c | 2 +- - common/discover.c | 4 ++-- - common/dlpi.c | 2 +- - common/nit.c | 2 +- - common/resolv.c | 2 +- - common/upf.c | 2 +- - dst/dst_api.c | 8 ++++---- - dst/prandom.c | 4 ++-- - omapip/trace.c | 6 +++--- - relay/dhcrelay.c | 5 +++-- - server/confpars.c | 2 +- - server/db.c | 6 +++--- - server/dhcpd.c | 4 ++-- - server/ldap.c | 2 +- - 16 files changed, 33 insertions(+), 32 deletions(-) +Merged fixed close-on-exec patch (bnc#732910) + +References: bnc#732910 +Signed-off-by: Marius Tomaschewski <mt@suse.de> diff --git a/client/clparse.c b/client/clparse.c -index 646229f..3e9f9b1 100644 +index 320c42f..b7e4251 100644 --- a/client/clparse.c +++ b/client/clparse.c @@ -221,7 +221,7 @@ int read_client_conf_file (const char *name, struct interface_info *ip, @@ -35,7 +21,7 @@ return uerr2isc (errno); cfile = NULL; -@@ -258,7 +258,7 @@ void read_client_leases () +@@ -297,7 +297,7 @@ void read_client_leases () /* Open the lease file. If we can't open it, just return - we can safely trust the server to remember our state. */ @@ -45,10 +31,10 @@ cfile = NULL; diff --git a/client/dhclient.c b/client/dhclient.c -index 19a527b..dbc6f38 100644 +index a077b48..ac36e3d 100644 --- a/client/dhclient.c +++ b/client/dhclient.c -@@ -422,7 +422,7 @@ main(int argc, char **argv) { +@@ -438,7 +438,7 @@ main(int argc, char **argv) { long temp; int e; @@ -57,7 +43,7 @@ e = fscanf(pidfd, "%ld\n", &temp); oldpid = (pid_t)temp; -@@ -2728,7 +2728,7 @@ void rewrite_client_leases () +@@ -2840,7 +2840,7 @@ void rewrite_client_leases () if (leaseFile != NULL) fclose (leaseFile); @@ -66,7 +52,7 @@ if (leaseFile == NULL) { log_error ("can't create %s: %m", path_dhclient_db); return; -@@ -2849,7 +2849,7 @@ write_duid(struct data_string *duid) +@@ -3033,7 +3033,7 @@ write_duid(struct data_string *duid) return DHCP_R_INVALIDARG; if (leaseFile == NULL) { /* XXX? */ @@ -75,7 +61,7 @@ if (leaseFile == NULL) { log_error("can't create %s: %m", path_dhclient_db); return ISC_R_IOERROR; -@@ -2897,7 +2897,7 @@ write_client6_lease(struct client_state *client, struct dhc6_lease *lease, +@@ -3081,7 +3081,7 @@ write_client6_lease(struct client_state *client, struct dhc6_lease *lease, return DHCP_R_INVALIDARG; if (leaseFile == NULL) { /* XXX? */ @@ -84,7 +70,7 @@ if (leaseFile == NULL) { log_error("can't create %s: %m", path_dhclient_db); return ISC_R_IOERROR; -@@ -3029,7 +3029,7 @@ int write_client_lease (client, lease, rewrite, makesure) +@@ -3213,7 +3213,7 @@ int write_client_lease (client, lease, rewrite, makesure) return 1; if (leaseFile == NULL) { /* XXX */ @@ -94,10 +80,10 @@ log_error ("can't create %s: %m", path_dhclient_db); return 0; diff --git a/common/bpf.c b/common/bpf.c -index 559b414..076d9bc 100644 +index 39d4f45..df9facc 100644 --- a/common/bpf.c +++ b/common/bpf.c -@@ -94,7 +94,7 @@ int if_register_bpf (info) +@@ -95,7 +95,7 @@ int if_register_bpf (info) for (b = 0; 1; b++) { /* %Audit% 31 bytes max. %2004.06.17,Safe% */ sprintf(filename, BPF_FORMAT, b); @@ -107,10 +93,10 @@ if (errno == EBUSY) { continue; diff --git a/common/discover.c b/common/discover.c -index 4b40a70..6a0540b 100644 +index 3cd64a7..37af780 100644 --- a/common/discover.c +++ b/common/discover.c -@@ -412,7 +412,7 @@ begin_iface_scan(struct iface_conf_list *ifaces) { +@@ -415,7 +415,7 @@ begin_iface_scan(struct iface_conf_list *ifaces) { int len; int i; @@ -119,7 +105,7 @@ if (ifaces->fp == NULL) { log_error("Error opening '/proc/net/dev' to list interfaces"); return 0; -@@ -447,7 +447,7 @@ begin_iface_scan(struct iface_conf_list *ifaces) { +@@ -450,7 +450,7 @@ begin_iface_scan(struct iface_conf_list *ifaces) { #ifdef DHCPv6 if (local_family == AF_INET6) { @@ -129,7 +115,7 @@ log_error("Error opening '/proc/net/if_inet6' to " "list IPv6 interfaces; %m"); diff --git a/common/dlpi.c b/common/dlpi.c -index 14e95d2..efaba3a 100644 +index c34adc3..944f21c 100644 --- a/common/dlpi.c +++ b/common/dlpi.c @@ -804,7 +804,7 @@ dlpiopen(const char *ifname) { @@ -142,7 +128,7 @@ /* diff --git a/common/nit.c b/common/nit.c -index 3fdef1d..dc62081 100644 +index 316e85f..6aa778b 100644 --- a/common/nit.c +++ b/common/nit.c @@ -75,7 +75,7 @@ int if_register_nit (info) @@ -168,7 +154,7 @@ return; } diff --git a/common/upf.c b/common/upf.c -index 6a02077..e5cafcf 100644 +index 34011eb..77d5878 100644 --- a/common/upf.c +++ b/common/upf.c @@ -71,7 +71,7 @@ int if_register_upf (info) @@ -180,70 +166,8 @@ if (sock < 0) { if (errno == EBUSY) { continue; -diff --git a/dst/dst_api.c b/dst/dst_api.c -index 3993b1e..aadcc1f 100644 ---- a/dst/dst_api.c -+++ b/dst/dst_api.c -@@ -437,7 +437,7 @@ dst_s_write_private_key(const DST_KEY *key) - PRIVATE_KEY, PATH_MAX); - - /* Do not overwrite an existing file */ -- if ((fp = dst_s_fopen(file, "w", 0600)) != NULL) { -+ if ((fp = dst_s_fopen(file, "we", 0600)) != NULL) { - int nn; - if ((nn = fwrite(encoded_block, 1, len, fp)) != len) { - EREPORT(("dst_write_private_key(): Write failure on %s %d != %d errno=%d\n", -@@ -495,7 +495,7 @@ dst_s_read_public_key(const char *in_name, const unsigned in_id, int in_alg) - * flags, proto, alg stored as decimal (or hex numbers FIXME). - * (FIXME: handle parentheses for line continuation.) - */ -- if ((fp = dst_s_fopen(name, "r", 0)) == NULL) { -+ if ((fp = dst_s_fopen(name, "re", 0)) == NULL) { - EREPORT(("dst_read_public_key(): Public Key not found %s\n", - name)); - return (NULL); -@@ -621,7 +621,7 @@ dst_s_write_public_key(const DST_KEY *key) - return (0); - } - /* create public key file */ -- if ((fp = dst_s_fopen(filename, "w+", 0644)) == NULL) { -+ if ((fp = dst_s_fopen(filename, "w+e", 0644)) == NULL) { - EREPORT(("DST_write_public_key: open of file:%s failed (errno=%d)\n", - filename, errno)); - return (0); -@@ -855,7 +855,7 @@ dst_s_read_private_key_file(char *name, DST_KEY *pk_key, unsigned in_id, - return (0); - } - /* first check if we can find the key file */ -- if ((fp = dst_s_fopen(filename, "r", 0)) == NULL) { -+ if ((fp = dst_s_fopen(filename, "re", 0)) == NULL) { - EREPORT(("dst_s_read_private_key_file: Could not open file %s in directory %s\n", - filename, dst_path[0] ? dst_path : - (char *) getcwd(NULL, PATH_MAX - 1))); -diff --git a/dst/prandom.c b/dst/prandom.c -index d207993..775cb23 100644 ---- a/dst/prandom.c -+++ b/dst/prandom.c -@@ -270,7 +270,7 @@ get_dev_random(u_char *output, unsigned size) - - s = stat("/dev/random", &st); - if (s == 0 && S_ISCHR(st.st_mode)) { -- if ((fd = open("/dev/random", O_RDONLY | O_NONBLOCK)) != -1) { -+ if ((fd = open("/dev/random", O_RDONLY | O_NONBLOCK | O_CLOEXEC)) != -1) { - if ((n = read(fd, output, size)) < 0) - n = 0; - close(fd); -@@ -480,7 +480,7 @@ digest_file(dst_work *work) - work->file_digest = dst_free_key(work->file_digest); - return (0); - } -- if ((fp = fopen(name, "r")) == NULL) -+ if ((fp = fopen(name, "re")) == NULL) - return (0); - for (no = 0; (i = fread(buf, sizeof(*buf), sizeof(buf), fp)) > 0; - no += i) diff --git a/omapip/trace.c b/omapip/trace.c -index 23e4e50..846b42b 100644 +index f4115c1..4410c35 100644 --- a/omapip/trace.c +++ b/omapip/trace.c @@ -138,10 +138,10 @@ isc_result_t trace_begin (const char *filename, @@ -269,10 +193,10 @@ log_error("Can't open tracefile %s: %m", filename); return; diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c -index 6f42927..4ef6737 100644 +index 15b4997..9d39fae 100644 --- a/relay/dhcrelay.c +++ b/relay/dhcrelay.c -@@ -539,13 +539,14 @@ main(int argc, char **argv) { +@@ -558,13 +558,14 @@ main(int argc, char **argv) { if (no_pid_file == ISC_FALSE) { pfdesc = open(path_dhcrelay_pid, @@ -290,10 +214,10 @@ log_error("Can't fdopen %s: %m", path_dhcrelay_pid); diff --git a/server/confpars.c b/server/confpars.c -index 684f9c1..3b5a840 100644 +index 4b2907d..6aa5b3f 100644 --- a/server/confpars.c +++ b/server/confpars.c -@@ -110,7 +110,7 @@ isc_result_t read_conf_file (const char *filename, struct group *group, +@@ -111,7 +111,7 @@ isc_result_t read_conf_file (const char *filename, struct group *group, } #endif @@ -303,10 +227,10 @@ log_error ("Can't open lease database %s: %m --", path_dhcpd_db); diff --git a/server/db.c b/server/db.c -index c2630ea..59e96dd 100644 +index 0c642ad..e9a38fe 100644 --- a/server/db.c +++ b/server/db.c -@@ -1050,7 +1050,7 @@ void db_startup (testp) +@@ -1072,7 +1072,7 @@ void db_startup (testp) } #endif if (!testp) { @@ -315,51 +239,51 @@ if (!db_file) log_fatal ("Can't open %s for append.", path_dhcpd_db); expire_all_pools (); -@@ -1089,7 +1089,7 @@ int new_lease_file () - db_validity = lease_file_is_corrupt; +@@ -1120,7 +1120,7 @@ int new_lease_file () + path_dhcpd_db) >= sizeof newfname) + log_fatal("new_lease_file: lease file path too long"); - snprintf (newfname, sizeof(newfname), "%s.XXXXXX", path_dhcpd_db); - db_fd = mkstemp (newfname); + db_fd = mkostemp (newfname, O_CLOEXEC); if (db_fd < 0) { log_error ("Can't create new lease file: %m"); return 0; -@@ -1098,7 +1098,7 @@ int new_lease_file () - log_error ("Can't fchmod new lease file: %m"); - goto fail; +@@ -1145,7 +1145,7 @@ int new_lease_file () } + #endif /* PARANOIA */ + - if ((new_db_file = fdopen(db_fd, "w")) == NULL) { + if ((new_db_file = fdopen(db_fd, "we")) == NULL) { log_error("Can't fdopen new lease file: %m"); close(db_fd); goto fdfail; diff --git a/server/dhcpd.c b/server/dhcpd.c -index b4c1bef..41a9efe 100644 +index eecc89b..afef390 100644 --- a/server/dhcpd.c +++ b/server/dhcpd.c -@@ -805,7 +805,7 @@ main(int argc, char **argv) { +@@ -658,7 +658,7 @@ main(int argc, char **argv) { */ - if (no_pid_file == ISC_FALSE) { + if ((lftest == 0) && (no_pid_file == ISC_FALSE)) { /*Read previous pid file. */ -- if ((i = open (path_dhcpd_pid, O_RDONLY)) >= 0) { -+ if ((i = open (path_dhcpd_pid, O_RDONLY | O_CLOEXEC)) >= 0) { +- if ((i = open(path_dhcpd_pid, O_RDONLY)) >= 0) { ++ if ((i = open(path_dhcpd_pid, O_RDONLY | O_CLOEXEC)) >= 0) { status = read(i, pbuf, (sizeof pbuf) - 1); - close (i); + close(i); if (status > 0) { -@@ -824,7 +824,7 @@ main(int argc, char **argv) { - } - - /* Write new pid file. */ +@@ -758,7 +758,7 @@ main(int argc, char **argv) { + * appropriate. + */ + if (no_pid_file == ISC_FALSE) { - i = open(path_dhcpd_pid, O_WRONLY|O_CREAT|O_TRUNC, 0644); + i = open(path_dhcpd_pid, O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0644); if (i >= 0) { sprintf(pbuf, "%d\n", (int) getpid()); - IGNORE_RET (write(i, pbuf, strlen(pbuf))); + IGNORE_RET(write(i, pbuf, strlen(pbuf))); diff --git a/server/ldap.c b/server/ldap.c -index 6e7f508..d1cde27 100644 +index 2893b82..9530d9d 100644 --- a/server/ldap.c +++ b/server/ldap.c -@@ -1252,7 +1252,7 @@ ldap_start (void) +@@ -1442,7 +1442,7 @@ ldap_start (void) if (ldap_debug_file != NULL && ldap_debug_fd == -1) { @@ -369,5 +293,5 @@ log_error ("Error opening debug LDAP log file %s: %s", ldap_debug_file, strerror (errno)); -- -1.8.4 +2.1.4 ++++++ 0012-dhcp-4.2.2-quiet-dhclient.patch -> 0010-dhcp-4.2.2-quiet-dhclient.patch ++++++ --- /work/SRC/openSUSE:Factory/dhcp/0012-dhcp-4.2.2-quiet-dhclient.patch 2014-02-13 06:44:48.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.dhcp.new/0010-dhcp-4.2.2-quiet-dhclient.patch 2015-10-17 16:36:40.000000000 +0200 @@ -2,6 +2,7 @@ From: Marius Tomaschewski <mt@suse.de> Date: Thu, 18 Aug 2011 15:09:01 +0200 Subject: [PATCH] dhcp-4.2.2-quiet-dhclient +References: bnc#711420 --- client/dhclient.c | 3 +++ ++++++ 0014-Fixed-linux-interface-discovery-using-getifaddrs.patch -> 0011-Fixed-linux-interface-discovery-using-getifaddrs.patch ++++++ --- /work/SRC/openSUSE:Factory/dhcp/0014-Fixed-linux-interface-discovery-using-getifaddrs.patch 2014-02-13 06:44:48.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.dhcp.new/0011-Fixed-linux-interface-discovery-using-getifaddrs.patch 2015-10-17 16:36:40.000000000 +0200 @@ -2,6 +2,7 @@ From: Marius Tomaschewski <mt@suse.de> Date: Tue, 27 Nov 2012 17:44:06 +0100 Subject: [PATCH] Fixed linux interface discovery using getifaddrs +References: bnc#791289,[ISC-Bugs #31992] Unlike dhcp 3.x, dhcp 4.x scans interfaces from /proc/net/dev, which provides only true interface names. When the address set ++++++ 0020-dhcp-4.2.x-chown-server-leases.bnc868253.patch -> 0012-dhcp-4.2.x-chown-server-leases.bnc868253.patch ++++++ --- /work/SRC/openSUSE:Factory/dhcp/0020-dhcp-4.2.x-chown-server-leases.bnc868253.patch 2014-06-18 07:49:21.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.dhcp.new/0012-dhcp-4.2.x-chown-server-leases.bnc868253.patch 2015-10-17 16:36:40.000000000 +0200 @@ -1,10 +1,20 @@ +From 34e6100717f3de5a32ccb3234a949d017f789fdb Mon Sep 17 00:00:00 2001 +From: Marius Tomaschewski <mt@suse.de> +Date: Tue, 10 Jun 2014 02:42:32 +0000 +Subject: [PATCH] dhcp-4.2.x-chown-server-leases.bnc868253 + +Fixed dhcp server to chown leases to run user at start + References: bnc#868253 +Signed-off-by: Marius Tomaschewski <mt@suse.de> ---- dhcp-4.2.x/server/dhcpd.c -+++ dhcp-4.2.x/server/dhcpd.c 2014/06/10 01:59:13 -@@ -783,8 +783,19 @@ main(int argc, char **argv) { +diff --git a/server/dhcpd.c b/server/dhcpd.c +index afef390..0f5c640 100644 +--- a/server/dhcpd.c ++++ b/server/dhcpd.c +@@ -770,8 +770,19 @@ main(int argc, char **argv) { } - + #if defined (PARANOIA) - /* change uid to the specified one */ + /* ensure, the leases db is owned by the run user/group */ @@ -23,3 +33,6 @@ if (set_gid) { /* setgroups is done, OK */ if (setgroups (0, (void *)0)) +-- +2.1.4 + ++++++ 0024-dhcp-4.2.x-dhcpv6-decline-on-DAD-failure.872609.patch -> 0013-dhcp-4.2.x-dhcpv6-decline-on-DAD-failure.872609.patch ++++++ ++++++ 0014-dhclient6-unsigned-lifetimes-for-script-bsc-926159.patch ++++++
From 9267da086dcbb39509eae05d1d60ba37596a3f89 Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski <mt@suse.de> Date: Wed, 29 Apr 2015 11:18:36 +0200 Subject: dhclient6: unsigned lifetimes for script (bsc#926159)
Address/IA lifetimes are all unsigned, don't turn into signed (negative e.g. in infinite case) when passing them to scripts and format timestamps as long to not break them on 64bit archs. References: bsc#926159 diff --git a/client/dhc6.c b/client/dhc6.c index bec1c87..e4a85fc 100644 --- a/client/dhc6.c +++ b/client/dhc6.c @@ -3877,8 +3877,8 @@ dhc6_marshall_values(const char *prefix, struct client_state *client, client_envadd(client, prefix, "ip6_type", "temporary"); } - client_envadd(client, prefix, "life_starts", "%d", - (int)(addr->starts)); + client_envadd(client, prefix, "life_starts", "%ld", + (long)(addr->starts)); client_envadd(client, prefix, "preferred_life", "%u", addr->preferred_life); client_envadd(client, prefix, "max_life", "%u", @@ -3889,8 +3889,8 @@ dhc6_marshall_values(const char *prefix, struct client_state *client, if (ia != NULL) { client_envadd(client, prefix, "iaid", "%s", print_hex_1(4, ia->iaid, 12)); - client_envadd(client, prefix, "starts", "%d", - (int)(ia->starts)); + client_envadd(client, prefix, "starts", "%ld", + (long)(ia->starts)); client_envadd(client, prefix, "renew", "%u", ia->renew); client_envadd(client, prefix, "rebind", "%u", ia->rebind); } diff --git a/client/dhclient.c b/client/dhclient.c index 2eb28db..4d7394d 100644 --- a/client/dhclient.c +++ b/client/dhclient.c @@ -3119,13 +3119,13 @@ write_client6_lease(struct client_state *client, struct dhc6_lease *lease, return ISC_R_IOERROR; if (ia->ia_type != D6O_IA_TA) - stat = fprintf(leaseFile, " starts %d;\n" + stat = fprintf(leaseFile, " starts %ld;\n" " renew %u;\n" " rebind %u;\n", - (int)ia->starts, ia->renew, ia->rebind); + (long)ia->starts, ia->renew, ia->rebind); else - stat = fprintf(leaseFile, " starts %d;\n", - (int)ia->starts); + stat = fprintf(leaseFile, " starts %ld;\n", + (long)ia->starts); if (stat <= 0) return ISC_R_IOERROR; @@ -3142,10 +3142,10 @@ write_client6_lease(struct client_state *client, struct dhc6_lease *lease, if (stat <= 0) return ISC_R_IOERROR; - stat = fprintf(leaseFile, " starts %d;\n" + stat = fprintf(leaseFile, " starts %ld;\n" " preferred-life %u;\n" " max-life %u;\n", - (int)addr->starts, addr->preferred_life, + (long)addr->starts, addr->preferred_life, addr->max_life); if (stat <= 0) return ISC_R_IOERROR; @@ -3519,7 +3519,7 @@ void script_write_params (client, prefix, lease) universes [i], &es, client_option_envadd); } - client_envadd (client, prefix, "expiry", "%d", (int)(lease -> expiry)); + client_envadd (client, prefix, "expiry", "%ld", (long)(lease -> expiry)); } /* -- 2.1.4 ++++++ 0015-Expose-next-server-DHCPv4-option-to-dhclient-script.patch ++++++
From 5fd4d0595760acd3e4c2524c9747dc5c0042e173 Mon Sep 17 00:00:00 2001 From: Tomas Hozza <thozza@redhat.com> Date: Fri, 29 May 2015 13:56:58 +0200 Subject: Expose next-server DHCPv4 option to dhclient script
Currently dhclient does not exposes next-server option to the dhclient script. this patch fixes this. Signed-off-by: Tomas Hozza <thozza@redhat.com> References: bsc#928390 diff --git a/client/dhclient.c b/client/dhclient.c index 4d7394d..0c77ae2 100644 --- a/client/dhclient.c +++ b/client/dhclient.c @@ -1104,7 +1104,7 @@ void state_selecting (cpp) client -> state = S_REQUESTING; /* Bind to the address we received. */ - bind_lease (client); + bind_lease (client, NULL); return; } @@ -1294,11 +1294,12 @@ void dhcpack (packet) if (client -> new -> rebind < cur_time) client -> new -> rebind = TIME_MAX; - bind_lease (client); + bind_lease (client, &packet -> raw -> siaddr); } -void bind_lease (client) +void bind_lease (client, siaddr) struct client_state *client; + struct in_addr *siaddr; { struct timeval tv; @@ -1318,6 +1319,13 @@ void bind_lease (client) if (client->alias) script_write_params(client, "alias_", client->alias); + if (siaddr) { + char buf[INET_ADDRSTRLEN]; + + if (inet_ntop (AF_INET, (void *) siaddr, buf, sizeof (buf))) + client_envadd (client, "new_", "next_server", "%s", buf); + } + /* If the BOUND/RENEW code detects another machine using the offered address, it exits nonzero. We need to send a DHCPDECLINE and toss the lease. */ diff --git a/includes/dhcpd.h b/includes/dhcpd.h index 86d0afe..f0f4b20 100644 --- a/includes/dhcpd.h +++ b/includes/dhcpd.h @@ -2891,7 +2891,7 @@ void state_bound (void *); void state_stop (void *); void state_panic (void *); -void bind_lease (struct client_state *); +void bind_lease (struct client_state *, struct in_addr *); void make_client_options (struct client_state *, struct client_lease *, u_int8_t *, -- 2.1.4 ++++++ 0016-infiniband-support.patch ++++++ ++++ 1085 lines (skipped) ++++++ 0017-server-no-success-report-before-send.919959.patch ++++++
From ce15607bca2509bc2abd440000d25498ad589e27 Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski <mt@suse.de> Date: Mon, 14 Sep 2015 15:31:37 +0200 Subject: [PATCH] server: no success report before send (bsc#919959) References: bsc#919959
--- server/dhcp.c | 53 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/server/dhcp.c b/server/dhcp.c index 0f53ac2..3a610e8 100644 --- a/server/dhcp.c +++ b/server/dhcp.c @@ -3643,22 +3643,6 @@ void dhcp_reply (lease) } else s = (char *)0; - /* Say what we're doing... */ - log_info ("%s on %s to %s %s%s%svia %s", - (state -> offer - ? (state -> offer == DHCPACK ? "DHCPACK" : "DHCPOFFER") - : "BOOTREPLY"), - piaddr (lease -> ip_addr), - (lease -> hardware_addr.hlen - ? print_hw_addr (lease -> hardware_addr.hbuf [0], - lease -> hardware_addr.hlen - 1, - &lease -> hardware_addr.hbuf [1]) - : print_hex_1(lease->uid_len, lease->uid, 60)), - s ? "(" : "", s ? s : "", s ? ") " : "", - (state -> giaddr.s_addr - ? inet_ntoa (state -> giaddr) - : state -> ip -> name)); - /* Set up the hardware address... */ hto.hlen = lease -> hardware_addr.hlen; memcpy (hto.hbuf, lease -> hardware_addr.hbuf, hto.hlen); @@ -3695,12 +3679,13 @@ void dhcp_reply (lease) "packet over %s interface.", MDL, packet_length, fallback_interface->name); - } + free_lease_state (state, MDL); + lease -> state = (struct lease_state *)0; + return; + } - free_lease_state (state, MDL); - lease -> state = (struct lease_state *)0; - return; + goto report; } /* If the client is RENEWING, unicast to the client using the @@ -3733,11 +3718,13 @@ void dhcp_reply (lease) " packet over %s interface.", MDL, packet_length, fallback_interface->name); + + free_lease_state (state, MDL); + lease -> state = (struct lease_state *)0; + return; } - free_lease_state (state, MDL); - lease -> state = (struct lease_state *)0; - return; + goto report; } /* If it comes from a client that already knows its address @@ -3765,8 +3752,28 @@ void dhcp_reply (lease) log_error ("%s:%d: Failed to send %d byte long " "packet over %s interface.", MDL, packet_length, state->ip->name); + + free_lease_state (state, MDL); + lease -> state = (struct lease_state *)0; + return; } +report: + /* Say what we're doing... */ + log_info ("%s on %s to %s %s%s%svia %s", + (state -> offer + ? (state -> offer == DHCPACK ? "DHCPACK" : "DHCPOFFER") + : "BOOTREPLY"), + piaddr (lease -> ip_addr), + (lease -> hardware_addr.hlen + ? print_hw_addr (lease -> hardware_addr.hbuf [0], + lease -> hardware_addr.hlen - 1, + &lease -> hardware_addr.hbuf [1]) + : print_hex_1(lease->uid_len, lease->uid, 60)), + s ? "(" : "", s ? s : "", s ? ") " : "", + (state -> giaddr.s_addr + ? inet_ntoa (state -> giaddr) + : state -> ip -> name)); /* Free all of the entries in the option_state structure now that we're done with them. */ -- 2.1.4 ++++++ 0018-client-fail-on-script-pre-init-error-bsc-912098.patch ++++++
From 937561ef8c09e3281caba3c859e80ce2fcf23ce4 Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski <mt@suse.de> Date: Mon, 14 Sep 2015 18:53:34 +0200 Subject: [PATCH] client: fail on script pre-init error (bsc#912098) References: bsc#912098
diff --git a/client/dhclient.c b/client/dhclient.c index b438629..82d6ed5 100644 --- a/client/dhclient.c +++ b/client/dhclient.c @@ -632,7 +632,8 @@ main(int argc, char **argv) { * in case somebody cares. */ script_init(NULL, "NBI", NULL); - script_go(NULL); + if (script_go(NULL)) + log_fatal("dhclient-script was unable to pre-init"); /* * If we haven't been asked to persist, waiting for new @@ -644,6 +645,8 @@ main(int argc, char **argv) { exit(0); } } else if (!release_mode && !exit_mode) { + unsigned int failed = 0; + /* Call the script with the list of interfaces. */ for (ip = interfaces; ip; ip = ip->next) { /* @@ -665,7 +668,16 @@ main(int argc, char **argv) { "alias_", ip->client->alias); } - script_go(ip->client); + if (script_go(ip->client)) { + log_info("%s: unable to pre-init requested interface %s", + path_dhclient_script, ip->name); + ip->flags &= ~(INTERFACE_REQUESTED|INTERFACE_AUTOMATIC); + failed++; + } + } + if (failed) { + log_fatal("%s: unable to pre-init requested interfaces", + path_dhclient_script); } } -- 2.1.4 ++++++ 0019-dhcp-4.2.4-P1-interval.patch ++++++ commit 9a312e3cd914da2b6f32651c94d1d1d4fb0bf359 Author: Jiri Popelka <jpopelka@redhat.com> Date: Fri Jul 27 10:00:49 2012 +0200 isc_time_nowplusinterval() is not safe with 64-bit time_t (#662254, #789601) References: bsc#947780 Index: dhcp-4.2.4-P2/common/dispatch.c =================================================================== --- dhcp-4.2.4-P2.orig/common/dispatch.c +++ dhcp-4.2.4-P2/common/dispatch.c @@ -320,7 +320,20 @@ void add_timeout (when, where, what, ref q->next = timeouts; timeouts = q; - isc_interval_set(&interval, sec & DHCP_SEC_MAX, usec * 1000); + /* isc_time_nowplusinterval() is not safe with 64-bit time_t and will + * return an error for sufficiently large intervals. We have to limit + * the interval to INT_MAX or less to ensure the interval doesn't + * overflow 32 bits, since the returned isc_time_t fields are + * 32-bit unsigned ints. + * + * HACK: The 9 is a magic number of seconds, since some time may have + * gone by since the last call to gettimeofday() and the one in + * isc_time_nowplusinterval(). + */ + if (sec > TIME_MAX) + sec = TIME_MAX - 9; + + isc_interval_set(&interval, sec, usec * 1000); status = isc_time_nowplusinterval(&expires, &interval); if (status != ISC_R_SUCCESS) { /* ++++++ dhcp-4.2.6.tar.gz -> dhcp-4.3.3.tar.gz ++++++ /work/SRC/openSUSE:Factory/dhcp/dhcp-4.2.6.tar.gz /work/SRC/openSUSE:Factory/.dhcp.new/dhcp-4.3.3.tar.gz differ: char 5, line 1 ++++++ dhcp.keyring ++++++ --- /var/tmp/diff_new_pack.gDPltf/_old 2015-10-17 16:36:42.000000000 +0200 +++ /var/tmp/diff_new_pack.gDPltf/_new 2015-10-17 16:36:42.000000000 +0200 @@ -1,33 +1,36 @@ -pub 2048R/189CDBC5 2013-01-31 Internet Systems Consortium, Inc. (Signing key, 2013) <codesign@isc.org> -sub 2048R/7F3D1D53 2013-01-31 [expires: 2015-01-31] +pub 2048R/911A4C02 2014-12-02 [verfällt: 2017-01-31] +uid Internet Systems Consortium, Inc. (Signing key, 2015-2016) <codesign@isc.org> +sig 911A4C02 2014-12-02 [selfsig] +sub 2048R/1BD14881 2014-12-02 [verfällt: 2017-01-31] +sig 911A4C02 2014-12-02 [keybind] -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.12 (NetBSD) +Version: GnuPG v1.4.11 (GNU/Linux) -mQENBFEKeFYBCADaN83gsb0VDjlGZkYra0PPlHz/eczKBU+/6I/VBq/FcsFEc27/ -O8IE05rIID10rXLjZ0k8y4ydvhI40eVZfxwaFvQEX/StVtU1ie3F7TS02ZuJ1yal -YRtU29hhnZ5icDdiJ98gcZSH2WKhIWLRpmc60Lja/sTsO0lkLPJe9x2MDuzkQu9M -Z7hlMgqZxZ1I/mQ/KsjT3oUt8euwyntg8/w/cpY8H0EVjyBnZWV2yejsLnbCo947 -hbjvUMSluGs7AZP0d+yqpGNsgRQ9iHy0NiL3ELdBqD22cqGRGTkX76KcLoXvqLVY -450bBtXsI2uUXy5iL/eUkUP2JgWQybjju/M3ABEBAAG0SEludGVybmV0IFN5c3Rl -bXMgQ29uc29ydGl1bSwgSW5jLiAoU2lnbmluZyBrZXksIDIwMTMpIDxjb2Rlc2ln -bkBpc2Mub3JnPokBPgQTAQIAKAUCUQp4VgIbAwUJA8JnAAYLCQgHAwIGFQgCCQoL -BBYCAwECHgECF4AACgkQRax4Vxic28XzIQf6AwLblJ98KI6l8gWqKVHMErYgl9+Q -RiIxrqJtyn4OjeZHX9diVjv2HlsRjnTpNl5MiSB9tXvq+GX696w6dtpoqYjZEQoP -ZCwE2USR6XO71eYO3rxLBnc0ymRvQm4zB2YKqworQDym0+wE8xiGBO8LyyVDfS5G -aGWXl0YJkfNYXzhEp6toIiLwRE0uP0TarHcHCo2CboVBgODvDZqwSBfT+i6dT+Gy -6nVEh3j7XnqgjCQ25cGev9sHR3hobT/fxG0F2YZ7sMwpWj9q0Y/dOlY7SV/ZGSs+ -ubKQ55BWsTjJRrNqyDX8QLb8oVic5q/yQkV+RTs1sP5s6JSs0KqQdyR3ZbkBDQRR -CnhWAQgApxtu688JKcr6NXWOneWXn1Pti2jRhdVKNlNkGgLJ76vQTVdMmmTDwEty -YQM6C9qjIXj8cEwz+LGRUXoCXOX9Yokf5oOjNpQutn4KVS+IRvWMYaK0qsTaa/c0 -FaIiFWvswyGucXAX/q9H5IoK8uYKXv5ww7+x3l1etg9/QdDQ/CANyMQbjBn38Wfn -Fy/zoUl+mMZLfqs+3NwT5C+m/4M99SoyC7XQLaZt3PBO4rVjUnMkCgiXsNdDIZnv -0XgUKyzSgrdPZcqKEG3yj8v5aTOC2k60Ffw1/ytA3hyfxLmdxxsyGyNQ4ZY8ZxmB -Z6AyUWVK95bL4oQqUCqfzSscHpWokQARAQABiQElBBgBAgAPBQJRCnhWAhsMBQkD -wmcAAAoJEEWseFcYnNvF4JAH/0MlU+Iwu5k6II3KufE2agMsRD2hk1VkpZcC08qi -LfHxX/4HrCZd7jcViLpFeK+I5JaDM2G21Co9jBMoPh+EUDnalG3eglXgeNEbUfAZ -pM7c9UejTNVmrw6crcgeUhKS2l0oBu9gRRlcSJEYY8XngfKJHBscCrsafp3RMVkO -m4Ti4CcxOot3uQ10U8GojjtWp7bgqIaFBF8aV8vugXJLl9IHqgVEtvo9miM+0Tfi -evOzuZMrgVY4zI2ZiLcrVM1KuIeZ2nIKbNWkJpDH2ZwUfsIx/KTxjpqld+NStzGQ -B9v1wazIBDHQU4hq5ddOlk0lrLDAmMJzHbavlduWmFRkuv4= -=bGLP +mQENBFR9szQBCADAwiKoEyFh32NHLc+c1vGgZ2lDKvXd7MoZZAOM2NUJkaDqt+Xy +537ycGmZRqukpGUsa0fDeqjOq+l4paX3QnW1DEs8ypnWi5Zme4lYHysmNeG33ihe +SMeGRbnZi+9VTho3NGv3iM9gtRMDXTB5wi7OCu0XNypUtR2afP9F9EgRs4nJ5iMz +o5c1y0wH4y+lJ33NCHZDj8ditl64yMbuVlZOD3UxoQqw/8E6T4rHly64g9s6Ld7o +YybSN/hKIXFZRqrTebEd2LwZqGhPQIgYDUdumwvtw6jfrosbMOx0tan3esnxlptl +fbkmOsoi8pPJqlo2VtLBx9XN53ZFMqc/Pj3tABEBAAG0TUludGVybmV0IFN5c3Rl +bXMgQ29uc29ydGl1bSwgSW5jLiAoU2lnbmluZyBrZXksIDIwMTUtMjAxNikgPGNv +ZGVzaWduQGlzYy5vcmc+iQE9BBMBAgAoBQJUfbM0AhsDBQkEEtKABgsJCAcDAgYV +CAIJCgsEFgIDAQIeAQIXgAAKCRBvpuvJkRpMAhD3B/ip18kQSE4//Yt8VMF6kciD +bcCQAOwy45/1frZaX9wS5ri/pdHxB0vw4SwrpJgJEkLGG0sEzRwS87QeFCtGDhIw +J/+5JX6in0cJ+hr2G7DJUpVgKp3Y8lEZ3ch+gAZ3k45uzzoOTT4tm6uXWlkOnlPJ +jUb1s9bVzL9zUsJ7XaV5x4aR3Bw53/izJEIaxWHj1CEjAzRC7wPQpo/EK+fWzFBf +enSCBJEvW1vkomtb1jMdj+uhod1LzFdXHdQjDCSKn/Glpn/YcZ9/LkiUSwNLTpL4 +CxDbEis4QWNDndAR/u9REC1zDW/xQEC3UxsB06Zm9NaWjAHy8s0rOihgoetaroa5 +AQ0EVH2zNAEIAK3gbs1saWWHWGxsPuhOf+x18g0/+N7f4fZE7TTetPNhdOgY0LGx +ul9VHRoZgvPbnm+BZmZhYGMr/oWlTEuF+sa/Dr8SKqVDjYIj0qOzimMLYgaKYV8S +Q8LhUFtUQjm5V5J/FQ97NzO2fPgEIo7JbIVrhsPEms+1gl9yanKW/+HUovl7KUyN +RovfaJdpO4uyuY9CGz875DqE39EhflBWN96bpCUmp9O/VQs4eJTp6pkv2EkMVcEa +dtFXAVFlSFe/OUd83gbVXM9NCRfY98ZJaB2OnI1/lU8OomdHOt+z6h7bdtC/w42q +sjBmu+y2Fth4WXzPd7WbfvVdlMjbBHZLn8EAEQEAAYkBJQQYAQIADwUCVH2zNAIb +DAUJBBLSgAAKCRBvpuvJkRpMAhEXB/0Xq9NqR7vgSZTed7esSMWqOLWZloKdjxys +3BA9h3EXCkF6gMdE4b6OkIUH0V2aFCYJXZmyFol0tq50aETD62aCgCOVtxlkx5VH +tTLl/T1Venf9TDISiEmDBI+3DDqjA3YOH86Fql7Jq+EMZx4e2L50PWWyRR3Lzjp6 +TFe9Xh4rqQJoI0OBtLyX13Nfe/Ar4Z85DX6O1sv/CM0aWkfGbdMAeeHrDVRKaraH +ULyyX4kfu+mZj8AthxMpVDyaHil9WCX1uwGo+6rkiuAMvURbn05h5C92t2QUQJE1 +rvBKpzLEBW8qQq5foo+8yHHWpzue4i4r2uEJ3+FLUsjtlU+3F+Pq +=dem0 -----END PGP PUBLIC KEY BLOCK-----