dhcp update, fix #2943
This commit is contained in:
@@ -41,7 +41,7 @@ def setup():
|
||||
--with-ldapcrypto")
|
||||
|
||||
def build():
|
||||
autotools.make()
|
||||
autotools.make("-j1")
|
||||
|
||||
def install():
|
||||
autotools.rawInstall("DESTDIR=%s" % get.installDIR())
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
diff -up dhcp-4.3.0a1/client/dhc6.c.honor-expired dhcp-4.3.0a1/client/dhc6.c
|
||||
--- dhcp-4.3.0a1/client/dhc6.c.honor-expired 2013-12-19 16:00:28.062183037 +0100
|
||||
+++ dhcp-4.3.0a1/client/dhc6.c 2013-12-19 16:00:28.076182842 +0100
|
||||
@@ -1351,6 +1351,32 @@ start_info_request6(struct client_state
|
||||
go_daemon();
|
||||
}
|
||||
|
||||
+/* Run through the addresses in lease and return true if there's any unexpired.
|
||||
+ * Return false otherwise.
|
||||
+ */
|
||||
+isc_boolean_t
|
||||
+unexpired_address_in_lease(struct dhc6_lease *lease)
|
||||
+{
|
||||
+ struct dhc6_ia *ia;
|
||||
+ struct dhc6_addr *addr;
|
||||
+
|
||||
+ for (ia = lease->bindings ; ia != NULL ; ia = ia->next) {
|
||||
+ for (addr = ia->addrs ; addr != NULL ; addr = addr->next) {
|
||||
+ if (addr->flags & DHC6_ADDR_EXPIRED)
|
||||
+ continue;
|
||||
+
|
||||
+ if (addr->starts + addr->max_life > cur_time) {
|
||||
+ return ISC_TRUE;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ log_info("PRC: Previous lease is devoid of active addresses."
|
||||
+ " Re-initializing.");
|
||||
+
|
||||
+ return ISC_FALSE;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* start_confirm6() kicks off an "init-reboot" version of the process, at
|
||||
* startup to find out if old bindings are 'fair' and at runtime whenever
|
||||
@@ -1363,8 +1389,10 @@ start_confirm6(struct client_state *clie
|
||||
|
||||
/* If there is no active lease, there is nothing to check. */
|
||||
if ((client->active_lease == NULL) ||
|
||||
- !active_prefix(client) ||
|
||||
- client->active_lease->released) {
|
||||
+ !active_prefix(client) ||
|
||||
+ client->active_lease->released ||
|
||||
+ !unexpired_address_in_lease(client->active_lease)) {
|
||||
+ dhc6_lease_destroy(&client->active_lease, MDL);
|
||||
start_init6(client);
|
||||
return;
|
||||
}
|
||||
+15
-37
@@ -14,44 +14,14 @@
|
||||
<IsA>service</IsA>
|
||||
<Summary>Dynamic host configuration protocol software</Summary>
|
||||
<Description>DHCP (Dynamic Host Configuration Protocol) is a protocol which allows individual devices on an IP network to get their own network configuration information (IP address, subnetmask, broadcast address, etc.) from a DHCP server.</Description>
|
||||
<Archive sha1sum="deed72a4636461042b74de68c2825dc52623e1d1" type="targz">http://ftp.isc.org/isc/dhcp/4.3.0/dhcp-4.3.0.tar.gz</Archive>
|
||||
<Archive sha1sum="fb0417530e49368fe032cd9722f51c74f93180ac" type="targz">http://ftp.isc.org/isc/dhcp/4.3.6/dhcp-4.3.6.tar.gz</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>groff</Dependency>
|
||||
<Dependency>openldap-client</Dependency>
|
||||
<Dependency>bind-devel</Dependency>
|
||||
<!--Dependency>bind-devel</Dependency-->
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<!--<Patch level="1">dhcp-4.2.0-errwarn-message.patch</Patch>-->
|
||||
<!--<Patch level="1">dhcp-4.3.0a1-errwarn-message.patch</Patch>-->
|
||||
<!--<Patch level="1">dhcp-4.2.0-options.patch</Patch>-->
|
||||
<Patch level="1">dhcp-4.2.0-release-by-ifup.patch</Patch>
|
||||
<Patch level="1">dhcp-4.2.0-dhclient-decline-backoff.patch</Patch>
|
||||
<Patch level="1">dhcp-4.2.0-unicast-bootp.patch</Patch>
|
||||
<!--<Patch level="1">dhcp-4.2.0-dhclient-usage.patch</Patch>-->
|
||||
<Patch level="1">dhcp-4.2.0-default-requested-options.patch</Patch>
|
||||
<!--<Patch level="1">dhcp-4.2.0-xen-checksum.patch</Patch>-->
|
||||
<Patch level="1">dhcp-4.2.0-paths.patch</Patch>
|
||||
<!--<Patch level="1">dhcp-4.2.0-CLOEXEC.patch</Patch>-->
|
||||
<Patch level="1">dhcp-4.2.0-inherit-leases.patch</Patch>
|
||||
<Patch level="1">dhcp-4.2.0-garbage-chars.patch</Patch>
|
||||
<!--<Patch level="1">dhcp-4.2.0-missing-ipv6-not-fatal.patch</Patch>-->
|
||||
<Patch level="1">dhcp-4.2.0-IFNAMSIZ.patch</Patch>
|
||||
<Patch level="1">dhcp-4.2.0-add_timeout_when_NULL.patch</Patch>
|
||||
<!--<Patch level="1">dhcp-4.2.1-capability.patch</Patch>-->
|
||||
<Patch level="1">dhcp-4.2.0-logpid.patch</Patch>
|
||||
<Patch level="1">dhcp-4.2.0-sendDecline.patch</Patch>
|
||||
<Patch level="1">dhcp-4.2.1-retransmission.patch</Patch>
|
||||
<!--<Patch level="1">dhcp-4.2.0-initialization-delay.patch</Patch>
|
||||
<Patch level="1">dhcp-4.2.0-rfc3442-classless-static-routes.patch</Patch>
|
||||
<Patch level="1">dhcp-4.2.1-PIE-RELRO.patch</Patch>-->
|
||||
<Patch level="1">dhcp-4.2.0-honor-expired.patch</Patch>
|
||||
<!--<Patch level="1">dhcp420-rh637017.patch</Patch>
|
||||
<Patch level="1">dhcp420-sharedlib.patch</Patch>-->
|
||||
<!--<Patch level="1">dhcp-4.2.0-PPP.patch</Patch>-->
|
||||
<Patch level="1">dhcp-4.3.0a1-PPP.patch</Patch>
|
||||
<Patch level="1">dhcp-4.2.0-P2-omapi.patch</Patch>
|
||||
<!--<Patch level="1">dhcp-4.2.1-P1-CVE-2011-0997.patch</Patch>
|
||||
<Patch level="1">dhcp-4.2.1-P1-CVE-2011-2748-2749.patch</Patch>-->
|
||||
<Patch level="1">0001-dhcp-honor-expired.patch</Patch>
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
@@ -59,7 +29,7 @@
|
||||
<Name>dhcp</Name>
|
||||
<RuntimeDependencies>
|
||||
<Dependency>openldap-client</Dependency>
|
||||
<Dependency>bind-libs</Dependency>
|
||||
<!--Dependency>bind-libs</Dependency-->
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="config">/etc</Path>
|
||||
@@ -89,10 +59,11 @@
|
||||
<Package>
|
||||
<Name>dhclient</Name>
|
||||
<IsA>app:console</IsA>
|
||||
<PartOf>network.connection</PartOf>
|
||||
<Summary>Provides the dhclient ISC DHCP client daemon</Summary>
|
||||
<RuntimeDependencies>
|
||||
<Dependency release="current">dhcp</Dependency>
|
||||
<Dependency>bind-libs</Dependency>
|
||||
<!--Dependency release="current">dhcp</Dependency-->
|
||||
<!--Dependency>bind-libs</Dependency-->
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<!--<Path fileType="config">/etc/NetworkManager/dispatcher.d/11*</Path>-->
|
||||
@@ -126,6 +97,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="4">
|
||||
<Date>2017-10-25</Date>
|
||||
<Version>4.3.6</Version>
|
||||
<Comment>Version bump,fix #2943</Comment>
|
||||
<Name>Ertuğrul Erata</Name>
|
||||
<Email>ertugrulerata@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="3">
|
||||
<Date>2017-05-09</Date>
|
||||
<Version>4.3.0</Version>
|
||||
@@ -148,4 +126,4 @@
|
||||
<Email>vedat@pisilinux.org</Email>
|
||||
</Update>
|
||||
</History>
|
||||
</PISI>
|
||||
</PISI>
|
||||
|
||||
Reference in New Issue
Block a user