aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dhcp-failover.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2004-08-16 01:13:11 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2004-08-16 01:13:11 +0000
commit26331579d342602f02415d64a94e2c45465322b8 (patch)
treec8f853d70eccb7de93f81dacfcfa36273ce55004 /epan/dissectors/packet-dhcp-failover.c
parent1d7d1954167e6b0b635c6b6cc649436f734cf1ae (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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11746 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-dhcp-failover.c')
-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");