diff options
author | Dr. Lars Völker <lars.voelker@technica-engineering.de> | 2021-10-09 22:54:50 +0200 |
---|---|---|
committer | Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2021-10-10 06:33:15 +0000 |
commit | a534b7aed04d621d5b4ed69ba6aff7690e43b7ef (patch) | |
tree | b930ac47ef9455fcad197a6ad11bb07deafd729b /epan/dissectors | |
parent | f9d3b9d51ab24e1f9f3df979be4ac7f4d6518302 (diff) |
ISO15765: Bugfix, LIN config influenced CAN
This patch fixes the update_config routine, which turned off the CAN
config, when LIN diagnostic frame parsing is deactivated.
Closes #17639
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-iso15765.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/epan/dissectors/packet-iso15765.c b/epan/dissectors/packet-iso15765.c index 7efd21c310..3157397bf2 100644 --- a/epan/dissectors/packet-iso15765.c +++ b/epan/dissectors/packet-iso15765.c @@ -693,24 +693,21 @@ dissect_iso15765_flexray(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo static void update_config(void) { - if (iso15765_handle_lin == NULL) { - return; - } - - dissector_delete_all("lin.frame_id", iso15765_handle_lin); - if (register_lin_diag_frames) { - /* LIN specification states that 0x3c and 0x3d are for diagnostics */ - dissector_add_uint("lin.frame_id", LIN_DIAG_MASTER_REQUEST_FRAME, iso15765_handle_lin); - dissector_add_uint("lin.frame_id", LIN_DIAG_SLAVE_RESPONSE_FRAME, iso15765_handle_lin); + if (iso15765_handle_lin != NULL) { + dissector_delete_all("lin.frame_id", iso15765_handle_lin); + if (register_lin_diag_frames) { + /* LIN specification states that 0x3c and 0x3d are for diagnostics */ + dissector_add_uint("lin.frame_id", LIN_DIAG_MASTER_REQUEST_FRAME, iso15765_handle_lin); + dissector_add_uint("lin.frame_id", LIN_DIAG_SLAVE_RESPONSE_FRAME, iso15765_handle_lin); + } } - dissector_delete_all("can.id", iso15765_handle_can); - dissector_delete_all("can.extended_id", iso15765_handle_can); - if (register_lin_diag_frames) { + if (iso15765_handle_can != NULL) { + dissector_delete_all("can.id", iso15765_handle_can); + dissector_delete_all("can.extended_id", iso15765_handle_can); dissector_add_uint_range("can.id", configured_can_ids, iso15765_handle_can); dissector_add_uint_range("can.extended_id", configured_ext_can_ids, iso15765_handle_can); } - } void |