diff options
author | Thomas Markwalder <tmark@isc.org> | 2014-09-08 10:30:03 -0400 |
---|---|---|
committer | Thomas Markwalder <tmark@isc.org> | 2014-09-08 10:30:03 -0400 |
commit | 1fdd3f00e44c70094047a1f629ebd7215b196023 (patch) | |
tree | ecb354c7c6affc814f0529d22142f35162a7a90f | |
parent | c43b6da124ded67c9c02f32e3939b57ab87c4fd5 (diff) | |
download | isc-dhcp-1fdd3f00e44c70094047a1f629ebd7215b196023.tar.gz |
[v4_2] Added check for invalid failover message type.
Merges in rt36653
-rw-r--r-- | RELNOTES | 3 | ||||
-rw-r--r-- | includes/failover.h | 2 | ||||
-rw-r--r-- | server/failover.c | 6 |
3 files changed, 11 insertions, 0 deletions
@@ -45,6 +45,9 @@ by Eric Young (eay@cryptsoft.com). Changes since 4.2.7 +- Added check for invalid failover message type. + [ISC-Bugs #36653] + - Corrected rate limiting checks for bad packet logging. [ISC-Bugs #36897] diff --git a/includes/failover.h b/includes/failover.h index 090daee5..b49c2418 100644 --- a/includes/failover.h +++ b/includes/failover.h @@ -161,6 +161,8 @@ typedef struct { #define FTM_CONTACT 11 #define FTM_DISCONNECT 12 +#define FTM_MAX FTM_DISCONNECT + /* Reject reasons from Section 12.21: */ #define FTR_ILLEGAL_IP_ADDR 1 #define FTR_FATAL_CONFLICT 2 diff --git a/server/failover.c b/server/failover.c index 75fc8553..b24c5aaf 100644 --- a/server/failover.c +++ b/server/failover.c @@ -626,6 +626,12 @@ static isc_result_t do_a_failover_option (c, link) return DHCP_R_PROTOCOLERROR; } + if (link->imsg->type > FTM_MAX) { + log_error ("FAILOVER: invalid message type: %d", + link->imsg->type); + return DHCP_R_PROTOCOLERROR; + } + /* Get option code. */ omapi_connection_get_uint16 (c, &option_code); link -> imsg_count += 2; |