summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMichele Marchetto <michele@cvs.openbsd.org>2008-12-29 10:02:56 +0000
committerMichele Marchetto <michele@cvs.openbsd.org>2008-12-29 10:02:56 +0000
commit4dc78b02d4c078c87b347c5c347ac6059e904a5c (patch)
tree4b7df97ce6ba5e4b38d6f006a6c72976026391bb /usr.sbin
parentb9d66a2dc6f6a73c3cabbc61f48a1b2f14ef7f7e (diff)
Recognize MPLS packets over loopback interfaces.
OK canacar@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/tcpdump/print-null.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/usr.sbin/tcpdump/print-null.c b/usr.sbin/tcpdump/print-null.c
index 2bff7e7fd9c..c07c60e792d 100644
--- a/usr.sbin/tcpdump/print-null.c
+++ b/usr.sbin/tcpdump/print-null.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-null.c,v 1.17 2007/10/07 16:41:05 deraadt Exp $ */
+/* $OpenBSD: print-null.c,v 1.18 2008/12/29 10:02:55 michele Exp $ */
/*
* Copyright (c) 1991, 1993, 1994, 1995, 1996, 1997
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Id: print-null.c,v 1.17 2007/10/07 16:41:05 deraadt Exp $ (LBL)";
+ "@(#) $Id: print-null.c,v 1.18 2008/12/29 10:02:55 michele Exp $ (LBL)";
#endif
#include <sys/param.h>
@@ -98,6 +98,9 @@ null_print(const u_char *p, const struct ip *ip, u_int length)
ether_print(p + NULL_HDRLEN, length);
break;
#endif
+ case AF_MPLS:
+ printf("mpls: ");
+ break;
default:
printf("AF %d: ", family);
@@ -152,6 +155,10 @@ null_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
break;
#endif /*INET6*/
+ case AF_MPLS:
+ mpls_print(p + NULL_HDRLEN, length);
+ break;
+
#ifdef __OpenBSD__
case AF_LINK:
if (caplen < sizeof(struct ether_header) + NULL_HDRLEN) {