diff options
author | 2008-12-29 10:02:55 +0000 | |
---|---|---|
committer | 2008-12-29 10:02:55 +0000 | |
commit | b2c152872f6a19218caaa33fb946ae69b796fffc (patch) | |
tree | 9e1bbe52bc7c5ff086cdb2feb9182f7a3b18bff3 /usr.sbin/tcpdump/print-null.c | |
parent | Handle ENOSPC in queue_update_envelope; cleanup the code a bit; ok gilles@ (diff) | |
download | wireguard-openbsd-b2c152872f6a19218caaa33fb946ae69b796fffc.tar.xz wireguard-openbsd-b2c152872f6a19218caaa33fb946ae69b796fffc.zip |
Recognize MPLS packets over loopback interfaces.
OK canacar@
Diffstat (limited to 'usr.sbin/tcpdump/print-null.c')
-rw-r--r-- | usr.sbin/tcpdump/print-null.c | 11 |
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) { |