diff options
author | Guy Harris <guy@alum.mit.edu> | 2000-07-08 07:52:11 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2000-07-08 07:52:11 +0000 |
commit | ca99a750fa4e6856c9a253f3e3f34d202e880a7d (patch) | |
tree | deb99b0afe012fd1f5657727b0d04e42ecde775f /packet-bootp.c | |
parent | ae1df375130ca48b3ccd07160e6c47b353253e55 (diff) |
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
Diffstat (limited to 'packet-bootp.c')
-rw-r--r-- | packet-bootp.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/packet-bootp.c b/packet-bootp.c index 680abe0376..4c7211d58f 100644 --- a/packet-bootp.c +++ b/packet-bootp.c @@ -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); } |