aboutsummaryrefslogtreecommitdiffstats
path: root/packet-bootp.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>1998-11-12 21:39:22 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>1998-11-12 21:39:22 +0000
commitc90b202b22f931b39d160ba973d5a6513982497e (patch)
tree0438142e4fa8f34cf7635a8142403361350800d0 /packet-bootp.c
parent4b2b211cd580b9518240b958c88c5c57c6d11ac9 (diff)
Added a patch to wiretap from Guy Harris to help compile wiretap in
different situations. I also fixed bootp so that is properly handles unknown BOOTP options. svn path=/trunk/; revision=85
Diffstat (limited to 'packet-bootp.c')
-rw-r--r--packet-bootp.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/packet-bootp.c b/packet-bootp.c
index e6e58a2008..83931d1cad 100644
--- a/packet-bootp.c
+++ b/packet-bootp.c
@@ -2,7 +2,7 @@
* Routines for BOOTP/DHCP packet disassembly
* Gilbert Ramirez <gram@verdict.uthscsa.edu>
*
- * $Id: packet-bootp.c,v 1.8 1998/11/12 00:06:24 gram Exp $
+ * $Id: packet-bootp.c,v 1.9 1998/11/12 21:39:18 gram Exp $
*
* The information used comes from:
* RFC 2132: DHCP Options and BOOTP Vendor Extensions
@@ -272,8 +272,8 @@ bootp_option(const u_char *pd, GtkWidget *bp_tree, int voff, int eoff)
}
/* Normal cases */
+ consumed = vlen + 2;
if (code < NUM_OPT_INFOS) {
- consumed = vlen + 2;
text = opt[code].text;
ftype = opt[code].ftype;
@@ -370,12 +370,13 @@ bootp_option(const u_char *pd, GtkWidget *bp_tree, int voff, int eoff)
break;
default:
- add_item_to_tree(bp_tree, voff, consumed, "Option %d: %s",
- code, text);
+ add_item_to_tree(bp_tree, voff, consumed,
+ "Option %d: %s (%d bytes)", code, text, vlen);
}
}
else {
- add_item_to_tree(bp_tree, voff, 1, "Unknown Option Code: %d", code);
+ add_item_to_tree(bp_tree, voff, consumed,
+ "Unknown Option Code: %d (%d bytes)", code, vlen);
}
return consumed;