Wireshark-commits: [Wireshark-commits] master e1c10c5: NTP: fix detection of larger MAC sizes, remo

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 4 Aug 2020 05:22:00 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=e1c10c58568f8552dbf2a6e28152ce08e6d36c4f
Submitter: "Anders Broman <a.broman58@xxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

e1c10c5 by Peter Wu (peter@xxxxxxxxxxxxx):

    NTP: fix detection of larger MAC sizes, remove Autokey support
    
    Autokey was not properly supported, the v2 version check looked at the
    wrong field (Code instead of Field Type). Since nobody noticed it, let's
    remove it to simplify the code.
    
    Improve the Extension Field (EF) heuristics to ensure that larger digest
    sizes such as SHA-512 are recognized, and to support messages without
    MAC. Previously only MD5 and SHA-1 were supported as these are the only
    ones that are defined by the RFCs.
    
    The ntp_ext_field_types array was generated by:
    
        curl -s https://www.iana.org/assignments/ntp-parameters/ntp-parameters-3.csv |
        awk -F, 'NR>=2{printf "{ %s, \"%s\" },\n", $1, $2}' | sort -n
    
    Tested with md5_dgrams.pcapng and sha1_dgrams.pcapng (Bug 11580) and
    NTP-with-mac.pcap (Bug 16640). Also checked against the NTS capture
    (go_embeded.pcapng, bug 16222), but TCP reassembly is not supported so
    the last part of the first segment is wrongly dissected as MAC.
    
    Bug: 16640
    Change-Id: I07fc46c6d8995e6c791952dd7cd84d798cddd21a
    Reviewed-on: https://code.wireshark.org/review/38037
    Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    

Actions performed:

    from  e6b5bd0   Build: Add LTO/IPO support
     add  e1c10c5   NTP: fix detection of larger MAC sizes, remove Autokey support


Summary of changes:
 epan/dissectors/packet-ntp.c | 272 +++++++++++++++++++------------------------
 1 file changed, 117 insertions(+), 155 deletions(-)