20852967 update to tcpdump 4.7.4 s11u2-sru
authorStacy Yeh <stacy.yeh@oracle.com>
Tue, 23 Jun 2015 09:06:28 -0700
branchs11u2-sru
changeset 4527 72aac4474845
parent 4525 27c45fc09026
child 4528 30be54ba3f0e
20852967 update to tcpdump 4.7.4 20779852 problem in UTILITY/TCPDUMP 20060934 problem in UTILITY/TCPDUMP
components/tcpdump/Makefile
components/tcpdump/patches/10-arphrd-infiniband.patch
components/tcpdump/tcpdump.license
components/tcpdump/tcpdump.p5m
--- a/components/tcpdump/Makefile	Tue Jun 23 07:09:37 2015 -0700
+++ b/components/tcpdump/Makefile	Tue Jun 23 09:06:28 2015 -0700
@@ -18,17 +18,17 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 #
 include ../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		tcpdump
-COMPONENT_VERSION=	4.5.1
+COMPONENT_VERSION=	4.7.4
 COMPONENT_PROJECT_URL=	http://www.tcpdump.org/
 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
 COMPONENT_ARCHIVE_HASH=	\
-    sha256:14ab39657128f3a650aed4cf455f76c7590601087b6101c253d698f6e73f0b96
+    sha256:5a321f0fb959b928f26112c9f49f81d754c23c1d8ffb0feb69304fee06b77e0a
 COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)release/$(COMPONENT_ARCHIVE)
 COMPONENT_BUGDB=	utility/tcpdump
 
@@ -36,6 +36,9 @@
 include ../../make-rules/configure.mk
 include ../../make-rules/ips.mk
 
+# Prevent macro redefinition error 
+CFLAGS += -D _NETINET_IP_H
+
 # fix my alignment issues instead of falling over on sparc
 studio_ALIGN.sparc.64=-xmemalign=16i
 CONFIGURE_OPTIONS.sparc += ac_cv___attribute__=no
--- a/components/tcpdump/patches/10-arphrd-infiniband.patch	Tue Jun 23 07:09:37 2015 -0700
+++ b/components/tcpdump/patches/10-arphrd-infiniband.patch	Tue Jun 23 09:06:28 2015 -0700
@@ -1,32 +1,33 @@
-#
-# InfiniBand support
-#
-diff -N -u -r tcpdump-4.5.1.orig/interface.h tcpdump-4.5.1/interface.h
---- tcpdump-4.5.1.orig/interface.h	2013-03-24 16:49:18.000000000 -0500
-+++ tcpdump-4.5.1/interface.h	2013-12-02 11:48:13.394398375 -0600
[email protected]@ -205,6 +205,7 @@
- extern u_int pflog_if_print(const struct pcap_pkthdr *, const u_char *);
- extern u_int arcnet_if_print(const struct pcap_pkthdr *, const u_char *);
- extern u_int arcnet_linux_if_print(const struct pcap_pkthdr *, const u_char *);
+InfiniBand support for tcpdump. 
+This is an in-house patch. Sent upstream for potential inclusion in future 
+versions of tcpdump.
+
+diff -rupN tcpdump-4.7.4-orig/interface.h tcpdump-4.7.4/interface.h
+--- tcpdump-4.7.4-orig/interface.h	2015-05-26 14:13:17.000000000 -0700
++++ tcpdump-4.7.4/interface.h	2015-03-09 12:07:00.000000000 -0700
[email protected]@ -162,6 +162,7 @@ extern uint16_t create_osi_cksum(const u
+ 
+ extern char *smb_errstr(int, int);
+ extern const char *nt_errstr(uint32_t);
 +extern u_int ipoib_if_print(const struct pcap_pkthdr *, const u_char *);
- extern u_int token_print(const u_char *, u_int, u_int);
- extern u_int token_if_print(const struct pcap_pkthdr *, const u_char *);
- extern void fddi_print(const u_char *, u_int, u_int);
-diff -N -u -r tcpdump-4.5.1.orig/Makefile.in tcpdump-4.5.1/Makefile.in
---- tcpdump-4.5.1.orig/Makefile.in	2013-03-24 16:49:18.000000000 -0500
-+++ tcpdump-4.5.1/Makefile.in	2013-12-02 11:47:25.102106791 -0600
[email protected]@ -83,6 +83,7 @@
- 	print-esp.c print-ether.c print-fddi.c print-forces.c print-fr.c \
- 	print-gre.c print-hsrp.c print-icmp.c print-igmp.c \
- 	print-igrp.c print-ip.c print-ipcomp.c print-ipfc.c print-ipnet.c \
+ 
+ #ifdef INET6
+ extern int mask62plen(const u_char *);
+diff -rupN tcpdump-4.7.4-orig/Makefile.in tcpdump-4.7.4/Makefile.in
+--- tcpdump-4.7.4-orig/Makefile.in	2015-05-26 14:13:17.000000000 -0700
++++ tcpdump-4.7.4/Makefile.in	2015-05-26 15:12:05.727800640 -0700
[email protected]@ -138,6 +138,7 @@ LIBNETDISSECT_SRC=\
+ 	print-ipcomp.c \
+ 	print-ipfc.c \
+ 	print-ipnet.c \
 +	print-ipoib.c \
- 	print-ipx.c print-isoclns.c print-juniper.c print-krb.c \
- 	print-l2tp.c print-lane.c print-ldp.c print-lldp.c print-llc.c \
-         print-lmp.c print-lspping.c print-lwapp.c \
-diff -N -u -r tcpdump-4.5.1.orig/netdissect.h tcpdump-4.5.1/netdissect.h
---- tcpdump-4.5.1.orig/netdissect.h	2013-03-24 16:49:18.000000000 -0500
-+++ tcpdump-4.5.1/netdissect.h	2013-12-02 11:48:46.057536548 -0600
[email protected]@ -319,6 +319,7 @@
+ 	print-ipx.c \
+ 	print-isakmp.c \
+ 	print-isoclns.c \
+diff -rupN tcpdump-4.7.4-orig/netdissect.h tcpdump-4.7.4/netdissect.h
+--- tcpdump-4.7.4-orig/netdissect.h	2015-05-26 14:13:17.000000000 -0700
++++ tcpdump-4.7.4/netdissect.h	2015-04-22 13:32:16.000000000 -0700
[email protected]@ -395,6 +395,7 @@ extern void ether_print(netdissect_optio
  
  extern u_int ether_if_print(netdissect_options *,
                              const struct pcap_pkthdr *,const u_char *);
@@ -34,18 +35,18 @@
  extern u_int netanalyzer_if_print(netdissect_options *,
                                    const struct pcap_pkthdr *,const u_char *);
  extern u_int netanalyzer_transparent_if_print(netdissect_options *,
-diff -N -u -r tcpdump-4.5.1.orig/print-arp.c tcpdump-4.5.1/print-arp.c
---- tcpdump-4.5.1.orig/print-arp.c	2013-02-20 21:54:34.000000000 -0600
-+++ tcpdump-4.5.1/print-arp.c	2013-12-02 11:51:40.229231503 -0600
[email protected]@ -58,6 +58,7 @@
+diff -rupN tcpdump-4.7.4-orig/print-arp.c tcpdump-4.7.4/print-arp.c
+--- tcpdump-4.7.4-orig/print-arp.c	2015-05-26 14:13:17.000000000 -0700
++++ tcpdump-4.7.4/print-arp.c	2015-03-09 12:07:00.000000000 -0700
[email protected]@ -55,6 +55,7 @@ struct  arp_pkthdr {
  #define ARPHRD_ATM2225  19      /* ATM (RFC 2225) */
  #define ARPHRD_STRIP    23      /* Ricochet Starmode Radio hardware format */
  #define ARPHRD_IEEE1394 24      /* IEEE 1394 (FireWire) hardware format */
-+#define ARPHRD_INFINIBAND 32	/* InfiniBand RFC 4391 */
++#define ARPHRD_INFINIBAND 32   /* InfiniBand RFC 4391 */
          u_short ar_pro;         /* format of protocol address */
          u_char  ar_hln;         /* length of hardware address */
          u_char  ar_pln;         /* length of protocol address */
[email protected]@ -118,6 +119,7 @@
[email protected]@ -115,6 +115,7 @@ static const struct tok arphrd_values[]
      { ARPHRD_STRIP, "Strip" },
      { ARPHRD_IEEE1394, "IEEE 1394" },
      { ARPHRD_ATM2225, "ATM" },
@@ -53,10 +54,10 @@
      { 0, NULL }
  };
  
-diff -N -u -r tcpdump-4.5.1.orig/print-ipoib.c tcpdump-4.5.1/print-ipoib.c
---- tcpdump-4.5.1.orig/print-ipoib.c	1969-12-31 18:00:00.000000000 -0600
-+++ tcpdump-4.5.1/print-ipoib.c	2013-12-02 11:53:24.664773530 -0600
[email protected]@ -0,0 +1,131 @@
+diff -rupN tcpdump-4.7.4-orig/print-ipoib.c tcpdump-4.7.4/print-ipoib.c
+--- tcpdump-4.7.4-orig/print-ipoib.c	1969-12-31 16:00:00.000000000 -0800
++++ tcpdump-4.7.4/print-ipoib.c	2015-05-26 14:13:17.000000000 -0700
[email protected]@ -0,0 +1,132 @@
 +/*
 + * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 
 + *	1997, 2000, 2011, 2012
@@ -99,6 +100,7 @@
 +#include "extract.h"
 +#include "addrtoname.h"
 +
++
 +extern const struct tok ethertype_values[];
 +extern int ethertype_print(netdissect_options *, u_short, const u_char *, u_int, u_int );
 +
@@ -188,16 +190,16 @@
 + * c-basic-offset: 8
 + * End:
 + */
-diff -N -u -r tcpdump-4.5.1.orig/tcpdump.c tcpdump-4.5.1/tcpdump.c
---- tcpdump-4.5.1.orig/tcpdump.c	2013-03-24 16:49:18.000000000 -0500
-+++ tcpdump-4.5.1/tcpdump.c	2013-12-02 11:52:41.512481340 -0600
[email protected]@ -311,6 +311,9 @@
+diff -rupN tcpdump-4.7.4-orig/tcpdump.c tcpdump-4.7.4/tcpdump.c
+--- tcpdump-4.7.4-orig/tcpdump.c	2015-05-26 14:13:17.000000000 -0700
++++ tcpdump-4.7.4/tcpdump.c	2015-05-26 15:17:43.298240116 -0700
[email protected]@ -264,6 +264,9 @@ static const struct ndo_printer ndo_prin
  #ifdef DLT_IPV6
  	{ raw_if_print,		DLT_IPV6 },
  #endif
 +#ifdef DLT_IPOIB
-+	{ ipoib_if_print,	DLT_IPOIB },
++	{ ipoib_if_print, 	162 },
 +#endif
- 	{ NULL,			0 },
- };
- 
+ #ifdef HAVE_PCAP_USB_H
+ #ifdef DLT_USB_LINUX
+ 	{ usb_linux_48_byte_print, DLT_USB_LINUX},
--- a/components/tcpdump/tcpdump.license	Tue Jun 23 07:09:37 2015 -0700
+++ b/components/tcpdump/tcpdump.license	Tue Jun 23 09:06:28 2015 -0700
@@ -1,11 +1,11 @@
 Copyright (C) 1982,1986,1988-2002 The Regents of the University of California
-Copyright (C) 1998-2007 The TCPDUMP project
-Copyright (C) 1995-1999,2001 WIDE Project
+Copyright (C) 1998-2007, 2013, 2014 The TCPDUMP project
+Copyright (C) 1995-1999, 2001, 2002  WIDE Project
 Copyright (C) 2003 Bruce M. Simpson <[email protected]>
 Copyright (C) 2002 Guy Harris
 Copyright (C) 1997 Yen Yen Lim and North Dakota State University
 Copyright (C) 1988,1989 Carnegie Mellon
-Copyright (C) 1992-2006 Free Software Foundation, Inc.
+Copyright (C) 1992-2015 Free Software Foundation, Inc.
 Copyright (C) 2003-2004 David Young.
 Copyright (C) 2004 2004 Arnaldo Carvalho de Melo
 Copyright (C) 2005 Ian McDonald <[email protected]>
@@ -23,7 +23,7 @@
 Copyright (C) 1984 Sun Microsystems, Inc.
 Copyright (C) 2001 Fortress Technologies, Inc. Charlie Lenahan ([email protected])
 Copyright (C) 2003 Bruce M. Simpson <[email protected]>
-Copyright (C) 1997-1998 The NetBSD Foundation, Inc.
+Copyright (C) 1997-1998, 2000 The NetBSD Foundation, Inc.
 Copyright (C) 2000 Richard Sharpe
 Copyright (C) 2007 [email protected]
 Copyright (C) 1998 Michael Shalayeff
@@ -52,6 +52,10 @@
 Copyright (C) 1999 Cisco And Motorola
 Copyright (C) 1995-1999 Andrew Tridgell
 Copyright (C) 1998, Larry Lile
+Copyright (C) 2002 Todd C. Miller <[email protected]> 
+Copyright (c) 1999 Kungliga Tekniska Högskolan (Royal Institute of Technology, Stockholm, Sweden)
+Copyright (c) 2014 VMware, Inc.
+Copyright (c) 1986-2008 by Cisco Systems, Inc.
 
 
 
--- a/components/tcpdump/tcpdump.p5m	Tue Jun 23 07:09:37 2015 -0700
+++ b/components/tcpdump/tcpdump.p5m	Tue Jun 23 09:06:28 2015 -0700
@@ -28,7 +28,7 @@
 set name=pkg.description \
     value="The tcpdump(1) program prints out a description of the contents of packets on a network interface that match a boolean expression. The network packets captured can also be saved to a file for later analysis by the tool."
 set name=com.oracle.info.description value="tcpdump, a network traffic sniffer"
-set name=com.oracle.info.tpno value=16021
+set name=com.oracle.info.tpno value=22949
 set name=info.classification \
     value=org.opensolaris.category.2008:Applications/Internet
 set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)