PSARC 2011/399 Update libnet to 1.1.5
6776222 libnet is not IPv6 capable
7122666 libnet should be updated to version 1.1.5
--- a/components/libnet/Makefile Wed Jan 11 06:57:58 2012 -0800
+++ b/components/libnet/Makefile Wed Jan 11 11:05:09 2012 -0800
@@ -20,18 +20,18 @@
#
#
-# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
#
include ../../make-rules/shared-macros.mk
COMPONENT_NAME= libnet
-COMPONENT_VERSION= 1.1.2.1
+COMPONENT_VERSION= 1.1.5
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
-COMPONENT_PROJECT_URL= http://packetfactory.openwall.net/projects/libnet/
+COMPONENT_PROJECT_URL= http://sourceforge.net/projects/libnet-dev/
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
-COMPONENT_ARCHIVE_HASH= sha1:9dca91ee0f19b1b9e5e60baaedb9bc44a30a1fc7
-COMPONENT_ARCHIVE_URL= http://www.packetfactory.net/libnet/dist/deprecated/$(COMPONENT_ARCHIVE)
+COMPONENT_ARCHIVE_HASH= sha1:a2271762a7d6505c1ff6c4c048bf802e643b6790
+COMPONENT_ARCHIVE_URL= http://cdnetworks-us-2.dl.sourceforge.net/project/libnet-dev/$(COMPONENT_ARCHIVE)
include ../../make-rules/prep.mk
include ../../make-rules/configure.mk
--- a/components/libnet/libnet.p5m Wed Jan 11 06:57:58 2012 -0800
+++ b/components/libnet/libnet.p5m Wed Jan 11 11:05:09 2012 -0800
@@ -18,7 +18,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
#
<transform file path=usr.*/man/.+ -> default mangler.man.stability uncommitted>
@@ -31,7 +31,7 @@
set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
set name=org.opensolaris.arc-caseid \
- value=PSARC/2008/409
+ value=PSARC/2011/399
set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
license libnet.license license='BSD'
@@ -52,7 +52,6 @@
file $(MACH32)/libnet-config path=usr/bin/libnet-config
file $(MACH64)/libnet-config path=usr/bin/$(MACH64)/libnet-config
-file path=usr/demo/libnet/arp-new.c
file path=usr/demo/libnet/arp.c
file path=usr/demo/libnet/bgp4_hdr.c
file path=usr/demo/libnet/bgp4_notification.c
@@ -66,12 +65,14 @@
file path=usr/demo/libnet/fddi_tcp2.c
file path=usr/demo/libnet/get_addr.c
file path=usr/demo/libnet/gre.c
+file path=usr/demo/libnet/hsrp.c
file path=usr/demo/libnet/icmp_echo_cq.c
file path=usr/demo/libnet/icmp_redirect.c
file path=usr/demo/libnet/icmp_timeexceed.c
file path=usr/demo/libnet/icmp_timestamp.c
file path=usr/demo/libnet/icmp_unreach.c
file path=usr/demo/libnet/icmp6_echoreq.c
+file path=usr/demo/libnet/icmp6_unreach.c
file path=usr/demo/libnet/ieee.c
file path=usr/demo/libnet/ip_link.c
file path=usr/demo/libnet/ip_raw.c
@@ -91,12 +92,14 @@
file path=usr/demo/libnet/synflood6.c
file path=usr/demo/libnet/tcp1.c
file path=usr/demo/libnet/tcp2.c
+file path=usr/demo/libnet/test_ipv4_options.c
+file path=usr/demo/libnet/test_ipv4.c
+file path=usr/demo/libnet/test_ipv6_icmpv4.c
file path=usr/demo/libnet/tftp.c
file path=usr/demo/libnet/tring_tcp1.c
file path=usr/demo/libnet/tring_tcp2.c
file path=usr/demo/libnet/udp1.c
file path=usr/demo/libnet/udp2.c
-file path=usr/demo/libnet/win32/getopt.c
file path=usr/include/libnet.h
file path=usr/include/libnet/libnet-asn1.h
file path=usr/include/libnet/libnet-functions.h
@@ -104,13 +107,12 @@
file path=usr/include/libnet/libnet-macros.h
file path=usr/include/libnet/libnet-structures.h
file path=usr/include/libnet/libnet-types.h
-file usr/lib/$(MACH64)/libnet.so path=usr/lib/$(MACH64)/libnet.so.1.1.2.1
-file usr/lib/libnet.so path=usr/lib/libnet.so.1.1.2.1
+file usr/lib/$(MACH64)/libnet.so path=usr/lib/$(MACH64)/libnet.so.1.6.0
+file usr/lib/libnet.so path=usr/lib/libnet.so.1.6.0
file libnet-functions.h.3 path=usr/share/man/man3/libnet-functions.h.3
-file libnet-headers.h.3 path=usr/share/man/man3/libnet-headers.h.3
file libnet-macros.h.3 path=usr/share/man/man3/libnet-macros.h.3
file libnet.h.3 path=usr/share/man/man3/libnet.h.3
-file libnet_802_1q_hdr.3 path=usr/share/man/man3/libnet_802_1q_hdr.3
-file libnet_802_1x_hdr.3 path=usr/share/man/man3/libnet_802_1x_hdr.3
-link path=usr/lib/$(MACH64)/libnet.so target=libnet.so.1.1.2.1
-link path=usr/lib/libnet.so target=libnet.so.1.1.2.1
+link path=usr/lib/$(MACH64)/libnet.so target=libnet.so.1.6.0
+link path=usr/lib/$(MACH64)/libnet.so.1 target=libnet.so.1.6.0
+link path=usr/lib/libnet.so target=libnet.so.1.6.0
+link path=usr/lib/libnet.so.1 target=libnet.so.1.6.0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/libnet/patches/configure.patch Wed Jan 11 11:05:09 2012 -0800
@@ -0,0 +1,16 @@
+--- libnet-1.1.5/configure.orig Sat Dec 17 16:17:23 2011
++++ libnet-1.1.5/configure Sat Dec 17 16:18:25 2011
[email protected]@ -21763,6 +21763,13 @@
+
+ ;;
+
++ 5.10|5.11)
++cat >>confdefs.h <<\_ACEOF
++#define HAVE_SOLARIS_IPV6 1
++_ACEOF
++
++ ;;
++
+ esac
+
+ ADDITIONAL_LIBS='-lresolv -lsocket -lnsl'
--- a/components/libnet/patches/libnet-types.h.patch Wed Jan 11 06:57:58 2012 -0800
+++ b/components/libnet/patches/libnet-types.h.patch Wed Jan 11 11:05:09 2012 -0800
@@ -1,12 +1,19 @@
---- libnet-1.1.2.1/include/libnet/libnet-types.h.orig Wed Dec 14 08:56:37 2011
-+++ libnet-1.1.2.1/include/libnet/libnet-types.h Wed Dec 14 10:39:57 2011
[email protected]@ -33,7 +33,8 @@
+--- libnet-1.1.5/include/libnet/libnet-types.h.orig Sat Dec 17 16:12:12 2011
++++ libnet-1.1.5/include/libnet/libnet-types.h Sat Dec 17 16:12:36 2011
[email protected]@ -32,8 +32,14 @@
+ #ifndef __LIBNET_TYPES_H
#define __LIBNET_TYPES_H
- /* Solaris has messed up POSIX nomenclature for these */
--#if (__sun__ && __svr4__)
+-/* libnet should be using the standard type names, so mapping standard
+- * to non-standard should not be necessary. */
++/* Solaris has messed up POSIX nomenclature for these */
+#ifndef __BIT_TYPES_DEFINED__
+#define __BIT_TYPES_DEFINED__
- typedef uint8_t u_int8_t;
- typedef uint16_t u_int16_t;
- typedef uint32_t u_int32_t;
++typedef uint8_t u_int8_t;
++typedef uint16_t u_int16_t;
++typedef uint32_t u_int32_t;
++typedef uint64_t u_int64_t;
++#endif
+
+ #endif /* __LIBNET_TYPES_H */
+
--- a/components/libnet/patches/makefile.in.patch Wed Jan 11 06:57:58 2012 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
---- libnet-1.1.2.1/src/Makefile.in.orig Thu Jul 14 14:55:19 2011
-+++ libnet-1.1.2.1/src/Makefile.in Thu Jul 14 14:55:34 2011
[email protected]@ -109,7 +109,7 @@
-
- DISTCLEANFILES = *~
-
--lib_LIBRARIES = libnet.a
-+lib_LIBRARIES = libnet.a libnet.so
-
- libnet_a_SOURCES = libnet_asn1.c \
- libnet_build_802.1q.c \
[email protected]@ -163,7 +163,7 @@
- libnet_link_dlpi.c \
- libnet_link_linux.c \
- libnet_link_nit.c \
-- libnet_link_none.c \
-+ libnet_link_none.c \
- libnet_link_pf.c \
- libnet_link_snit.c \
- libnet_link_snoop.c \
[email protected]@ -269,6 +269,10 @@
- $(libnet_a_AR) libnet.a $(libnet_a_OBJECTS) $(libnet_a_LIBADD)
- $(RANLIB) libnet.a
-
-+libnet.so: $(libnet_a_OBJECTS) $(libnet_a_DEPENDENCIES)
-+ -rm -f libnet.so
-+ $(CC) $(CFLAGS) -shared -o libnet.so $(libnet_a_OBJECTS) $(libnet_a_LIBADD) -Wl,-soname=libnet.so
-+
- mostlyclean-compile:
- -rm -f *.$(OBJEXT) core *.core
-
[email protected]@ -379,6 +383,9 @@
-
- clean-am: clean-generic clean-libLIBRARIES mostlyclean-am
-
-+clean-obj:
-+ rm -f *.o
-+
- distclean: distclean-am
-
- distclean-am: clean-am distclean-compile distclean-generic \