Wireshark-commits: [Wireshark-commits] master 4ee007b: genl: Always call subdissector
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Fri, 30 Aug 2019 03:58:25 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=4ee007bdd8b893fb4f0c9a8c1d5053546ec0fcc2
Submitter: "Anders Broman <a.broman58@xxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

4ee007b by Ido Schimmel (idosch@xxxxxxxxxxxx):

    genl: Always call subdissector
    
    Commit 61c5e8e76d21 ("genl: make subdissectors responsible for header")
    changed the generic netlink dissector to only call a sub-dissector if
    there is a payload after the generic netlink header.
    
    However, there are commands in certain generic netlink families that do
    not have any payload. For example, 'NET_DM_CMD_START' in the 'NET_DM'
    family. This means that the command will not be dissected by the
    subdissector, as it will never be invoked.
    
    Change the generic netlink dissector to always call a subdissector, if
    it is present. Prevent the subdissectors from trying to dissect past the
    end of the packet by adding checks in the two existing subdissectors,
    for the 'nlctrl' and 'nl80211' families.
    
    Change-Id: I4d2f48531dee92b11dc45000081a8d2d3dd875c6
    Signed-off-by: Ido Schimmel <idosch@xxxxxxxxxxxx>
    Reviewed-on: https://code.wireshark.org/review/34350
    Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
    Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    

Actions performed:

    from  f753bca   mpeg(dsmcc): Fixed default switch condition
     add  4ee007b   genl: Always call subdissector


Summary of changes:
 epan/dissectors/packet-netlink-generic.c | 19 ++++++++++---------
 epan/dissectors/packet-netlink-nl80211.c |  4 ++++
 2 files changed, 14 insertions(+), 9 deletions(-)