20852790 update to libpcap 1.7.4
authorStacy Yeh <stacy.yeh@oracle.com>
Mon, 10 Aug 2015 12:52:35 -0700
changeset 4761 0904e6cd33e4
parent 4760 9eb33a6469f3
child 4762 4d5e4d2893b8
20852790 update to libpcap 1.7.4
components/libpcap/Makefile
components/libpcap/libpcap.p5m
components/libpcap/patches/01-pcap-bpf.m4.patch
--- a/components/libpcap/Makefile	Mon Aug 10 11:09:32 2015 -0700
+++ b/components/libpcap/Makefile	Mon Aug 10 12:52:35 2015 -0700
@@ -23,16 +23,16 @@
 include ../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		libpcap
-COMPONENT_VERSION=	1.5.1
+COMPONENT_VERSION=	1.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:259db4fe1e9f0b6b9c43a057ec5916dec7d0a821b00d6d6c4dff7db2445fa7e4
+	sha256:7ad3112187e88328b85e46dce7a9b949632af18ee74d97ffc3f2b41fe7f448b0
 COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)release/$(COMPONENT_ARCHIVE)
 COMPONENT_BUGDB=	library/libpcap
 
-TPNO=			15968
+TPNO=			23891
 
 include $(WS_MAKE_RULES)/prep.mk
 include $(WS_MAKE_RULES)/configure.mk
--- a/components/libpcap/libpcap.p5m	Mon Aug 10 11:09:32 2015 -0700
+++ b/components/libpcap/libpcap.p5m	Mon Aug 10 12:52:35 2015 -0700
@@ -18,7 +18,7 @@
 #
 # 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.
 #
 <transform file path=usr.*/man/.+ -> default mangler.man.stability uncommitted>
 # The libpcap man pages should go in section 3pcap instead of
@@ -52,11 +52,11 @@
 file path=usr/include/pcap/usb.h
 file path=usr/include/pcap/vlan.h
 link path=usr/lib/$(MACH64)/libpcap.so target=libpcap.so.1
-link path=usr/lib/$(MACH64)/libpcap.so.1 target=libpcap.so.1.5.1
-file path=usr/lib/$(MACH64)/libpcap.so.1.5.1
+link path=usr/lib/$(MACH64)/libpcap.so.1 target=libpcap.so.1.7.4
+file path=usr/lib/$(MACH64)/libpcap.so.1.7.4
 link path=usr/lib/libpcap.so target=libpcap.so.1
-link path=usr/lib/libpcap.so.1 target=libpcap.so.1.5.1
-file path=usr/lib/libpcap.so.1.5.1
+link path=usr/lib/libpcap.so.1 target=libpcap.so.1.7.4
+file path=usr/lib/libpcap.so.1.7.4
 file path=usr/share/man/man1/pcap-config.1
 file path=usr/share/man/man3pcap/pcap.3pcap
 file path=usr/share/man/man3pcap/pcap_activate.3pcap
--- a/components/libpcap/patches/01-pcap-bpf.m4.patch	Mon Aug 10 11:09:32 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-#
-# This patch was devleloped in house.  The changes have been fed
-# upstream and were merged into the-tcpdump-group/libpcap.  This
-# was committed under 2f9790bd3cfe56c0f78d10953571dc4b34060e4f.
-#
-# libpcap-1.7.0 is the projected release which will include this
-# change.
-#
---- libpcap-1.5.1/pcap-bpf.c	2014-08-14 16:14:46.837979600 +0100
-+++ libpcap-1.5.1/pcap-bpf.c	2014-08-18 15:13:20.805460460 +0100
-@@ -1539,22 +1539,43 @@
- 
- #if defined(LIFNAMSIZ) && defined(ZONENAME_MAX) && defined(lifr_zoneid)
- 	/*
-+	 * Retrieve the zoneid of the zone we are currently executing in.
-+	 */
-+	if ((ifr.lifr_zoneid = getzoneid()) == -1) {
-+		snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "getzoneid(): %s",
-+		     pcap_strerror(errno));
-+		status = PCAP_ERROR;
-+		goto bad;
-+	}
-+	/*
- 	 * Check if the given source network device has a '/' separated
--	 * zonename prefix string. The zonename prefixed source device
--	 * can be used by libpcap consumers to capture network traffic
--	 * in non-global zones from the global zone on Solaris 11 and
--	 * above. If the zonename prefix is present then we strip the
--	 * prefix and pass the zone ID as part of lifr_zoneid.
-+	 * zonename prefix string.  The zonename prefixed source device can
-+	 * be used by pcap consumers in the Solaris global zone to capture
-+	 * traffic on datalinks in non-global zones.  Non-global zones
-+	 * do not have access to datalinks outside of their own namespace.
- 	 */
- 	if ((zonesep = strchr(p->opt.source, '/')) != NULL) {
--		char zonename[ZONENAME_MAX];
-+		char path_zname[ZONENAME_MAX];
- 		int  znamelen;
- 		char *lnamep;
- 
-+		if (ifr.lifr_zoneid != GLOBAL_ZONEID) {
-+			snprintf(p->errbuf, PCAP_ERRBUF_SIZE,
-+			    "zonename/linkname only valid in global zone.");
-+			status = PCAP_ERROR;
-+			goto bad;
-+		}
- 		znamelen = zonesep - p->opt.source;
--		(void) strlcpy(zonename, p->opt.source, znamelen + 1);
-+		(void) strlcpy(path_zname, p->opt.source, znamelen + 1);
-+		ifr.lifr_zoneid = getzoneidbyname(path_zname);
-+		if (ifr.lifr_zoneid == -1) {
-+			snprintf(p->errbuf, PCAP_ERRBUF_SIZE,
-+			    "getzoneidbyname(%s): %s", path_zname,
-+		    	pcap_strerror(errno));
-+			status = PCAP_ERROR;
-+			goto bad;
-+		}
- 		lnamep = strdup(zonesep + 1);
--		ifr.lifr_zoneid = getzoneidbyname(zonename);
- 		free(p->opt.source);
- 		p->opt.source = lnamep;
- 	}