The BOOTP "magic cookie" should be added in exactly the same fashion

regardless of whether it's valid or not - extract all four bytes and add
that as the value.

svn path=/trunk/; revision=2123
This commit is contained in:
Guy Harris 2000-07-08 07:52:11 +00:00
parent ae1df37513
commit ca99a750fa
1 changed files with 4 additions and 5 deletions

View File

@ -2,7 +2,7 @@
* Routines for BOOTP/DHCP packet disassembly
* Gilbert Ramirez <gram@xiexie.org>
*
* $Id: packet-bootp.c,v 1.34 2000/05/31 05:06:54 guy Exp $
* $Id: packet-bootp.c,v 1.35 2000/07/08 07:52:11 guy Exp $
*
* The information used comes from:
* RFC 2132: DHCP Options and BOOTP Vendor Extensions
@ -664,14 +664,13 @@ dissect_bootp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
"Boot file name not given");
}
memcpy(&ip_addr, &pd[offset + 236], sizeof(ip_addr));
if (pntohl(&pd[offset+236]) == 0x63825363) {
proto_tree_add_ipv4_format(bp_tree, hf_bootp_cookie, NullTVB,
offset + 236, 4,
pd[offset+236],
"Magic cookie: (OK)");
offset + 236, 4, ip_addr,
"Magic cookie: (OK)");
}
else {
memcpy(&ip_addr, &pd[offset + 236], sizeof(ip_addr));
proto_tree_add_ipv4(bp_tree, hf_bootp_cookie, NullTVB,
offset + 236, 4, ip_addr);
}