diff options
author | Guy Harris <guy@alum.mit.edu> | 2003-12-03 20:01:20 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2003-12-03 20:01:20 +0000 |
commit | 6fed1581eb23b7a8c8b4fff3fbf03b36dbef3d90 (patch) | |
tree | 8b95297e275e5cd7696e8c42af1700c856aed0ad /packet-bootp.c | |
parent | 95ea8dbdec0bcf31432941491e88d12e3614990a (diff) |
From Greg Morris: handle the backwards compatibility flag for options 78
and 79.
svn path=/trunk/; revision=9156
Diffstat (limited to 'packet-bootp.c')
-rw-r--r-- | packet-bootp.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/packet-bootp.c b/packet-bootp.c index 01265d24c3..a00853ba44 100644 --- a/packet-bootp.c +++ b/packet-bootp.c @@ -2,7 +2,7 @@ * Routines for BOOTP/DHCP packet disassembly * Gilbert Ramirez <gram@alumni.rice.edu> * - * $Id: packet-bootp.c,v 1.76 2003/11/18 19:56:37 guy Exp $ + * $Id: packet-bootp.c,v 1.77 2003/12/03 20:01:20 guy Exp $ * * The information used comes from: * RFC 951: Bootstrap Protocol @@ -716,11 +716,18 @@ bootp_option(tvbuff_t *tvb, proto_tree *bp_tree, int voff, int eoff, "Option %d: %s = %s", code, text, val_to_str(byte, slpda_vals, "Unknown (0x%02x)")); + if (byte == 0x80) { + voff++; + consumed--; + } v_tree = proto_item_add_subtree(vti, ett_bootp_option); - for (i = voff + 4; i < voff + consumed; i += 4) { + for (i = voff + 3; i < voff + consumed; i += 4) { proto_tree_add_text(v_tree, tvb, i, 4, "SLPDA Address: %s", ip_to_str(tvb_get_ptr(tvb, i, 4))); } + if (byte == 0x80) { + consumed++; + } break; case 79: /* SLP Service Scope Option RFC2610 Added by Greg Morris (gmorris@novell.com)*/ @@ -730,8 +737,9 @@ bootp_option(tvbuff_t *tvb, proto_tree *bp_tree, int voff, int eoff, val_to_str(byte, slp_scope_vals, "Unknown (0x%02x)")); v_tree = proto_item_add_subtree(vti, ett_bootp_option); - proto_tree_add_text(v_tree, tvb, voff+4, consumed-4, "SLP Scope: %s", - tvb_get_ptr(tvb, voff+4, consumed-4)); + proto_tree_add_text(v_tree, tvb, voff+3, consumed-3, + "%s = \"%.*s\"", text, vlen-1, + tvb_get_ptr(tvb, voff+3, vlen-1)); break; case 82: /* Relay Agent Information Option */ |