Wireshark-commits: [Wireshark-commits] master c624970: netlink: support legacy dump request message

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sat, 11 Mar 2017 22:05:25 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=c62497066e0e6078b5d5d1ee8e6883f5f78afe26
Submitter: Michael Mann (mmann78@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

c624970 by Michal Kubecek (mkubecek@xxxxxxx):

    netlink: support legacy dump request messages
    
    Some legacy tools, including iproute2 < 3.9, issue shorter RTM_GETLINK
    and RTM_GETADDR dump queries which only contain struct rtgenmsg rather
    than struct ifinfomsg. As noted in kernel comment in rtnl_dump_ifinfo(),
    these legacy requests will be (even with attributes) always shorter than
    struct ifinfomsg so that they are easy to detect.
    
    Similar problem can be observed with tools using nl_rtgen_request()
    function from libnl3; this also affects other RTM_GET* types.
    
    If such legacy message is detected by length shorter than expected data
    structure, parse it as this legacy version with (1-byte) struct
    rtgenmsg so that it's shown as intended rather than as malformed.
    
    Change-Id: I53b6bff9e44cd2359d7cd313b6f0724f63f0e74d
    Reviewed-on: https://code.wireshark.org/review/20461
    Petri-Dish: Michael Mann <mmann78@xxxxxxxxxxxx>
    Reviewed-by: Michal Kubeček <mkubecek@xxxxxxx>
    Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
    Reviewed-by: Michael Mann <mmann78@xxxxxxxxxxxx>
    

Actions performed:

    from  bccc200   sharkd: support for export objects, following stream.
    adds  c624970   netlink: support legacy dump request messages


Summary of changes:
 epan/dissectors/packet-netlink-route.c |   21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)