diff --git a/CHANGES b/CHANGES index 1eb1e3ec8..6932fc499 100644 --- a/CHANGES +++ b/CHANGES @@ -85,6 +85,8 @@ DayOfTheWeek, Month DD, YYYY / The Tcpdump Group DayOfTheWeek, Month DD, YYYY / The Tcpdump Group Summary for 4.99.6 tcpdump release (so far!) + Remove protocol decoding for: + OTV (draft-hasmit-otv-04, this Internet-Draft is no longer active). Refine protocol decoding for: DNS: Use ND_TCHECK_LEN() instead of a custom bounds check. IPv6: Add a missing comma and remove a colon in the output. @@ -107,6 +109,7 @@ DayOfTheWeek, Month DD, YYYY / The Tcpdump Group NTP: Update a field name with the RFC 5905 name (Origin Timestamp). IPv6 mobility: Modernize packet parsing and make fixes. IP6OPTS: Modernize packet parsing and make fixes. + VXLAN: Add UDP port 8472 used by Linux as the default port. User interface: Add optional unit suffix on -C file size. Improve the handling of size suffixes for -C. diff --git a/CMakeLists.txt b/CMakeLists.txt index bb149a55c..c3d27fc94 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1373,7 +1373,6 @@ set(NETDISSECT_SOURCE_LIST_C print-openflow.c print-ospf.c print-ospf6.c - print-otv.c print-pflog.c print-pgm.c print-pim.c diff --git a/Makefile.in b/Makefile.in index e265784c6..fc102099c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -189,7 +189,6 @@ LIBNETDISSECT_SRC=\ print-openflow.c \ print-ospf.c \ print-ospf6.c \ - print-otv.c \ print-pflog.c \ print-pgm.c \ print-pim.c \ diff --git a/netdissect.h b/netdissect.h index e82c00029..f29eda992 100644 --- a/netdissect.h +++ b/netdissect.h @@ -740,7 +740,6 @@ extern void ospf6_print(netdissect_options *, const u_char *, u_int); extern int ospf_grace_lsa_print(netdissect_options *, const u_char *, u_int); extern void ospf_print(netdissect_options *, const u_char *, u_int, const u_char *); extern int ospf_te_lsa_print(netdissect_options *, const u_char *, u_int); -extern void otv_print(netdissect_options *, const u_char *, u_int); extern void pgm_print(netdissect_options *, const u_char *, u_int, const u_char *); extern void pim_print(netdissect_options *, const u_char *, u_int, const u_char *); extern void pimv1_print(netdissect_options *, const u_char *, u_int); diff --git a/print-otv.c b/print-otv.c deleted file mode 100644 index 130374000..000000000 --- a/print-otv.c +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that: (1) source code - * distributions retain the above copyright notice and this paragraph - * in its entirety, and (2) distributions including binary code include - * the above copyright notice and this paragraph in its entirety in - * the documentation or other materials provided with the distribution. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND - * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT - * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE. - * - * Original code by Francesco Fondelli (francesco dot fondelli, gmail dot com) - */ - -/* \summary: Overlay Transport Virtualization (OTV) printer */ - -/* specification: draft-hasmit-otv-04 */ - -#include - -#include "netdissect-stdinc.h" - -#define ND_LONGJMP_FROM_TCHECK -#include "netdissect.h" -#include "extract.h" - -#define OTV_HDR_LEN 8 - -/* - * OTV header, draft-hasmit-otv-04 - * - * 0 1 2 3 - * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 - * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - * |R|R|R|R|I|R|R|R| Overlay ID | - * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - * | Instance ID | Reserved | - * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - */ - -void -otv_print(netdissect_options *ndo, const u_char *bp, u_int len) -{ - uint8_t flags; - - ndo->ndo_protocol = "otv"; - ND_PRINT("OTV, "); - if (len < OTV_HDR_LEN) { - ND_PRINT("[length %u < %u]", len, OTV_HDR_LEN); - goto invalid; - } - - flags = GET_U_1(bp); - ND_PRINT("flags [%s] (0x%02x), ", flags & 0x08 ? "I" : ".", flags); - bp += 1; - - ND_PRINT("overlay %u, ", GET_BE_U_3(bp)); - bp += 3; - - ND_PRINT("instance %u\n", GET_BE_U_3(bp)); - bp += 3; - - /* Reserved */ - ND_TCHECK_1(bp); - bp += 1; - - ether_print(ndo, bp, len - OTV_HDR_LEN, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL); - return; - -invalid: - nd_print_invalid(ndo); - ND_TCHECK_LEN(bp, len); -} diff --git a/print-udp.c b/print-udp.c index 982ddb929..726fb7f37 100644 --- a/print-udp.c +++ b/print-udp.c @@ -649,8 +649,8 @@ udp_print(netdissect_options *ndo, const u_char *bp, u_int length, lwapp_data_print(ndo, cp, length); else if (IS_SRC_OR_DST_PORT(SIP_PORT)) sip_print(ndo, cp, length); - else if (IS_SRC_OR_DST_PORT(OTV_PORT)) - otv_print(ndo, cp, length); + else if (IS_SRC_OR_DST_PORT(VXLAN_LINUX_PORT)) + vxlan_print(ndo, cp, length); else if (IS_SRC_OR_DST_PORT(VXLAN_PORT)) vxlan_print(ndo, cp, length); else if (dport == GENEVE_PORT) diff --git a/tests/TESTLIST b/tests/TESTLIST index 9927dbc10..25a31efb5 100644 --- a/tests/TESTLIST +++ b/tests/TESTLIST @@ -668,8 +668,6 @@ relts-0x80000000 relts-0x80000000.pcap relts-0x80000000.out -v # bad packets from Brian Carpenter ipv6hdr-heapoverflow ipv6hdr-heapoverflow.pcap ipv6hdr-heapoverflow.out ipv6hdr-heapoverflow-v ipv6hdr-heapoverflow.pcap ipv6hdr-heapoverflow-v.out -v -otv-heapoverflow-1 otv-heapoverflow-1.pcap otv-heapoverflow-1.out -otv-heapoverflow-2 otv-heapoverflow-2.pcap otv-heapoverflow-2.out q933-heapoverflow-2 q933-heapoverflow-2.pcap q933-heapoverflow-2.out atm-heapoverflow atm-heapoverflow.pcap atm-heapoverflow.out -e ipv6-next-header-oobr-1 ipv6-next-header-oobr-1.pcap ipv6-next-header-oobr-1.out diff --git a/tests/otv-heapoverflow-1.out b/tests/otv-heapoverflow-1.out deleted file mode 100644 index 515bdb9cb..000000000 --- a/tests/otv-heapoverflow-1.out +++ /dev/null @@ -1,10 +0,0 @@ - 1 2010-12-14 15:08:45.910679 IP 192.168.0.134.47808 > 192.168.0.24.47808: UDP, length 6 - 2 2010-12-14 15:08:45.910728 IP 192.168.0.134.47808 > 192.168.0.24.47808: UDP, length 12 - 3 2010-12-14 15:08:45.916723 IP 192.168.0.24.47808 > 192.168.0.134.47808: UDP, length 6 - 4 2010-12-14 15:08:45.919556 IP 192.168.0.24.47808 > 192.168.0.255.47808: UDP, length 18 - 5 2010-12-14 15:08:45.919723 IP 192.168.0.105.47808 > 192.168.0.255.47808: UDP, length 25 - 6 2010-12-14 15:08:45.936414 IP 192.168.0.24.47808 > 192.168.0.134.47808: UDP, length 31 - 7 2010-12-14 15:08:45.937216 IP 192.168.0.18.47808 > 192.168.0.255.47808: UDP, length 24 - 8 2010-12-14 15:08:45.948725 IP 192.168.0.24.40896 > 192.168.0.134.47808: UDP, length 30 - 9 2010-12-14 15:08:45.960097 IP 192.168.0.24.47808 > 192.168.0.255.47808: UDP, length 20 - 10 2010-12-14 15:08:45.963239 IP 192.168.0.9.37123 > 97.34.1.224.8472: OTV, flags [I] (0x9d), overlay 12124160, [|otv] diff --git a/tests/otv-heapoverflow-1.pcap b/tests/otv-heapoverflow-1.pcap deleted file mode 100644 index 6e78e70d1..000000000 Binary files a/tests/otv-heapoverflow-1.pcap and /dev/null differ diff --git a/tests/otv-heapoverflow-2.out b/tests/otv-heapoverflow-2.out deleted file mode 100644 index 6fbf51a7f..000000000 --- a/tests/otv-heapoverflow-2.out +++ /dev/null @@ -1,11 +0,0 @@ - 1 2010-12-14 15:08:45.910679 IP 192.168.0.134.47808 > 192.168.0.24.47808: UDP, length 6 - 2 2010-12-14 15:08:45.910728 IP 192.168.0.134.47808 > 192.168.0.24.47808: UDP, length 12 - 3 2010-12-14 15:08:45.916723 IP 192.168.0.24.47808 > 192.168.0.134.47808: UDP, length 6 - 4 2010-12-14 15:08:45.919556 IP 192.168.0.24.47808 > 192.168.0.255.47808: UDP, length 18 - 5 2010-12-14 15:08:45.919723 IP 192.168.0.105.47808 > 192.168.0.255.47808: UDP, length 25 - 6 2010-12-14 15:08:45.936414 IP 192.168.0.24.47808 > 192.168.0.134.47808: UDP, length 31 - 7 2010-12-14 15:08:45.937216 IP 192.168.0.18.47808 > 192.168.0.255.47808: UDP, length 24 - 8 2010-12-14 15:08:45.948725 IP 192.168.0.24.40896 > 192.168.0.134.47808: UDP, length 30 - 9 2010-12-14 15:08:45.960097 IP 192.168.0.24.47808 > 192.168.0.255.47808: UDP, length 20 - 10 2010-12-14 15:08:45.963239 IP 192.168.0.9.37123 > 97.34.1.224.8472: OTV, flags [I] (0x9d), overlay 12124160, instance 4587520 - [|ether] diff --git a/tests/otv-heapoverflow-2.pcap b/tests/otv-heapoverflow-2.pcap deleted file mode 100644 index 5bb3c4a7d..000000000 Binary files a/tests/otv-heapoverflow-2.pcap and /dev/null differ diff --git a/udp.h b/udp.h index 03df5e6e3..dca963d04 100644 --- a/udp.h +++ b/udp.h @@ -233,8 +233,8 @@ struct udphdr { #ifndef HNCP_PORT #define HNCP_PORT 8231 /* RFC 7788 */ #endif -#ifndef OTV_PORT -#define OTV_PORT 8472 /* draft-hasmit-otv-04 */ +#ifndef VXLAN_LINUX_PORT +#define VXLAN_LINUX_PORT 8472 /* Linux, drivers/net/vxlan/vxlan_core.c */ #endif #ifndef ISAKMP_PORT_USER2 #define ISAKMP_PORT_USER2 8500 /*XXX - nonstandard*/