summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2018-07-06 06:30:36 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2018-07-06 06:30:36 +0000
commit3b164819297f12592792aea0a3be763f2f0800da (patch)
tree20e64204eeaadead710301fa01f472225ab1f236
parent5e1ab8b0ed3cbeea695be3662d1d1fd08451c49d (diff)
According to RFC7510, IANA allocated port 6635 for MPLS over UDP
-rw-r--r--usr.sbin/tcpdump/print-udp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/tcpdump/print-udp.c b/usr.sbin/tcpdump/print-udp.c
index e12b5156376..576457908fb 100644
--- a/usr.sbin/tcpdump/print-udp.c
+++ b/usr.sbin/tcpdump/print-udp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-udp.c,v 1.44 2018/07/06 06:18:03 dlg Exp $ */
+/* $OpenBSD: print-udp.c,v 1.45 2018/07/06 06:30:35 dlg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996
@@ -315,6 +315,7 @@ rtcp_print(const u_char *hdr, const u_char *ep)
#define UDPENCAP_PORT 4500 /*XXX*/
#define GRE_PORT 4754
#define MULTICASTDNS_PORT 5353
+#define MPLS_PORT 6635
#ifdef INET6
#define RIPNG_PORT 521 /*XXX*/
@@ -556,6 +557,8 @@ udp_print(const u_char *bp, u_int length, const void *iph)
vqp_print((const u_char *)(up + 1), length);
else if (ISPORT(GRE_PORT))
gre_print((const u_char *)(up + 1), length);
+ else if (ISPORT(MPLS_PORT))
+ mpls_print(cp, length);
#ifdef INET6
else if (ISPORT(RIPNG_PORT))
ripng_print((const u_char *)(up + 1), length);