]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
[master] Don't send expired addresses to the script in the client
authorShawn Routhier <sar@isc.org>
Tue, 12 May 2015 18:19:12 +0000 (11:19 -0700)
committerShawn Routhier <sar@isc.org>
Tue, 12 May 2015 18:19:12 +0000 (11:19 -0700)
Don't send expired addresses to the script in the client

RELNOTES
client/dhc6.c

index 3e32fae826eaa208dc6fae68cfd1acda2432e25a..5b6dc979602074a64ca4e5a24a5a566f559ed3b0 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -109,6 +109,11 @@ by Eric Young (eay@cryptsoft.com).
   table 3.
   [ISC-Bugs #38769]
 
+- In the client don't send expired addresses to the script as part of
+  the binding process.  Thanks to Sven Trenkel at Google for reporting
+  the issue and suggesting the patch.
+  [ISC-Bugs #38631]
+
                        Changes since 4.3.2rc2
 - None
 
index 04a8fa0086bd310621ec92ad6eab273ee277e323..33e35cdf745ee8436f253a7ead77624dcf58a873 100644 (file)
@@ -1,7 +1,7 @@
 /* dhc6.c - DHCPv6 client routines. */
 
 /*
- * Copyright (c) 2012-2014 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2012-2015 by Internet Systems Consortium, Inc. ("ISC")
  * Copyright (c) 2006-2010 by Internet Systems Consortium, Inc. ("ISC")
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -4259,6 +4259,10 @@ start_bound(struct client_state *client)
                        oldia = NULL;
 
                for (addr = ia->addrs ; addr != NULL ; addr = addr->next) {
+                       /* Don't try to use the address if it's already expired */
+                       if (addr->flags & DHC6_ADDR_EXPIRED)
+                               continue;
+
                        if (oldia != NULL) {
                                if (ia->ia_type != D6O_IA_PD)
                                        oldaddr = find_addr(oldia->addrs,