diff options
author | Uli Heilmeier <uh@heilmeier.eu> | 2016-08-19 21:21:29 +0200 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2016-08-20 13:32:58 +0000 |
commit | 8f98f7ce67d23fbeb17a4a3fd75cb376a705300f (patch) | |
tree | 71be96e37456209c701ff4b8c316486af9183470 /epan | |
parent | 68a9ea61897d65d2b8970eba7f9b05851e5e575d (diff) | |
download | wireshark-8f98f7ce67d23fbeb17a4a3fd75cb376a705300f.tar.gz |
BOOTP: Catch undefined Client Identifier (Option 61)
[1] stats "A hardware type of 0 (zero) should be used when the value field
contains an identifier other than a hardware address (e.g. a fully
qualified domain name)."
This commit displays these other identifier.
[1] https://tools.ietf.org/html/rfc2132#section-9.14
Bug: 12766
Change-Id: I3d991164641b41fb95891b2f78411d2e98a22e0d
Reviewed-on: https://code.wireshark.org/review/17180
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-bootp.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/epan/dissectors/packet-bootp.c b/epan/dissectors/packet-bootp.c index 56ea245791..5dd35d5846 100644 --- a/epan/dissectors/packet-bootp.c +++ b/epan/dissectors/packet-bootp.c @@ -175,6 +175,8 @@ static int hf_bootp_client_identifier_time = -1; static int hf_bootp_client_identifier_link_layer_address = -1; static int hf_bootp_client_identifier_enterprise_num = -1; static int hf_bootp_client_identifier = -1; +static int hf_bootp_client_identifier_type = -1; +static int hf_bootp_client_identifier_undef = -1; static int hf_bootp_option_type = -1; static int hf_bootp_option_length = -1; static int hf_bootp_option_value = -1; @@ -2205,6 +2207,10 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, proto_item } break; } + } else if (byte == 0 && optlen > 1) { + /* identifier other than a hardware address (e.g. a fully qualified domain name) */ + proto_tree_add_item(v_tree, hf_bootp_client_identifier_type, tvb, optoff, 1, ENC_NA); + proto_tree_add_item(v_tree, hf_bootp_client_identifier_undef, tvb, optoff+1, optlen-1, ENC_ASCII|ENC_NA); } else { /* otherwise, it's opaque data */ } @@ -6638,6 +6644,16 @@ proto_register_bootp(void) FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, + { &hf_bootp_client_identifier_type, + { "Type", "bootp.client_id.type", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, + + { &hf_bootp_client_identifier_undef, + { "Client Identifier", "bootp.client_id.undef", + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, + { &hf_bootp_option_type, { "Option", "bootp.option.type", FT_UINT8, BASE_DEC, NULL, 0x0, |