Author: glebius
Date: Wed Feb  1 20:26:42 2017
New Revision: 313048
URL: https://svnweb.freebsd.org/changeset/base/313048

Log:
  Update tcpdump to 4.9.0.
  
  It fixes many buffer overflow in different protocol parsers, but none of
  them are critical, even in absense of Capsicum.
  
  Security:     CVE-2016-7922, CVE-2016-7923, CVE-2016-7924, CVE-2016-7925
  Security:     CVE-2016-7926, CVE-2016-7927, CVE-2016-7928, CVE-2016-7929
  Security:     CVE-2016-7930, CVE-2016-7931, CVE-2016-7932, CVE-2016-7933
  Security:     CVE-2016-7934, CVE-2016-7935, CVE-2016-7936, CVE-2016-7937
  Security:     CVE-2016-7938, CVE-2016-7939, CVE-2016-7940, CVE-2016-7973
  Security:     CVE-2016-7974, CVE-2016-7975, CVE-2016-7983, CVE-2016-7984
  Security:     CVE-2016-7985, CVE-2016-7986, CVE-2016-7992, CVE-2016-7993
  Security:     CVE-2016-8574, CVE-2016-8575, CVE-2017-5202, CVE-2017-5203
  Security:     CVE-2017-5204, CVE-2017-5205, CVE-2017-5341, CVE-2017-5342
  Security:     CVE-2017-5482, CVE-2017-5483, CVE-2017-5484, CVE-2017-5485
  Security:     CVE-2017-5486

Added:
  head/contrib/tcpdump/CONTRIBUTING
     - copied unchanged from r313024, vendor/tcpdump/dist/CONTRIBUTING
  head/contrib/tcpdump/PLATFORMS
     - copied unchanged from r313024, vendor/tcpdump/dist/PLATFORMS
  head/contrib/tcpdump/README
     - copied unchanged from r313024, vendor/tcpdump/dist/README
  head/contrib/tcpdump/addrtostr.c
     - copied, changed from r313024, vendor/tcpdump/dist/addrtostr.c
  head/contrib/tcpdump/addrtostr.h
     - copied unchanged from r313024, vendor/tcpdump/dist/addrtostr.h
  head/contrib/tcpdump/ascii_strcasecmp.c
     - copied unchanged from r313024, vendor/tcpdump/dist/ascii_strcasecmp.c
  head/contrib/tcpdump/ascii_strcasecmp.h
     - copied unchanged from r313024, vendor/tcpdump/dist/ascii_strcasecmp.h
  head/contrib/tcpdump/netdissect-stdinc.h
     - copied unchanged from r313024, vendor/tcpdump/dist/netdissect-stdinc.h
  head/contrib/tcpdump/netdissect.c
     - copied unchanged from r313024, vendor/tcpdump/dist/netdissect.c
  head/contrib/tcpdump/print-hncp.c
     - copied unchanged from r313024, vendor/tcpdump/dist/print-hncp.c
  head/contrib/tcpdump/print-lisp.c
     - copied unchanged from r313024, vendor/tcpdump/dist/print-lisp.c
  head/contrib/tcpdump/print-medsa.c
     - copied unchanged from r313024, vendor/tcpdump/dist/print-medsa.c
  head/contrib/tcpdump/print-nsh.c
     - copied unchanged from r313024, vendor/tcpdump/dist/print-nsh.c
  head/contrib/tcpdump/print-resp.c
     - copied unchanged from r313024, vendor/tcpdump/dist/print-resp.c
  head/contrib/tcpdump/print-vxlan-gpe.c
     - copied unchanged from r313024, vendor/tcpdump/dist/print-vxlan-gpe.c
  head/contrib/tcpdump/print.c
     - copied unchanged from r313024, vendor/tcpdump/dist/print.c
  head/contrib/tcpdump/print.h
     - copied unchanged from r313024, vendor/tcpdump/dist/print.h
  head/contrib/tcpdump/strtoaddr.c
     - copied unchanged from r313024, vendor/tcpdump/dist/strtoaddr.c
  head/contrib/tcpdump/strtoaddr.h
     - copied unchanged from r313024, vendor/tcpdump/dist/strtoaddr.h
  head/contrib/tcpdump/timeval-operations.h
     - copied unchanged from r313024, vendor/tcpdump/dist/timeval-operations.h
  head/contrib/tcpdump/util-print.c
     - copied unchanged from r313024, vendor/tcpdump/dist/util-print.c
Deleted:
  head/contrib/tcpdump/.cvsignore
  head/contrib/tcpdump/atmuni31.h
  head/contrib/tcpdump/missing/addrinfo.h
  head/contrib/tcpdump/missing/getnameinfo.c
  head/contrib/tcpdump/missing/inet_aton.c
  head/contrib/tcpdump/missing/inet_ntop.c
  head/contrib/tcpdump/missing/inet_pton.c
  head/contrib/tcpdump/strcasecmp.c
  head/contrib/tcpdump/tcpdump-stdinc.h
  head/contrib/tcpdump/util.c
Modified:
  head/contrib/tcpdump/CHANGES   (contents, props changed)
  head/contrib/tcpdump/CREDITS   (contents, props changed)
  head/contrib/tcpdump/INSTALL.txt   (contents, props changed)
  head/contrib/tcpdump/Makefile.in   (contents, props changed)
  head/contrib/tcpdump/VERSION   (contents, props changed)
  head/contrib/tcpdump/addrtoname.c   (contents, props changed)
  head/contrib/tcpdump/addrtoname.h   (contents, props changed)
  head/contrib/tcpdump/af.c   (contents, props changed)
  head/contrib/tcpdump/af.h   (contents, props changed)
  head/contrib/tcpdump/bpf_dump.c   (contents, props changed)
  head/contrib/tcpdump/checksum.c   (contents, props changed)
  head/contrib/tcpdump/config.h.in   (contents, props changed)
  head/contrib/tcpdump/configure   (contents, props changed)
  head/contrib/tcpdump/configure.in   (contents, props changed)
  head/contrib/tcpdump/cpack.c   (contents, props changed)
  head/contrib/tcpdump/cpack.h   (contents, props changed)
  head/contrib/tcpdump/ether.h   (contents, props changed)
  head/contrib/tcpdump/ethertype.h   (contents, props changed)
  head/contrib/tcpdump/extract.h   (contents, props changed)
  head/contrib/tcpdump/gmpls.c   (contents, props changed)
  head/contrib/tcpdump/gmt2local.c   (contents, props changed)
  head/contrib/tcpdump/in_cksum.c   (contents, props changed)
  head/contrib/tcpdump/interface.h   (contents, props changed)
  head/contrib/tcpdump/ip.h   (contents, props changed)
  head/contrib/tcpdump/ip6.h   (contents, props changed)
  head/contrib/tcpdump/ipproto.c   (contents, props changed)
  head/contrib/tcpdump/ipproto.h   (contents, props changed)
  head/contrib/tcpdump/l2vpn.c   (contents, props changed)
  head/contrib/tcpdump/l2vpn.h   (contents, props changed)
  head/contrib/tcpdump/lbl/os-solaris2.h   (contents, props changed)
  head/contrib/tcpdump/lbl/os-sunos4.h   (contents, props changed)
  head/contrib/tcpdump/lbl/os-ultrix4.h   (contents, props changed)
  head/contrib/tcpdump/machdep.c   (contents, props changed)
  head/contrib/tcpdump/machdep.h   (contents, props changed)
  head/contrib/tcpdump/mib.h   (contents, props changed)
  head/contrib/tcpdump/missing/datalinks.c   (contents, props changed)
  head/contrib/tcpdump/missing/dlnames.c   (contents, props changed)
  head/contrib/tcpdump/missing/snprintf.c   (contents, props changed)
  head/contrib/tcpdump/missing/strdup.c   (contents, props changed)
  head/contrib/tcpdump/missing/strlcat.c   (contents, props changed)
  head/contrib/tcpdump/missing/strlcpy.c   (contents, props changed)
  head/contrib/tcpdump/missing/strsep.c   (contents, props changed)
  head/contrib/tcpdump/nameser.h   (contents, props changed)
  head/contrib/tcpdump/netdissect.h   (contents, props changed)
  head/contrib/tcpdump/nfs.h   (contents, props changed)
  head/contrib/tcpdump/nfsfh.h   (contents, props changed)
  head/contrib/tcpdump/nlpid.c   (contents, props changed)
  head/contrib/tcpdump/oui.c   (contents, props changed)
  head/contrib/tcpdump/oui.h   (contents, props changed)
  head/contrib/tcpdump/parsenfsfh.c   (contents, props changed)
  head/contrib/tcpdump/pcap-missing.h   (contents, props changed)
  head/contrib/tcpdump/ppp.h   (contents, props changed)
  head/contrib/tcpdump/print-802_11.c   (contents, props changed)
  head/contrib/tcpdump/print-802_15_4.c   (contents, props changed)
  head/contrib/tcpdump/print-ah.c   (contents, props changed)
  head/contrib/tcpdump/print-ahcp.c   (contents, props changed)
  head/contrib/tcpdump/print-aodv.c   (contents, props changed)
  head/contrib/tcpdump/print-aoe.c   (contents, props changed)
  head/contrib/tcpdump/print-ap1394.c   (contents, props changed)
  head/contrib/tcpdump/print-arcnet.c   (contents, props changed)
  head/contrib/tcpdump/print-arp.c   (contents, props changed)
  head/contrib/tcpdump/print-ascii.c   (contents, props changed)
  head/contrib/tcpdump/print-atalk.c   (contents, props changed)
  head/contrib/tcpdump/print-atm.c   (contents, props changed)
  head/contrib/tcpdump/print-babel.c   (contents, props changed)
  head/contrib/tcpdump/print-beep.c   (contents, props changed)
  head/contrib/tcpdump/print-bfd.c   (contents, props changed)
  head/contrib/tcpdump/print-bgp.c   (contents, props changed)
  head/contrib/tcpdump/print-bootp.c   (contents, props changed)
  head/contrib/tcpdump/print-bt.c   (contents, props changed)
  head/contrib/tcpdump/print-calm-fast.c   (contents, props changed)
  head/contrib/tcpdump/print-carp.c   (contents, props changed)
  head/contrib/tcpdump/print-cdp.c   (contents, props changed)
  head/contrib/tcpdump/print-cfm.c   (contents, props changed)
  head/contrib/tcpdump/print-chdlc.c   (contents, props changed)
  head/contrib/tcpdump/print-cip.c   (contents, props changed)
  head/contrib/tcpdump/print-cnfp.c   (contents, props changed)
  head/contrib/tcpdump/print-dccp.c   (contents, props changed)
  head/contrib/tcpdump/print-decnet.c   (contents, props changed)
  head/contrib/tcpdump/print-dhcp6.c   (contents, props changed)
  head/contrib/tcpdump/print-domain.c   (contents, props changed)
  head/contrib/tcpdump/print-dtp.c   (contents, props changed)
  head/contrib/tcpdump/print-dvmrp.c   (contents, props changed)
  head/contrib/tcpdump/print-eap.c   (contents, props changed)
  head/contrib/tcpdump/print-egp.c   (contents, props changed)
  head/contrib/tcpdump/print-eigrp.c   (contents, props changed)
  head/contrib/tcpdump/print-enc.c   (contents, props changed)
  head/contrib/tcpdump/print-esp.c   (contents, props changed)
  head/contrib/tcpdump/print-ether.c   (contents, props changed)
  head/contrib/tcpdump/print-fddi.c   (contents, props changed)
  head/contrib/tcpdump/print-forces.c   (contents, props changed)
  head/contrib/tcpdump/print-fr.c   (contents, props changed)
  head/contrib/tcpdump/print-frag6.c   (contents, props changed)
  head/contrib/tcpdump/print-ftp.c   (contents, props changed)
  head/contrib/tcpdump/print-geneve.c   (contents, props changed)
  head/contrib/tcpdump/print-geonet.c   (contents, props changed)
  head/contrib/tcpdump/print-gre.c   (contents, props changed)
  head/contrib/tcpdump/print-hsrp.c   (contents, props changed)
  head/contrib/tcpdump/print-http.c   (contents, props changed)
  head/contrib/tcpdump/print-icmp.c   (contents, props changed)
  head/contrib/tcpdump/print-icmp6.c   (contents, props changed)
  head/contrib/tcpdump/print-igmp.c   (contents, props changed)
  head/contrib/tcpdump/print-igrp.c   (contents, props changed)
  head/contrib/tcpdump/print-ip.c   (contents, props changed)
  head/contrib/tcpdump/print-ip6.c   (contents, props changed)
  head/contrib/tcpdump/print-ip6opts.c   (contents, props changed)
  head/contrib/tcpdump/print-ipcomp.c   (contents, props changed)
  head/contrib/tcpdump/print-ipfc.c   (contents, props changed)
  head/contrib/tcpdump/print-ipnet.c   (contents, props changed)
  head/contrib/tcpdump/print-ipx.c   (contents, props changed)
  head/contrib/tcpdump/print-isakmp.c   (contents, props changed)
  head/contrib/tcpdump/print-isoclns.c   (contents, props changed)
  head/contrib/tcpdump/print-juniper.c   (contents, props changed)
  head/contrib/tcpdump/print-krb.c   (contents, props changed)
  head/contrib/tcpdump/print-l2tp.c   (contents, props changed)
  head/contrib/tcpdump/print-lane.c   (contents, props changed)
  head/contrib/tcpdump/print-ldp.c   (contents, props changed)
  head/contrib/tcpdump/print-llc.c   (contents, props changed)
  head/contrib/tcpdump/print-lldp.c   (contents, props changed)
  head/contrib/tcpdump/print-lmp.c   (contents, props changed)
  head/contrib/tcpdump/print-loopback.c   (contents, props changed)
  head/contrib/tcpdump/print-lspping.c   (contents, props changed)
  head/contrib/tcpdump/print-lwapp.c   (contents, props changed)
  head/contrib/tcpdump/print-lwres.c   (contents, props changed)
  head/contrib/tcpdump/print-m3ua.c   (contents, props changed)
  head/contrib/tcpdump/print-mobile.c   (contents, props changed)
  head/contrib/tcpdump/print-mobility.c   (contents, props changed)
  head/contrib/tcpdump/print-mpcp.c   (contents, props changed)
  head/contrib/tcpdump/print-mpls.c   (contents, props changed)
  head/contrib/tcpdump/print-mptcp.c   (contents, props changed)
  head/contrib/tcpdump/print-msdp.c   (contents, props changed)
  head/contrib/tcpdump/print-msnlb.c
  head/contrib/tcpdump/print-nflog.c   (contents, props changed)
  head/contrib/tcpdump/print-nfs.c   (contents, props changed)
  head/contrib/tcpdump/print-ntp.c   (contents, props changed)
  head/contrib/tcpdump/print-null.c   (contents, props changed)
  head/contrib/tcpdump/print-olsr.c   (contents, props changed)
  head/contrib/tcpdump/print-openflow-1.0.c   (contents, props changed)
  head/contrib/tcpdump/print-openflow.c   (contents, props changed)
  head/contrib/tcpdump/print-ospf.c   (contents, props changed)
  head/contrib/tcpdump/print-ospf6.c   (contents, props changed)
  head/contrib/tcpdump/print-otv.c
  head/contrib/tcpdump/print-pflog.c   (contents, props changed)
  head/contrib/tcpdump/print-pfsync.c   (contents, props changed)
  head/contrib/tcpdump/print-pgm.c   (contents, props changed)
  head/contrib/tcpdump/print-pim.c   (contents, props changed)
  head/contrib/tcpdump/print-pktap.c   (contents, props changed)
  head/contrib/tcpdump/print-ppi.c   (contents, props changed)
  head/contrib/tcpdump/print-ppp.c   (contents, props changed)
  head/contrib/tcpdump/print-pppoe.c   (contents, props changed)
  head/contrib/tcpdump/print-pptp.c   (contents, props changed)
  head/contrib/tcpdump/print-radius.c   (contents, props changed)
  head/contrib/tcpdump/print-raw.c   (contents, props changed)
  head/contrib/tcpdump/print-rip.c   (contents, props changed)
  head/contrib/tcpdump/print-ripng.c   (contents, props changed)
  head/contrib/tcpdump/print-rpki-rtr.c   (contents, props changed)
  head/contrib/tcpdump/print-rrcp.c   (contents, props changed)
  head/contrib/tcpdump/print-rsvp.c   (contents, props changed)
  head/contrib/tcpdump/print-rt6.c   (contents, props changed)
  head/contrib/tcpdump/print-rtsp.c   (contents, props changed)
  head/contrib/tcpdump/print-rx.c   (contents, props changed)
  head/contrib/tcpdump/print-sctp.c   (contents, props changed)
  head/contrib/tcpdump/print-sflow.c   (contents, props changed)
  head/contrib/tcpdump/print-sip.c   (contents, props changed)
  head/contrib/tcpdump/print-sl.c   (contents, props changed)
  head/contrib/tcpdump/print-sll.c   (contents, props changed)
  head/contrib/tcpdump/print-slow.c   (contents, props changed)
  head/contrib/tcpdump/print-smb.c   (contents, props changed)
  head/contrib/tcpdump/print-smtp.c   (contents, props changed)
  head/contrib/tcpdump/print-snmp.c   (contents, props changed)
  head/contrib/tcpdump/print-stp.c   (contents, props changed)
  head/contrib/tcpdump/print-sunatm.c   (contents, props changed)
  head/contrib/tcpdump/print-sunrpc.c   (contents, props changed)
  head/contrib/tcpdump/print-symantec.c   (contents, props changed)
  head/contrib/tcpdump/print-syslog.c   (contents, props changed)
  head/contrib/tcpdump/print-tcp.c   (contents, props changed)
  head/contrib/tcpdump/print-telnet.c   (contents, props changed)
  head/contrib/tcpdump/print-tftp.c   (contents, props changed)
  head/contrib/tcpdump/print-timed.c   (contents, props changed)
  head/contrib/tcpdump/print-tipc.c
  head/contrib/tcpdump/print-token.c   (contents, props changed)
  head/contrib/tcpdump/print-udld.c   (contents, props changed)
  head/contrib/tcpdump/print-udp.c   (contents, props changed)
  head/contrib/tcpdump/print-usb.c   (contents, props changed)
  head/contrib/tcpdump/print-vjc.c   (contents, props changed)
  head/contrib/tcpdump/print-vqp.c   (contents, props changed)
  head/contrib/tcpdump/print-vrrp.c   (contents, props changed)
  head/contrib/tcpdump/print-vtp.c   (contents, props changed)
  head/contrib/tcpdump/print-vxlan.c
  head/contrib/tcpdump/print-wb.c   (contents, props changed)
  head/contrib/tcpdump/print-zephyr.c   (contents, props changed)
  head/contrib/tcpdump/print-zeromq.c
  head/contrib/tcpdump/rpc_auth.h   (contents, props changed)
  head/contrib/tcpdump/rpc_msg.h   (contents, props changed)
  head/contrib/tcpdump/rpl.h   (contents, props changed)
  head/contrib/tcpdump/setsignal.c   (contents, props changed)
  head/contrib/tcpdump/signature.c   (contents, props changed)
  head/contrib/tcpdump/signature.h   (contents, props changed)
  head/contrib/tcpdump/smb.h   (contents, props changed)
  head/contrib/tcpdump/smbutil.c   (contents, props changed)
  head/contrib/tcpdump/tcp.h   (contents, props changed)
  head/contrib/tcpdump/tcpdump.1.in   (contents, props changed)
  head/contrib/tcpdump/tcpdump.c   (contents, props changed)
  head/contrib/tcpdump/udp.h   (contents, props changed)
  head/contrib/tcpdump/vfprintf.c   (contents, props changed)
  head/usr.sbin/tcpdump/tcpdump/Makefile
  head/usr.sbin/tcpdump/tcpdump/config.h
Directory Properties:
  head/contrib/tcpdump/   (props changed)
  head/contrib/tcpdump/LICENSE   (props changed)
  head/contrib/tcpdump/Makefile-devel-adds   (props changed)
  head/contrib/tcpdump/ah.h   (props changed)
  head/contrib/tcpdump/appletalk.h   (props changed)
  head/contrib/tcpdump/atime.awk   (props changed)
  head/contrib/tcpdump/atm.h   (props changed)
  head/contrib/tcpdump/chdlc.h   (props changed)
  head/contrib/tcpdump/config.guess   (props changed)
  head/contrib/tcpdump/config.sub   (props changed)
  head/contrib/tcpdump/getopt_long.h   (props changed)
  head/contrib/tcpdump/gmpls.h   (props changed)
  head/contrib/tcpdump/gmt2local.h   (props changed)
  head/contrib/tcpdump/install-sh   (props changed)
  head/contrib/tcpdump/lbl/os-osf4.h   (props changed)
  head/contrib/tcpdump/llc.h   (props changed)
  head/contrib/tcpdump/makemib   (props changed)
  head/contrib/tcpdump/missing/getopt_long.c   (props changed)
  head/contrib/tcpdump/mkdep   (props changed)
  head/contrib/tcpdump/mpls.h   (props changed)
  head/contrib/tcpdump/nlpid.h   (props changed)
  head/contrib/tcpdump/openflow.h   (props changed)
  head/contrib/tcpdump/ospf.h   (props changed)
  head/contrib/tcpdump/packetdat.awk   (props changed)
  head/contrib/tcpdump/pcap_dump_ftell.c   (props changed)
  head/contrib/tcpdump/send-ack.awk   (props changed)
  head/contrib/tcpdump/setsignal.h   (props changed)
  head/contrib/tcpdump/slcompress.h   (props changed)
  head/contrib/tcpdump/stime.awk   (props changed)

Modified: head/contrib/tcpdump/CHANGES
==============================================================================
--- head/contrib/tcpdump/CHANGES        Wed Feb  1 20:10:56 2017        
(r313047)
+++ head/contrib/tcpdump/CHANGES        Wed Feb  1 20:26:42 2017        
(r313048)
@@ -1,3 +1,187 @@
+Wednesday January 18, 2017 devel.fx.leb...@orange.fr
+  Summary for 4.9.0 tcpdump release
+    General updates:
+    Improve separation frontend/backend (tcpdump/libnetdissect)
+    Don't require IPv6 library support in order to support IPv6 addresses
+    Introduce data types to use for integral values in packet structures
+    Fix display of timestamps with -tt, -ttt and -ttttt options
+    Fix some heap overflows found with American Fuzzy Lop by Hanno Boeck and 
others
+        (More information in the log with CVE-2016-* and CVE-2017-*)
+    Change the way protocols print link-layer addresses (Fix heap overflows
+        in CALM-FAST and GeoNetworking printers)
+    Pass correct caplen value to ether_print() and some other functions
+    Fix lookup_nsap() to match what isonsap_string() expects
+    Clean up relative time stamp printing (Fix an array overflow)
+    Fix some alignment issues with GCC on Solaris 10 SPARC
+    Add some ND_TTEST_/ND_TCHECK_ macros to simplify writing bounds checks
+    Add a fn_printztn() which returns the number of bytes processed
+    Add nd_init() and nd_cleanup() functions. Improve libsmi support
+    Add CONTRIBUTING file
+    Add a summary comment in all printers
+    Compile with more warning options in devel mode if supported (-Wcast-qual, 
...)
+    Fix some leaks found by Valgrind/Memcheck
+    Fix a bunch of de-constifications
+    Squelch some Coverity warnings and some compiler warnings
+    Update Coverity and Travis-CI setup
+    Update Visual Studio files
+
+    Frontend:
+    Fix capsicum support to work with zerocopy buffers in bpf
+    Try opening interfaces by name first, then by name-as-index
+    Work around pcap_create() failures fetching time stamp type lists
+    Fix a segmentation fault with 'tcpdump -J'
+    Improve addrtostr6() bounds checking
+    Add exit_tcpdump() function
+    Don't drop CAP_SYS_CHROOT before chrooting
+    Fixes issue where statistics not reported when -G and -W options used
+
+    New printers supporting:
+    Generic Protocol Extension for VXLAN (VXLAN-GPE)
+    Home Networking Control Protocol (HNCP), RFCs 7787 and 7788
+    Locator/Identifier Separation Protocol (LISP), type 3 and type 4 packets
+    Marvell Extended Distributed Switch Architecture header (MEDSA)
+    Network Service Header (NSH)
+    REdis Serialization Protocol (RESP)
+
+    Updated printers:
+    802.11: Beginnings of 11ac radiotap support
+    802.11: Check the Protected bit for management frames
+    802.11: Do bounds checking on last_presentp before dereferencing it (Fix a 
heap overflow)
+    802.11: Fix the radiotap printer to handle the special bits correctly
+    802.11: If we have the MCS field, it's 11n
+    802.11: Only print unknown frame type or subtype messages once
+    802.11: Radiotap dBm values get printed as dB; Update a test output 
accordingly
+    802.11: Source and destination addresses were backwards
+    AH: Add a bounds check
+    AH: Report to our caller that dissection failed if a bounds check fails
+    AP1394: Print src > dst, not dst > src
+    ARP: Don't assume the target hardware address is <= 6 octets long (Fix a 
heap overflow)
+    ATALK: Add bounds and length checks (Fix heap overflows)
+    ATM: Add some bounds checks (Fix a heap overflow)
+    ATM: Fix an incorrect bounds check
+    BFD: Update specification from draft to RFC 5880
+    BFD: Update to print optional authentication field
+    BGP: Add decoding of ADD-PATH capability
+    BGP: Add support for the AIGP attribute (RFC7311)
+    BGP: Print LARGE_COMMUNITY Path Attribute
+    BGP: Update BGP numbers from IANA; Print minor values for FSM notification
+    BOOTP: Add a bounds check
+    Babel: Add decoder for source-specific extension
+    CDP: Filter out non-printable characters
+    CFM: Fixes to match the IEEE standard, additional bounds and length checks
+    CSLIP: Add more bounds checks (Fix a heap overflow)
+    ClassicalIPoATM: Add a bounds check on LLC+SNAP header (Fix a heap 
overflow)
+    DHCP: Fix MUDURL and TZ options
+    DHCPv6: Process MUDURL and TZ options
+    DHCPv6: Update Status Codes with RFCs/IANA names
+    DNS: Represent the "DNSSEC OK" bit as "DO" instead of "OK". Add a test case
+    DTP: Improve packet integrity checks
+    EGP: Fix bounds checks
+    ESP: Don't use OpenSSL_add_all_algorithms() in OpenSSL 1.1.0 or later
+    ESP: Handle OpenSSL 1.1.x
+    Ethernet: Add some bounds checking before calling isoclns_print (Fix a 
heap overflow)
+    Ethernet: Print the Length/Type field as length when needed
+    FDDI: Fix -e output for FDDI
+    FR: Add some packet-length checks and improve Q.933 printing (Fix heap 
overflows)
+    GRE: Add some bounds checks (Fix heap overflows)
+    Geneve: Fix error message with invalid option length; Update list option 
classes
+    HNCP: Fix incorrect time interval format. Fix handling of IPv4 prefixes
+    ICMP6: Fetch a 32-bit big-endian quantity with EXTRACT_32BITS()
+    ICMP6: dagid is always an IPv6 address, not an opaque 128-bit string
+    IGMP: Add a length check
+    IP: Add a bounds check (Fix a heap overflow)
+    IP: Check before fetching the protocol version (Fix a heap overflow)
+    IP: Don't try to dissect if IP version != 4 (Fix a heap overflow)
+    IP: Stop processing IPPROTO_ values once we hit IPPROTO_IPCOMP
+    IPComp: Check whether we have the CPI before we fetch it (Fix a heap 
overflow)
+    IPoFC: Fix -e output (IP-over-Fibre Channel)
+    IPv6: Don't overwrite the destination IPv6 address for routing headers
+    IPv6: Fix header printing
+    IPv6: Stop processing IPPROTO_ values once we hit IPPROTO_IPCOMP
+    ISAKMP: Clean up parsing of IKEv2 Security Associations
+    ISOCLNS/IS-IS: Add support for Purge Originator Identifier (RFC6232) and 
test cases
+    ISOCLNS/IS-IS: Don't overwrite packet data when checking the signature
+    ISOCLNS/IS-IS: Filter out non-printable characters
+    ISOCLNS/IS-IS: Fix segmentation faults
+    ISOCLNS/IS-IS: Have signature_verify() do the copying and clearing
+    ISOCLNS: Add some bounds checks
+    Juniper: Make sure a Juniper header TLV isn't bigger than what's left in 
the packet (Fix a heap overflow)
+    LLC/SNAP: With -e, print the LLC header before the SNAP header; without 
it, cut the SNAP header
+    LLC: Add a bounds check (Fix a heap overflow)
+    LLC: Clean up printing of LLC packets
+    LLC: Fix the printing of RFC 948-style IP packets
+    LLC: Skip the LLC and SNAP headers with -x for 802.11 and some other 
protocols
+    LLDP: Implement IANA OUI and LLDP MUD option
+    MPLS LSP ping: Update printing for RFC 4379, bug fixes, more bounds checks
+    MPLS: "length" is now the *remaining* packet length
+    MPLS: Add bounds and length checks (Fix a heap overflow)
+    NFS: Add a test that makes unaligned accesses
+    NFS: Don't assume the ONC RPC header is nicely aligned
+    NFS: Don't overflow the Opaque_Handle buffer (Fix a segmentation fault)
+    NFS: Don't run past the end of an NFSv3 file handle
+    OLSR: Add a test to cover a HNA sgw case
+    OLSR: Fix 'Advertised networks' count
+    OLSR: Fix printing of smart-gateway HNAs in IPv4
+    OSPF: Add a bounds check for the Hello packet options
+    OSPF: Do more bounds checking
+    OSPF: Fix a segmentation fault
+    OSPF: Fix printing 'ospf_topology_values' default
+    OTV: Add missing bounds checks
+    PGM: Print the formatted IP address, not the raw binary address, as a 
string
+    PIM: Add some bounds checking (Fix a heap overflow)
+    PIMv2: Fix checksumming of Register messages
+    PPI: Pass an adjusted struct pcap_pkthdr to the sub-printer
+    PPP: Add some bounds checks (Fix a heap overflow)
+    PPP: Report invalid PAP AACK/ANAK packets
+    Q.933: Add a missing bounds check
+    RADIUS: Add Value 13 "VLAN" to Tunnel-Type attribute
+    RADIUS: Filter out non-printable characters
+    RADIUS: Translate UDP/1700 as RADIUS
+    RESP: Do better checking of RESP packets
+    RPKI-RTR: Add a return value check for "fn_printn" call
+    RPKI-RTR: Remove printing when truncated condition already detected
+    RPL: Fix 'Consistency Check' control code
+    RPL: Fix suboption print
+    RSVP: An INTEGRITY object in a submessage covers only the submessage
+    RSVP: Fix an infinite loop; Add bounds and length checks
+    RSVP: Fix some if statements missing brackets
+    RSVP: Have signature_verify() do the copying and clearing
+    RTCP: Add some bounds checks
+    RTP: Add some bounds checks, fix two segmentation faults
+    SCTP: Do more bounds checking
+    SFLOW: Fix bounds checking
+    SLOW: Fix bugs, add checks
+    SMB: Before fetching the flags2 field, make sure we have it
+    SMB: Do bounds checks on NBNS resource types and resource data lengths
+    SNMP: Clean up the "have libsmi but no modules loaded" case
+    SNMP: Clean up the object abbreviation list and fix the code to match them
+    SNMP: Do bounds checks when printing character and octet strings
+    SNMP: Improve ASN.1 bounds checks
+    SNMP: More bounds and length checks
+    STP: Add a bunch of bounds checks, and fix some printing (Fix heap 
overflows)
+    STP: Filter out non-printable characters
+    TCP: Add bounds and length checks for packets with TCP option 20
+    TCP: Correct TCP option Kind value for TCP Auth and add SCPS-TP
+    TCP: Fix two bounds checks (Fix heap overflows)
+    TCP: Make sure we have the data offset field before fetching it (Fix a 
heap overflow)
+    TCP: Put TCP-AO option decoding right
+    TFTP: Don't use strchr() to scan packet data (Fix a heap overflow)
+    Telnet: Add some bounds checks
+    TokenRing: Fix -e output
+    UDLD: Fix an infinite loop
+    UDP: Add a bounds check (Fix a heap overflow)
+    UDP: Check against the packet length first
+    UDP: Don't do the DDP-over-UDP heuristic check up front
+    VAT: Add some bounds checks
+    VTP: Add a test on Mgmt Domain Name length
+    VTP: Add bounds checks and filter out non-printable characters
+    VXLAN: Add a bound check and a test case
+    ZeroMQ: Fix an infinite loop
+
+Tuesday April 14, 2015 g...@alum.mit.edu
+  Summary for 4.8.0 tcpdump release
+       Fix "-x" for Apple PKTAP and PPI packets
+
 Friday April 10, 2015 g...@alum.mit.edu
   Summary for 4.7.4 tcpdump release
        RPKI to Router Protocol: Fix Segmentation Faults and other problems
@@ -464,10 +648,10 @@ Wed.   November 12, 2003. mcr@sandelman.
 
 Tuesday, February 25, 2003. fen...@research.att.com.  3.7.2 release
 
-       Fixed infinite loop when parsing malformed isakmp packets.
+       Fixed infinite loop when parsing invalid isakmp packets.
         (reported by iDefense; already fixed in CVS)
-       Fixed infinite loop when parsing malformed BGP packets.
-       Fixed buffer overflow with certain malformed NFS packets.
+       Fixed infinite loop when parsing invalid BGP packets.
+       Fixed buffer overflow with certain invalid NFS packets.
        Pretty-print unprintable network names in 802.11 printer.
        Handle truncated nbp (appletalk) packets.
        Updated DHCPv6 printer to match draft-ietf-dhc-dhcpv6-22.txt

Copied: head/contrib/tcpdump/CONTRIBUTING (from r313024, 
vendor/tcpdump/dist/CONTRIBUTING)
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/contrib/tcpdump/CONTRIBUTING   Wed Feb  1 20:26:42 2017        
(r313048, copy of r313024, vendor/tcpdump/dist/CONTRIBUTING)
@@ -0,0 +1,103 @@
+Some Information for Contributors
+---------------------------------
+You want to contribute to Tcpdump, Thanks!
+Please, read these lines.
+
+1) Fork the Tcpdump repository on GitHub from
+   https://github.com/the-tcpdump-group/tcpdump
+   (See https://help.github.com/articles/fork-a-repo/)
+
+2) Setup an optional Travis-CI build
+   You can setup a travis build for your fork. So, you can test your changes
+   on Linux and OSX before sending pull requests.
+   (See http://docs.travis-ci.com/user/getting-started/)
+
+3) Clone your repository
+   git clone https://github.com/<username>/tcpdump.git
+
+4) Do a 'touch .devel' in your working directory.
+   Currently, the effect is
+   a) add (via configure, in Makefile) some warnings options ( -Wall
+   -Wmissing-prototypes -Wstrict-prototypes, ...) to the compiler if it
+   supports these options,
+   b) have the Makefile support "make depend" and the configure script run it.
+
+5) Configure and build
+   ./configure && make -s && make check
+
+6) Add/update sample.pcap files
+   We use tests directory to do regression tests on the dissection of captured
+   packets, by running tcpdump against a savefile sample.pcap, created with -w
+   option and comparing the results with a text file sample.out giving the
+   expected results.
+
+   Any new/updated fields in a dissector must be present in a sample.pcap file
+   and the corresponding output file.
+
+   Configuration is set in tests/TESTLIST.
+   Each line in this file has the following format:
+   test-name   sample.pcap   sample.out   tcpdump-options
+
+   the sample.out file can be build by:
+   (cd tests && ../tcpdump -n -r sample.pcap tcpdump-options > sample.out)
+
+   It is often useful to have test outputs with different verbosity levels
+   (none, -v, -vv, -vvv, etc.) depending on the code.
+
+7) Test with 'make check'
+   Don't send a pull request if 'make check' gives failed tests.
+
+8) Rebase your commits against upstream/master
+   (To keep linearity)
+
+9) Initiate and send a pull request
+   (See https://help.github.com/articles/using-pull-requests/)
+
+Some remarks
+------------
+a) A thorough reading of some other printers code is useful.
+
+b) Put the normative reference if any as comments (RFC, etc.).
+
+c) Put the format of packets/headers/options as comments.
+
+d) The printer may receive incomplete packet in the buffer, truncated at any
+   random position, for example by capturing with '-s size' option.
+   Thus use ND_TTEST, ND_TTEST2, ND_TCHECK or ND_TCHECK2 for bound checking.
+   For ND_TCHECK2:
+     Define : static const char tstr[] = " [|protocol]";
+     Define a label: trunc
+     Print with: ND_PRINT((ndo, "%s", tstr));
+   You can test the code via:
+     sudo ./tcpdump -s snaplen [-v][v][...] -i lo # in a terminal
+     sudo tcpreplay -i lo sample.pcap             # in another terminal
+   You should try several values for snaplen to do various truncation.
+
+e) Do invalid packet checks in code: Think that your code can receive in input
+   not only a valid packet but any arbitrary random sequence of octets (packet
+   - built malformed originally by the sender or by a fuzz tester,
+   - became corrupted in transit).
+   Print with: ND_PRINT((ndo, "%s", istr));    /* to print " (invalid)" */
+
+f) Use 'struct tok' for indexed strings and print them with
+   tok2str() or bittok2str() (for flags).
+
+g) Avoid empty lines in output of printers.
+
+h) A commit message must have:
+   First line: Capitalized short summary in the imperative (70 chars or less)
+
+   Body: Detailed explanatory text, if necessary. Fold it to approximately
+   72 characters. There must be an empty line separating the summary from
+   the body.
+
+i) Avoid non-ASCII characters in code and commit messages.
+
+j) Use the style of the modified sources.
+
+k) Don't mix declarations and code
+
+l) Don't use // for comments
+   Not all C compilers accept C++/C99 comments by default.
+
+m) Avoid trailing tabs/spaces

Modified: head/contrib/tcpdump/CREDITS
==============================================================================
--- head/contrib/tcpdump/CREDITS        Wed Feb  1 20:10:56 2017        
(r313047)
+++ head/contrib/tcpdump/CREDITS        Wed Feb  1 20:26:42 2017        
(r313048)
@@ -20,11 +20,13 @@ Additional people who have contributed p
     Andrea Bittau                 <a dot bittau at cs dot ucl dot ac dot uk>
     Andrew Brown                  <atatat at atatdot dot net>
     Andrew Church                 <andrew at users dot sourceforge dot net>
+    Andrew Darqui                 <andrew dot darqui at gmail dot com>
     Andrew Hintz                  <adhintz at users dot sourceforge dot net>
     Andrew Nording                <andrew at nording dot ru>
     Andrew Tridgell               <tridge at linuxcare dot com>
     Andy Heffernan                <ahh at juniper dot net>
     Anton Bernal                  <anton at juniper dot net>
+    Antonin Décimo                <antonin dot decimo at gmail dot com>
     Arkadiusz Miskiewicz          <misiek at pld dot org dot pl>
     Armando L. Caro Jr.           <acaro at mail dot eecis dot udel dot edu>
     Arnaldo Carvalho de Melo      <acme at ghostprotocols dot net>
@@ -33,6 +35,7 @@ Additional people who have contributed p
     Ben Byer                      <bushing at sourceforge dot net>
     Ben Smithurst                 <ben at scientia dot demon dot co dot uk>
     Bert Vermeulen                <bert at biot dot com>
+    Bill Parker                   <wp02855 at gmail dot com>
     Bjoern A. Zeeb                <bzeeb at Zabbadoz dot NeT>
     Bram                          <tcpdump at mail dot wizbit dot be>
     Brent L. Bates                <blbates at vigyan dot com>
@@ -95,6 +98,7 @@ Additional people who have contributed p
     Jason R. Thorpe               <thorpej at netbsd dot org>
     Jefferson Ogata               <jogata at nodc dot noaa dot gov>
     Jeffrey Hutzelman             <jhutz at cmu dot edu>
+    Jean-Raphaël Gaglione         <jr dot gaglione at yahoo dot fr>
     Jesper Peterson               <jesper at endace dot com>
     Jesse Gross                   <jesse at nicira dot com>
     Jim Hutchins                  <jim at ca dot sandia dot gov>
@@ -119,7 +123,7 @@ Additional people who have contributed p
     Larry Lile                    <lile at stdio dot com>
     Lennert Buytenhek             <buytenh at gnu dot org>
     Loganaden Velvindron          <logan at elandsys dot com>
-    Longinus00                    <Longinus00 at gmail dot com>
+    Daniel Lee                    <Longinus00 at gmail dot com>
     Loris Degioanni               <loris at netgroup-serv dot polito dot it>
     Love Hörnquist-Åstrand        <lha at stacken dot kth dot se>
     Lucas C. Villa Real           <lucasvr at us dot ibm dot com>
@@ -134,6 +138,7 @@ Additional people who have contributed p
     Markus Schöpflin              <schoepflin at sourceforge dot net>
     Marshall Rose                 <mrose at dbc dot mtview dot ca dot us>
     Martin Husemann               <martin at netbsd dot org>
+    Matthieu Boutier              <boutier at pps dot univ-paris-diderot dot 
fr>
     Max Laier                     <max at love2party dot net>
     Michael A. Meffie III         <meffie at sourceforge dot net>
     Michael Madore                <mmadore at turbolinux dot com>

Modified: head/contrib/tcpdump/INSTALL.txt
==============================================================================
--- head/contrib/tcpdump/INSTALL.txt    Wed Feb  1 20:10:56 2017        
(r313047)
+++ head/contrib/tcpdump/INSTALL.txt    Wed Feb  1 20:26:42 2017        
(r313048)
@@ -49,9 +49,10 @@ addrtoname.c - address to hostname routi
 addrtoname.h   - address to hostname definitions
 ah.h           - IPSEC Authentication Header definitions
 appletalk.h    - AppleTalk definitions
+ascii_strcasecmp.c - locale-independent case-independent string comparison
+               routines
 atime.awk      - TCP ack awk script
 atm.h          - ATM traffic type definitions
-atmuni31.h     - ATM Q.2931 definitions
 bpf_dump.c     - BPF program printing routines, in case libpcap doesn't
                  have them
 chdlc.h                - Cisco HDLC definitions
@@ -100,100 +101,8 @@ pcap_dump_ftell.c - pcap_dump_ftell() im
                doesn't have it
 pcap-missing.h - declarations of functions possibly missing from libpcap
 ppp.h          - Point to Point Protocol definitions
-print-802_11.c - IEEE 802.11 printer routines
-print-ap1394.c - Apple IP-over-IEEE 1394 printer routines
-print-ah.c     - IPSEC Authentication Header printer routines
-print-aodv.c   - AODV printer routines
-print-arcnet.c - ARCNET printer routines
-print-arp.c    - Address Resolution Protocol printer routines
-print-ascii.c  - ASCII packet dump routines
-print-atalk.c  - AppleTalk printer routines
-print-atm.c    - ATM printer routines
-print-beep.c   - BEEP printer routines
-print-bgp.c    - Border Gateway Protocol printer routines
-print-bootp.c  - BOOTP and IPv4 DHCP printer routines
-print-bt.c     - Bluetooth printer routines
-print-cdp.c    - Cisco Discovery Protocol printer routines
-print-chdlc.c  - Cisco HDLC printer routines
-print-cip.c    - Classical-IP over ATM routines
-print-cnfp.c   - Cisco NetFlow printer routines
-print-dccp.c   - DCCP printer routines
-print-decnet.c - DECnet printer routines
-print-dhcp6.c  - IPv6 DHCP printer routines
-print-domain.c - Domain Name System printer routines
-print-dvmrp.c  - Distance Vector Multicast Routing Protocol printer routines
-print-eap.c    - EAP printer routines
-print-enc.c    - OpenBSD IPsec encapsulation BPF layer printer routines
-print-egp.c    - External Gateway Protocol printer routines
-print-esp.c    - IPSEC Encapsulating Security Payload printer routines
-print-ether.c  - Ethernet printer routines
-print-fddi.c   - Fiber Distributed Data Interface printer routines
-print-fr.c     - Frame Relay printer routines
-print-frag6.c  - IPv6 fragmentation header printer routines
-print-gre.c    - Generic Routing Encapsulation printer routines
-print-hsrp.c   - Cisco Hot Standby Router Protocol printer routines
-print-icmp.c   - Internet Control Message Protocol printer routines
-print-icmp6.c  - IPv6 Internet Control Message Protocol printer routines
-print-igmp.c   - Internet Group Management Protocol printer routines
-print-igrp.c   - Interior Gateway Routing Protocol printer routines
-print-ip.c     - IP printer routines
-print-ip6.c    - IPv6 printer routines
-print-ip6opts.c        - IPv6 header option printer routines
-print-ipcomp.c - IP Payload Compression Protocol printer routines
-print-ipx.c    - IPX printer routines
-print-isakmp.c - Internet Security Association and Key Management Protocol
-print-isoclns.c        - ISO CLNS, ESIS, and ISIS printer routines
-print-krb.c    - Kerberos printer routines
-print-l2tp.c   - Layer Two Tunneling Protocol printer routines
-print-lane.c   - ATM LANE printer routines
-print-llc.c    - IEEE 802.2 LLC printer routines
-print-lspping.c        - LSPPING printer routines
-print-lwres.c  - Lightweight Resolver protocol printer routines
-print-mobile.c - IPv4 mobility printer routines
-print-mobility.c - IPv6 mobility printer routines
-print-mpls.c   - Multi-Protocol Label Switching printer routines
-print-msdp.c   - Multicast Source Discovery Protocol printer routines
-print-nfs.c    - Network File System printer routines
-print-ntp.c    - Network Time Protocol printer routines
-print-null.c   - BSD loopback device printer routines
-print-ospf.c   - Open Shortest Path First printer routines
-print-ospf6.c  - IPv6 Open Shortest Path First printer routines
-print-pflog.c  - OpenBSD packet filter log file printer routines
-print-pgm.c    - Pragmatic General Multicast printer routines
-print-pim.c    - Protocol Independent Multicast printer routines
-print-ppp.c    - Point to Point Protocol printer routines
-print-pppoe.c  - PPP-over-Ethernet printer routines
-print-pptp.c   - Point-to-Point Tunnelling Protocol printer routines
-print-radius.c - Radius protocol printer routines
-print-raw.c    - Raw IP printer routines
-print-rip.c    - Routing Information Protocol printer routines
-print-ripng.c  - IPv6 Routing Information Protocol printer routines
-print-rrcp.c   - Realtek Remote Control Protocol routines
-print-rsvp.c   - Resource reSerVation Protocol (RSVP) printer routines
-print-rt6.c    - IPv6 routing header printer routines
-print-rx.c     - AFS RX printer routines
-print-sctp.c   - Stream Control Transmission Protocol printer routines
-print-sip.c    - SIP printer routines
-print-sl.c     - Compressed Serial Line Internet Protocol printer routines
-print-sll.c    - Linux "cooked" capture printer routines
-print-slow.c   - IEEE "slow protocol" (802.3ad) printer routines
-print-smb.c    - SMB/CIFS printer routines
-print-snmp.c   - Simple Network Management Protocol printer routines
-print-stp.c    - IEEE 802.1d spanning tree protocol printer routines
-print-sunatm.c - SunATM DLPI capture printer routines
-print-sunrpc.c - Sun Remote Procedure Call printer routines
-print-symantec.c - Symantec Enterprise Firewall printer routines
-print-tcp.c    - TCP printer routines
-print-telnet.c - Telnet option printer routines
-print-tftp.c   - Trivial File Transfer Protocol printer routines
-print-timed.c  - BSD time daemon protocol printer routines
-print-token.c  - Token Ring printer routines
-print-udp.c    - UDP printer routines
-print-usb.c    - USB printer routines
-print-vjc.c    - PPP Van Jacobson compression (RFC1144) printer routines
-print-vrrp.c   - Virtual Router Redundancy Protocol
-print-wb.c     - White Board printer routines
-print-zephyr.c - Zephyr printer routines
+print.c                - Top-level routines for protocol printing
+print-*.c      - The netdissect printers
 rpc_auth.h     - definitions for ONC RPC authentication
 rpc_msg.h      - definitions for ONC RPC messages
 send-ack.awk   - unidirectional tcp send/ack awk script
@@ -203,11 +112,11 @@ slcompress.h      - SLIP/PPP Van Jacobson com
 smb.h          - SMB/CIFS definitions
 smbutil.c      - SMB/CIFS utility routines
 stime.awk      - TCP send awk script
-strcasecmp.c   - missing routine
 tcp.h          - TCP definitions
 tcpdump.1      - manual entry
 tcpdump.c      - main program
+timeval-operations.h - timeval operations macros
 udp.h          - UDP definitions
-util.c         - utility routines
+util-print.c   - utility routines for protocol printers
 vfprintf.c     - emulation routine
 win32          - headers and routines for building on Win32 systems

Modified: head/contrib/tcpdump/Makefile.in
==============================================================================
--- head/contrib/tcpdump/Makefile.in    Wed Feb  1 20:10:56 2017        
(r313047)
+++ head/contrib/tcpdump/Makefile.in    Wed Feb  1 20:26:42 2017        
(r313048)
@@ -74,7 +74,9 @@ CSRC =        setsignal.c tcpdump.c
 
 LIBNETDISSECT_SRC=\
        addrtoname.c \
+       addrtostr.c \
        af.c \
+       ascii_strcasecmp.c \
        checksum.c \
        cpack.c \
        gmpls.c \
@@ -86,6 +88,7 @@ LIBNETDISSECT_SRC=\
        nlpid.c \
        oui.c \
        parsenfsfh.c \
+       print.c \
        print-802_11.c \
        print-802_15_4.c \
        print-ah.c \
@@ -98,6 +101,7 @@ LIBNETDISSECT_SRC=\
        print-ascii.c \
        print-atalk.c \
        print-atm.c \
+       print-babel.c \
        print-beep.c \
        print-bfd.c \
        print-bgp.c \
@@ -112,6 +116,7 @@ LIBNETDISSECT_SRC=\
        print-cnfp.c \
        print-dccp.c \
        print-decnet.c \
+       print-dhcp6.c \
        print-domain.c \
        print-dtp.c \
        print-dvmrp.c \
@@ -124,17 +129,21 @@ LIBNETDISSECT_SRC=\
        print-fddi.c \
        print-forces.c \
        print-fr.c \
+       print-frag6.c \
        print-ftp.c \
        print-geneve.c \
        print-geonet.c \
        print-gre.c \
+       print-hncp.c \
        print-hsrp.c \
        print-http.c \
        print-icmp.c \
+       print-icmp6.c \
        print-igmp.c \
        print-igrp.c \
        print-ip.c \
        print-ip6.c \
+       print-ip6opts.c \
        print-ipcomp.c \
        print-ipfc.c \
        print-ipnet.c \
@@ -146,6 +155,7 @@ LIBNETDISSECT_SRC=\
        print-l2tp.c \
        print-lane.c \
        print-ldp.c \
+       print-lisp.c \
        print-llc.c \
        print-lldp.c \
        print-lmp.c \
@@ -154,7 +164,9 @@ LIBNETDISSECT_SRC=\
        print-lwapp.c \
        print-lwres.c \
        print-m3ua.c \
+       print-medsa.c \
        print-mobile.c \
+       print-mobility.c \
        print-mpcp.c \
        print-mpls.c \
        print-mptcp.c \
@@ -162,12 +174,14 @@ LIBNETDISSECT_SRC=\
        print-msnlb.c \
        print-nflog.c \
        print-nfs.c \
+       print-nsh.c \
        print-ntp.c \
        print-null.c \
        print-olsr.c \
        print-openflow-1.0.c \
        print-openflow.c \
        print-ospf.c \
+       print-ospf6.c \
        print-otv.c \
        print-pgm.c \
        print-pim.c \
@@ -178,10 +192,13 @@ LIBNETDISSECT_SRC=\
        print-pptp.c \
        print-radius.c \
        print-raw.c \
+       print-resp.c \
        print-rip.c \
+       print-ripng.c \
        print-rpki-rtr.c \
        print-rrcp.c \
        print-rsvp.c \
+       print-rt6.c \
        print-rtsp.c \
        print-rx.c \
        print-sctp.c \
@@ -211,11 +228,14 @@ LIBNETDISSECT_SRC=\
        print-vrrp.c \
        print-vtp.c \
        print-vxlan.c \
+       print-vxlan-gpe.c \
        print-wb.c \
        print-zephyr.c \
        print-zeromq.c \
+       netdissect.c \
        signature.c \
-       util.c
+       strtoaddr.c \
+       util-print.c
 
 LOCALSRC = @LOCALSRC@
 GENSRC = version.c
@@ -232,11 +252,12 @@ SRC =     $(CSRC) $(GENSRC) $(LOCALSRC) $(LI
 OBJ =  $(CSRC:.c=.o) $(GENSRC:.c=.o) $(LIBNETDISSECT_OBJ)
 HDR = \
        addrtoname.h \
+       addrtostr.h \
        af.h \
        ah.h \
        appletalk.h \
+       ascii_strcasecmp.h \
        atm.h \
-       atmuni31.h \
        chdlc.h \
        cpack.h \
        ether.h \
@@ -264,6 +285,7 @@ HDR = \
        oui.h \
        pcap-missing.h \
        ppp.h \
+       print.h \
        rpc_auth.h \
        rpc_msg.h \
        rpl.h \
@@ -271,14 +293,15 @@ HDR = \
        signature.h \
        slcompress.h \
        smb.h \
+       strtoaddr.h \
        tcp.h \
-       tcpdump-stdinc.h \
+       netdissect-stdinc.h \
+       timeval-operations.h \
        udp.h
 
 TAGHDR = \
        /usr/include/arpa/tftp.h \
        /usr/include/net/if_arp.h \
-       /usr/include/net/slip.h \
        /usr/include/netinet/if_ether.h \
        /usr/include/netinet/in.h \
        /usr/include/netinet/ip_icmp.h \
@@ -292,11 +315,14 @@ CLEANFILES = $(PROG) $(OBJ) $(GENSRC)
 
 EXTRA_DIST = \
        CHANGES \
+       CONTRIBUTING \
        CREDITS \
        INSTALL.txt \
        LICENSE \
        Makefile.in \
        Makefile-devel-adds \
+       PLATFORMS \
+       README \
        README.md \
        Readme.Win32 \
        VERSION \
@@ -314,14 +340,9 @@ EXTRA_DIST = \
        lbl/os-sunos4.h \
        lbl/os-ultrix4.h \
        makemib \
-       missing/addrinfo.h \
        missing/dlnames.c \
        missing/datalinks.c \
-       missing/getnameinfo.c \
        missing/getopt_long.c \
-       missing/inet_aton.c \
-       missing/inet_ntop.c \
-       missing/inet_pton.c \
        missing/snprintf.c \
        missing/strdup.c \
        missing/strlcat.c \
@@ -330,27 +351,19 @@ EXTRA_DIST = \
        mkdep \
        packetdat.awk \
        pcap_dump_ftell.c \
-       print-babel.c \
-       print-dhcp6.c \
-       print-frag6.c \
-       print-icmp6.c \
-       print-ip6opts.c \
-       print-mobility.c \
-       print-ospf6.c \
        print-pflog.c \
-       print-ripng.c \
-       print-rt6.c \
        print-smb.c \
        send-ack.awk \
        smbutil.c \
        stime.awk \
-       strcasecmp.c \
        tcpdump.1.in \
        vfprintf.c \
-       win32/Include/w32_fzs.h \
        win32/prj/GNUmakefile \
        win32/prj/WinDump.dsp \
-       win32/prj/WinDump.dsw
+       win32/prj/WinDump.dsw \
+       win32/prj/WinDump.sln \
+       win32/prj/WinDump.vcproj \
+       win32/src/ether_ntohost.c
 
 TEST_DIST= `find tests \( -name 'DIFF' -prune \) -o \( -name NEW -prune \) -o 
-type f \! -name '.*' \! -name '*~' -print`
 
@@ -362,23 +375,15 @@ $(PROG): $(OBJ) @V_PCAPDEP@
 
 $(LIBNETDISSECT): $(LIBNETDISSECT_OBJ)
        @rm -f $@
-       $(AR) $(ARFLAGS) $@ $(LIBNETDISSECT_OBJ)
+       $(AR) cr $@ $(LIBNETDISSECT_OBJ)
        $(RANLIB) $@
 
 datalinks.o: $(srcdir)/missing/datalinks.c
        $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c
 dlnames.o: $(srcdir)/missing/dlnames.c
        $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/dlnames.c
-getnameinfo.o: $(srcdir)/missing/getnameinfo.c
-       $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getnameinfo.c
 getopt_long.o: $(srcdir)/missing/getopt_long.c
        $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getopt_long.c
-inet_pton.o: $(srcdir)/missing/inet_pton.c
-       $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_pton.c
-inet_ntop.o: $(srcdir)/missing/inet_ntop.c
-       $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_ntop.c
-inet_aton.o: $(srcdir)/missing/inet_aton.c
-       $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_aton.c
 snprintf.o: $(srcdir)/missing/snprintf.c
        $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
 strdup.o: $(srcdir)/missing/strdup.c
@@ -434,6 +439,9 @@ distclean:
 check: tcpdump
        (cd tests && ./TESTrun.sh)
 
+extags: $(TAGFILES)
+       ctags $(TAGFILES)
+
 tags: $(TAGFILES)
        ctags -wtd $(TAGFILES)
 

Copied: head/contrib/tcpdump/PLATFORMS (from r313024, 
vendor/tcpdump/dist/PLATFORMS)
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/contrib/tcpdump/PLATFORMS      Wed Feb  1 20:26:42 2017        
(r313048, copy of r313024, vendor/tcpdump/dist/PLATFORMS)
@@ -0,0 +1,9 @@
+== Tested platforms ==
+NetBSD                   5.1/i386      (mcr - 2012/4/1)
+Debian Linux (squeeze/i386)    (mcr - 2012/4/1)
+
+---
+RedHat Linux   6.1/i386        (assar)
+FreeBSD                2.2.8/i386      (itojun)
+
+

Copied: head/contrib/tcpdump/README (from r313024, vendor/tcpdump/dist/README)
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/contrib/tcpdump/README Wed Feb  1 20:26:42 2017        (r313048, copy 
of r313024, vendor/tcpdump/dist/README)
@@ -0,0 +1 @@
+link README.md
\ No newline at end of file

Modified: head/contrib/tcpdump/VERSION
==============================================================================
--- head/contrib/tcpdump/VERSION        Wed Feb  1 20:10:56 2017        
(r313047)
+++ head/contrib/tcpdump/VERSION        Wed Feb  1 20:26:42 2017        
(r313048)
@@ -1 +1 @@
-4.7.4
+4.9.0

Modified: head/contrib/tcpdump/addrtoname.c
==============================================================================
--- head/contrib/tcpdump/addrtoname.c   Wed Feb  1 20:10:56 2017        
(r313047)
+++ head/contrib/tcpdump/addrtoname.c   Wed Feb  1 20:26:42 2017        
(r313048)
@@ -20,11 +20,8 @@
  *
  *  Internet, ethernet, port, and protocol string to address
  *  and address to string conversion routines
- *
- * $FreeBSD$
  */
 
-#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -33,7 +30,8 @@
 #include <libcasper.h>
 #include <casper/cap_dns.h>
 #endif /* HAVE_CASPER */
-#include <tcpdump-stdinc.h>
+
+#include <netdissect-stdinc.h>
 
 #ifdef USE_ETHER_NTOHOST
 #ifdef HAVE_NETINET_IF_ETHER_H
@@ -64,8 +62,10 @@ extern int ether_ntohost(char *, const s
 #include <string.h>
 #include <stdlib.h>
 
-#include "interface.h"
+#include "netdissect.h"
 #include "addrtoname.h"
+#include "addrtostr.h"
+#include "ethertype.h"
 #include "llc.h"
 #include "setsignal.h"
 #include "extract.h"
@@ -78,7 +78,7 @@ extern int ether_ntohost(char *, const s
 /*
  * hash tables for whatever-to-name translations
  *
- * XXX there has to be error checks against strdup(3) failure
+ * ndo_error() called on strdup(3) failure
  */
 
 #define HASHNAMESIZE 4096
@@ -96,7 +96,7 @@ static struct hnamemem eprototable[HASHN
 static struct hnamemem dnaddrtable[HASHNAMESIZE];
 static struct hnamemem ipxsaptable[HASHNAMESIZE];
 
-#if defined(INET6) && defined(WIN32)
+#ifdef _WIN32
 /*
  * fake gethostbyaddr for Win2k/XP
  * gethostbyaddr() returns incorrect value when AF_INET6 is passed
@@ -134,9 +134,8 @@ win32_gethostbyaddr(const char *addr, in
        }
 }
 #define gethostbyaddr win32_gethostbyaddr
-#endif /* INET6 & WIN32 */
+#endif /* _WIN32 */
 
-#ifdef INET6
 struct h6namemem {
        struct in6_addr addr;
        char *name;
@@ -144,7 +143,6 @@ struct h6namemem {
 };
 
 static struct h6namemem h6nametable[HASHNAMESIZE];
-#endif /* INET6 */
 
 struct enamemem {
        u_short e_addr0;
@@ -214,7 +212,7 @@ extern cap_channel_t *capdns;
  *
  * NOTE: ap is *NOT* necessarily part of the packet data (not even if
  * this is being called with the "ipaddr_string()" macro), so you
- * *CANNOT* use the TCHECK{2}/TTEST{2} macros on it.  Furthermore,
+ * *CANNOT* use the ND_TCHECK{2}/ND_TTEST{2} macros on it.  Furthermore,
  * even in cases where it *is* part of the packet data, the caller
  * would still have to check for a null return value, even if it's
  * just printing the return value with "%s" - not all versions of
@@ -232,7 +230,7 @@ getname(netdissect_options *ndo, const u
 {
        register struct hostent *hp;
        uint32_t addr;
-       static struct hnamemem *p;              /* static for longjmp() */
+       struct hnamemem *p;
 
        memcpy(&addr, ap, sizeof(addr));
        p = &hnametable[addr & (HASHNAMESIZE-1)];
@@ -241,7 +239,7 @@ getname(netdissect_options *ndo, const u
                        return (p->name);
        }
        p->addr = addr;
-       p->nxt = newhnamemem();
+       p->nxt = newhnamemem(ndo);
 
        /*
         * Print names unless:
@@ -263,6 +261,9 @@ getname(netdissect_options *ndo, const u
                        char *dotp;
 
                        p->name = strdup(hp->h_name);
+                       if (p->name == NULL)
+                               (*ndo->ndo_error)(ndo,
+                                                 "getname: 
strdup(hp->h_name)");
                        if (ndo->ndo_Nflag) {
                                /* Remove domain qualifications */
                                dotp = strchr(p->name, '.');
@@ -273,10 +274,11 @@ getname(netdissect_options *ndo, const u
                }
        }
        p->name = strdup(intoa(addr));
+       if (p->name == NULL)
+               (*ndo->ndo_error)(ndo, "getname: strdup(intoa(addr))");
        return (p->name);
 }
 
-#ifdef INET6
 /*
  * Return a name for the IP6 address pointed to by ap.  This address
  * is assumed to be in network byte order.
@@ -292,7 +294,7 @@ getname6(netdissect_options *ndo, const 
                        uint16_t d;
                } addra;
        } addr;
-       static struct h6namemem *p;             /* static for longjmp() */
+       struct h6namemem *p;
        register const char *cp;
        char ntop_buf[INET6_ADDRSTRLEN];
 
@@ -303,7 +305,7 @@ getname6(netdissect_options *ndo, const 
                        return (p->name);
        }
        p->addr = addr.addr;
-       p->nxt = newh6namemem();
+       p->nxt = newh6namemem(ndo);
 
        /*
         * Do not print names if -n was given.
@@ -315,11 +317,15 @@ getname6(netdissect_options *ndo, const 
                            sizeof(addr), AF_INET6);
                } else
 #endif
-                       hp = gethostbyaddr((char *)&addr, sizeof(addr), 
AF_INET6);
+                       hp = gethostbyaddr((char *)&addr, sizeof(addr),
+                           AF_INET6);
                if (hp) {
                        char *dotp;
 
                        p->name = strdup(hp->h_name);
+                       if (p->name == NULL)
+                               (*ndo->ndo_error)(ndo,
+                                                 "getname6: 
strdup(hp->h_name)");
                        if (ndo->ndo_Nflag) {
                                /* Remove domain qualifications */
                                dotp = strchr(p->name, '.');
@@ -329,11 +335,12 @@ getname6(netdissect_options *ndo, const 
                        return (p->name);
                }
        }
-       cp = inet_ntop(AF_INET6, &addr, ntop_buf, sizeof(ntop_buf));
+       cp = addrtostr6(ap, ntop_buf, sizeof(ntop_buf));
        p->name = strdup(cp);
+       if (p->name == NULL)
+               (*ndo->ndo_error)(ndo, "getname6: strdup(cp)");
        return (p->name);
 }
-#endif /* INET6 */
 
 static const char hex[] = "0123456789abcdef";
 
@@ -341,7 +348,7 @@ static const char hex[] = "0123456789abc
 /* Find the hash node that corresponds the ether address 'ep' */
 
 static inline struct enamemem *
-lookup_emem(const u_char *ep)
+lookup_emem(netdissect_options *ndo, const u_char *ep)
 {
        register u_int i, j, k;
        struct enamemem *tp;
@@ -363,7 +370,7 @@ lookup_emem(const u_char *ep)
        tp->e_addr2 = k;
        tp->e_nxt = (struct enamemem *)calloc(1, sizeof(*tp));
        if (tp->e_nxt == NULL)
-               error("lookup_emem: calloc");
+               (*ndo->ndo_error)(ndo, "lookup_emem: calloc");
 
        return tp;
 }
@@ -374,7 +381,8 @@ lookup_emem(const u_char *ep)
  */
 
 static inline struct enamemem *
-lookup_bytestring(register const u_char *bs, const unsigned int nlen)
+lookup_bytestring(netdissect_options *ndo, register const u_char *bs,
+                 const unsigned int nlen)
 {
        struct enamemem *tp;
        register u_int i, j, k;
@@ -406,12 +414,12 @@ lookup_bytestring(register const u_char 
 
        tp->e_bs = (u_char *) calloc(1, nlen + 1);
        if (tp->e_bs == NULL)
-               error("lookup_bytestring: calloc");
+               (*ndo->ndo_error)(ndo, "lookup_bytestring: calloc");
 
        memcpy(tp->e_bs, bs, nlen);
        tp->e_nxt = (struct enamemem *)calloc(1, sizeof(*tp));
        if (tp->e_nxt == NULL)
-               error("lookup_bytestring: calloc");
+               (*ndo->ndo_error)(ndo, "lookup_bytestring: calloc");
 
        return tp;
 }
@@ -419,14 +427,15 @@ lookup_bytestring(register const u_char 
 /* Find the hash node that corresponds the NSAP 'nsap' */
 
 static inline struct enamemem *
-lookup_nsap(register const u_char *nsap)
+lookup_nsap(netdissect_options *ndo, register const u_char *nsap,
+           register u_int nsap_length)
 {
        register u_int i, j, k;
-       unsigned int nlen = *nsap;
        struct enamemem *tp;
-       const u_char *ensap = nsap + nlen - 6;
+       const u_char *ensap;
 

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to