static int hf_bootp_option_private_proxy_autodiscovery = -1; /* 252 */
static int hf_bootp_option_end = -1; /* 255 */
static int hf_bootp_option_end_overload = -1; /* 255 (with overload)*/
-
+static int hf_bootp_vendor_unknown_suboption = -1;
+static int hf_bootp_suboption_data = -1;
tvbuff_t *tvb, int optoff, int optend, int revision);
static int dissect_vendor_cl_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree,
tvbuff_t *tvb, int optoff, int optend);
+static int dissect_vendor_generic_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree,
+ tvbuff_t *tvb, int optoff, int optend);
#define OPT53_DISCOVER "Discover"
/* http://www.iana.org/assignments/bootp-dhcp-parameters */
break;
default:
- /* skip over the data and look for next enterprise number */
- optoff += s_option_len;
+ s_end = optoff + s_option_len;
+ if ( s_end > optend ) {
+ expert_add_info_format(pinfo, vti, &ei_bootp_option125_enterprise_malformed, "no room left in option for enterprise %u data", enterprise);
+ break;
+ }
+
+ e_tree = proto_item_add_subtree(vti, ett_bootp_option);
+ while (optoff < s_end) {
+
+ optoff = dissect_vendor_generic_suboption(pinfo, vti, e_tree, tvb, optoff, s_end);
+ }
+ break;
}
optleft -= s_option_len;
return optoff;
}
+
+static int
+dissect_vendor_generic_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree,
+ tvbuff_t *tvb, int optoff, int optend)
+{
+ int suboptoff = optoff;
+ guint8 subopt_len;
+ proto_item *item;
+ proto_tree *sub_tree;
+
+ item = proto_tree_add_item(v_tree, hf_bootp_vendor_unknown_suboption, tvb, optoff, 1, ENC_BIG_ENDIAN);
+ suboptoff+=1;
+
+ sub_tree = proto_item_add_subtree(item, ett_bootp_option125_suboption);
+ subopt_len = tvb_get_guint8(tvb,suboptoff);
+ proto_tree_add_item(sub_tree, hf_bootp_suboption_length, tvb, suboptoff, 1, ENC_BIG_ENDIAN);
+ suboptoff++;
+ proto_tree_add_item(sub_tree, hf_bootp_suboption_data, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN);
+ suboptoff+= subopt_len;
+
+ return suboptoff;
+
+}
static const value_string option43_alcatel_suboption_vals[] = {
{ 0, "Padding" },
{ 58, "Voice VLAN ID" },
FT_UINT8, BASE_DEC, NULL, 0x0,
"Option 255: End (Overload)", HFILL }},
+ { &hf_bootp_vendor_unknown_suboption,
+ { "Option 125 Suboption", "bootp.vendor.suboption",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
+
+ { &hf_bootp_suboption_data,
+ { "Data", "bootp.vendor.data",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
};
static uat_field_t bootp_uat_flds[] = {