aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorJaap Keuter <jaap.keuter@xs4all.nl>2007-05-02 06:17:19 +0000
committerJaap Keuter <jaap.keuter@xs4all.nl>2007-05-02 06:17:19 +0000
commita25bb5b393fac1c838e2f193f59d8dbf468d2970 (patch)
tree5bfd954b10055f7c3b73fbb5c6945a07cac8472d /epan
parent1cf1f16391a327b1a74045c60c492c39ab7569f0 (diff)
downloadwireshark-a25bb5b393fac1c838e2f193f59d8dbf468d2970.tar.gz
wireshark-a25bb5b393fac1c838e2f193f59d8dbf468d2970.tar.bz2
wireshark-a25bb5b393fac1c838e2f193f59d8dbf468d2970.zip
From Stefan Puiu:
A DHCP Discover option 90 has no Secret ID nor HMAC MD5 Hash. svn path=/trunk/; revision=21636
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-bootp.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/epan/dissectors/packet-bootp.c b/epan/dissectors/packet-bootp.c
index 354e838ff0..67b890c69d 100644
--- a/epan/dissectors/packet-bootp.c
+++ b/epan/dissectors/packet-bootp.c
@@ -1188,21 +1188,25 @@ bootp_option(tvbuff_t *tvb, proto_tree *bp_tree, int voff, int eoff,
switch (algorithm) {
case AUTHEN_DELAYED_ALGO_HMAC_MD5:
- if (optlen < 31) {
- proto_item_append_text(vti,
- " length isn't >= 31");
+ if (!strcmp(*dhcp_type_p, val_to_str(1, opt53_text, ""))) {
+ /* Discover has no Secret ID nor HMAC MD5 Hash */
break;
+ } else {
+ if (optlen < 31) {
+ proto_item_append_text(vti,
+ " length isn't >= 31");
+ break;
+ }
+ proto_tree_add_text(v_tree, tvb, optoff, 4,
+ "Secret ID: 0x%08x",
+ tvb_get_ntohl(tvb, optoff));
+ optoff += 4;
+ optleft -= 4;
+ proto_tree_add_text(v_tree, tvb, optoff, 16,
+ "HMAC MD5 Hash: %s",
+ tvb_bytes_to_str(tvb, optoff, 16));
+ break;
}
- proto_tree_add_text(v_tree, tvb, optoff, 4,
- "Secret ID: 0x%08x",
- tvb_get_ntohl(tvb, optoff));
- optoff += 4;
- optleft -= 4;
- proto_tree_add_text(v_tree, tvb, optoff, 16,
- "HMAC MD5 Hash: %s",
- tvb_bytes_to_str(tvb, optoff, 16));
- break;
-
default:
if (optleft == 0)
break;