diff options
author | Shawn Routhier <sar@isc.org> | 2015-07-29 11:00:21 -0700 |
---|---|---|
committer | Shawn Routhier <sar@isc.org> | 2015-07-29 11:00:21 -0700 |
commit | 4897512e21dafd5a040be61c4ab244ff736f4b2e (patch) | |
tree | 0b4b0ea2f96dcee4d44d5bda1a81378ab7db883c | |
parent | 39ef7fdf47eda389d167269f00ace89461e6900a (diff) | |
download | isc-dhcp-4897512e21dafd5a040be61c4ab244ff736f4b2e.tar.gz |
[v4_1_esv] Check that we were able to turn a packet into a lease.
[rt39279] Check that we were able to turn a packet into a lease.
-rw-r--r-- | RELNOTES | 3 | ||||
-rw-r--r-- | client/dhc6.c | 10 |
2 files changed, 11 insertions, 2 deletions
@@ -136,6 +136,9 @@ by Eric Young (eay@cryptsoft.com). class has been deleted. [ISC-Bugs #39978] +- Handle an out of memory condition in the client a bit better. + [ISC-Bugs #39279 + Changes since 4.1-ESV-R11rc2 - None diff --git a/client/dhc6.c b/client/dhc6.c index fd22e137..7a213ad4 100644 --- a/client/dhc6.c +++ b/client/dhc6.c @@ -2858,6 +2858,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); @@ -2975,7 +2981,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) @@ -3789,7 +3795,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) |