aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-08-16 01:13:11 +0000
committerGuy Harris <guy@alum.mit.edu>2004-08-16 01:13:11 +0000
commit90d05b46d162d5baf317189a78c7b03e0c400734 (patch)
treec8f853d70eccb7de93f81dacfcfa36273ce55004
parent334a55a2ce50f949bcde5161c96e9c24fdb65967 (diff)
According to draft-ietf-dhc-failover-10, the message digest type is 1
byte - and a length of 1 is used to put the message digest into the protocol tree, which agrees with that. Therefore, "tvb_get_guint8()" should be used to fetch it. svn path=/trunk/; revision=11746
-rw-r--r--epan/dissectors/packet-dhcp-failover.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/epan/dissectors/packet-dhcp-failover.c b/epan/dissectors/packet-dhcp-failover.c
index 3de899eeb9..ea1eb54d4d 100644
--- a/epan/dissectors/packet-dhcp-failover.c
+++ b/epan/dissectors/packet-dhcp-failover.c
@@ -27,6 +27,12 @@
* This implementation is loosely based on draft-ietf-dhc-failover-07.txt.
* As this document does not represent the actual implementation, the
* source code of ISC DHCPD 3.0 was used too.
+ *
+ * See also
+ *
+ * http://community.roxen.com/developers/idocs/drafts/draft-ietf-dhc-failover-10.html
+ *
+ * upon which the handling of the message-digest option is based.
*/
#ifdef HAVE_CONFIG_H
@@ -343,8 +349,7 @@ dissect_dhcpfo(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint additionalHBlength;
struct payloadMessage *helpliste;
int actualoffset;
- guint8 htype, reject_reason;
- guint16 message_digest_type;
+ guint8 htype, reject_reason, message_digest_type;
const guint8 *chaddr;
guint8 binding_status;
gchar *binding_status_str, *reject_reason_str;
@@ -836,7 +841,7 @@ dissect_dhcpfo(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case DHCP_FO_PD_MESSAGE_DIGEST:
- message_digest_type = tvb_get_ntohs(tvb,helpliste->actualpoffset+4);
+ message_digest_type = tvb_get_guint8(tvb,helpliste->actualpoffset+4);
if(message_digest_type == 1)
{
proto_item_append_text(oi, ", HMAC-MD5");