summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn Routhier <sar@isc.org>2015-07-29 10:56:26 -0700
committerShawn Routhier <sar@isc.org>2015-07-29 10:56:26 -0700
commitaf25ded3457a15f957496f39ed9074f60636878e (patch)
tree70e70b49f15a1be4a6939b5aa269b6f247d100b8
parent743d69375c0e46ebb343cb3c6fa768103b7080d0 (diff)
downloadisc-dhcp-af25ded3457a15f957496f39ed9074f60636878e.tar.gz
[master] Check that we were able to turn a packet into a lease.
Squashed commit of the following: [rt39279] Check that we were able to turn a packet into a lease.
-rw-r--r--RELNOTES9
-rw-r--r--client/dhc6.c10
2 files changed, 14 insertions, 5 deletions
diff --git a/RELNOTES b/RELNOTES
index ed310ae9..a2486d10 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -181,9 +181,9 @@ by Eric Young (eay@cryptsoft.com).
- LDAP Patches - Numerous small patches submitted by contributors have
been applied to the contributed code which supplies LDAP support.
- In addition, two larger submissions have also been included. The
- first adds support for IPv6 configuration adn the second provides
- GSSAPI authentication.
+ In addition, two larger submissions have also been included. The
+ first adds support for IPv6 configuration and the second provides
+ GSSAPI authentication.
[ISC-Bugs #39056]
[ISC-Bugs #22742]
[ISC-Bugs #24449]
@@ -199,6 +199,9 @@ by Eric Young (eay@cryptsoft.com).
[ISC-Bugs #36774]
[ISC-Bugs #37876]
+- Handle an out of memory condition in the client a bit better.
+ [ISC-Bugs #39279
+
Changes since 4.3.2rc2
- None
diff --git a/client/dhc6.c b/client/dhc6.c
index 33e35cdf..093271f9 100644
--- a/client/dhc6.c
+++ b/client/dhc6.c
@@ -2798,6 +2798,12 @@ init_handler(struct packet *packet, struct client_state *client)
lease = dhc6_leaseify(packet);
+ /* Out of memory or corrupt packet condition...hopefully a temporary
+ * problem. Returning now makes us try to retransmit later.
+ */
+ if (lease == NULL)
+ return;
+
if (dhc6_check_advertise(lease) != ISC_R_SUCCESS) {
log_debug("PRC: Lease failed to satisfy.");
dhc6_lease_destroy(&lease, MDL);
@@ -2915,7 +2921,7 @@ rapid_commit_handler(struct packet *packet, struct client_state *client)
lease = dhc6_leaseify(packet);
- /* This is an out of memory condition...hopefully a temporary
+ /* Out of memory or corrupt packet condition...hopefully a temporary
* problem. Returning now makes us try to retransmit later.
*/
if (lease == NULL)
@@ -3729,7 +3735,7 @@ reply_handler(struct packet *packet, struct client_state *client)
lease = dhc6_leaseify(packet);
- /* This is an out of memory condition...hopefully a temporary
+ /* Out of memory or corrupt packet condition...hopefully a temporary
* problem. Returning now makes us try to retransmit later.
*/
if (lease == NULL)