diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2014-12-03 20:48:08 +0100 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2014-12-03 22:00:39 +0000 |
commit | c86d1d2dd151d3348a4f1764f760bff1e667d222 (patch) | |
tree | b4cedd4dbe465657335942b5772fb922c289ed38 /epan/dissectors/packet-fc.c | |
parent | 0a30f6878d438ed4c4f3729779b406a65bc54612 (diff) |
FC: fix dissection when packets are captured with Fibre Channel FC-2 encapsulation type
This is broken since ga9dd765
Bug: 10751
Change-Id: Id4f282d9e0104bfa2314e2348aedf31233a671bd
Reviewed-on: https://code.wireshark.org/review/5594
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-fc.c')
-rw-r--r-- | epan/dissectors/packet-fc.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/epan/dissectors/packet-fc.c b/epan/dissectors/packet-fc.c index 2b0787275a..46f9ca7fdb 100644 --- a/epan/dissectors/packet-fc.c +++ b/epan/dissectors/packet-fc.c @@ -1293,6 +1293,18 @@ dissect_fc (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) } static int +dissect_fc_wtap (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) +{ + fc_data_t fc_data; + + fc_data.ethertype = ETHERTYPE_UNK; + fc_data.sof_eof = 0; + + dissect_fc_helper (tvb, pinfo, tree, FALSE, &fc_data); + return tvb_length(tvb); +} + +static int dissect_fc_ifcp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) { fc_data_t* fc_data = (fc_data_t*)data; @@ -1643,7 +1655,8 @@ proto_register_fc(void) void proto_reg_handoff_fc (void) { - dissector_add_uint("wtap_encap", WTAP_ENCAP_FIBRE_CHANNEL_FC2, fc_handle); + dissector_add_uint("wtap_encap", WTAP_ENCAP_FIBRE_CHANNEL_FC2, + new_create_dissector_handle(dissect_fc_wtap, proto_fc)); dissector_add_uint("wtap_encap", WTAP_ENCAP_FIBRE_CHANNEL_FC2_WITH_FRAME_DELIMS, fcsof_handle); |