From 2f6d112ada06b243949c4c63f9fb76a76f9070a1 Mon Sep 17 00:00:00 2001 From: guy Date: Wed, 29 Mar 2000 09:29:16 +0000 Subject: Fix from Michael Johnston to check the correct bit when testing the broadcast flag in DHCP packets. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1761 f5534014-38df-0310-8fa8-9805f1628bb7 --- packet-bootp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'packet-bootp.c') diff --git a/packet-bootp.c b/packet-bootp.c index 287c193e61..819a117e0b 100644 --- a/packet-bootp.c +++ b/packet-bootp.c @@ -2,7 +2,7 @@ * Routines for BOOTP/DHCP packet disassembly * Gilbert Ramirez * - * $Id: packet-bootp.c,v 1.28 2000/03/20 21:39:00 gerald Exp $ + * $Id: packet-bootp.c,v 1.29 2000/03/29 09:29:16 guy Exp $ * * The information used comes from: * RFC 2132: DHCP Options and BOOTP Vendor Extensions @@ -598,7 +598,7 @@ dissect_bootp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) proto_tree_add_item(bp_tree, hf_bootp_secs, offset + 8, 2, pntohs(&pd[offset+8])); proto_tree_add_item(bp_tree, hf_bootp_flag, - offset + 10, 2, pd[offset+10] & 1); + offset + 10, 2, pntohs(&pd[offset+10]) & 0x8000); memcpy(&ip_addr, &pd[offset+12], sizeof(ip_addr)); proto_tree_add_item(bp_tree, hf_bootp_ip_client, @@ -700,7 +700,7 @@ proto_register_bootp(void) "" }}, { &hf_bootp_flag, - { "Broadcast flag", "bootp.flag", FT_UINT16, BASE_DEC, NULL, 0x0, + { "Broadcast flag", "bootp.flag", FT_UINT16, BASE_HEX, NULL, 0x0, "" }}, { &hf_bootp_ip_client, -- cgit v1.2.3