summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2013-01-18 14:50:41 +0000
committerLars Wendler <polynomial-c@gentoo.org>2013-01-18 14:50:41 +0000
commit0808cd68212a7426212dcaf989f396c750c6dc49 (patch)
tree558275cb7c87361d298f005b374e39113d9ed1a0 /net-libs/libpcap
parentMask USE="cman clvm" because cman and libdlm are not keyworded on this arch. (diff)
downloadhistorical-0808cd68212a7426212dcaf989f396c750c6dc49.tar.gz
historical-0808cd68212a7426212dcaf989f396c750c6dc49.tar.bz2
historical-0808cd68212a7426212dcaf989f396c750c6dc49.zip
Added a patch to fix libpcap on systems without ipv6 support (bug #452832)
Package-Manager: portage-2.2.0_alpha154/cvs/Linux x86_64 RepoMan-Options: --force Manifest-Sign-Key: 0x981CA6FC
Diffstat (limited to 'net-libs/libpcap')
-rw-r--r--net-libs/libpcap/ChangeLog13
-rw-r--r--net-libs/libpcap/Manifest21
-rw-r--r--net-libs/libpcap/files/libpcap-1.3.0-fix-systems-without-ipv6-support.patch522
-rw-r--r--net-libs/libpcap/libpcap-1.3.0-r1.ebuild (renamed from net-libs/libpcap/libpcap-1.3.0.ebuild)7
4 files changed, 553 insertions, 10 deletions
diff --git a/net-libs/libpcap/ChangeLog b/net-libs/libpcap/ChangeLog
index 210173aaba91..9bbb03472005 100644
--- a/net-libs/libpcap/ChangeLog
+++ b/net-libs/libpcap/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for net-libs/libpcap
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-libs/libpcap/ChangeLog,v 1.177 2012/09/30 16:26:28 armin76 Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-libs/libpcap/ChangeLog,v 1.178 2013/01/18 14:50:38 polynomial-c Exp $
+
+*libpcap-1.3.0-r1 (18 Jan 2013)
+
+ 18 Jan 2013; Lars Wendler <polynomial-c@gentoo.org> -libpcap-1.3.0.ebuild,
+ +libpcap-1.3.0-r1.ebuild,
+ +files/libpcap-1.3.0-fix-systems-without-ipv6-support.patch:
+ non-maintainer commit: Added a patch to fix libpcap on systems without ipv6
+ support with kind permission from zerochaos (bug #452832). Revbumped and
+ added straight to stable.
30 Sep 2012; Raúl Porcel <armin76@gentoo.org> libpcap-1.3.0.ebuild:
alpha/ia64/m68k/s390/sh/sparc stable wrt #433263
diff --git a/net-libs/libpcap/Manifest b/net-libs/libpcap/Manifest
index cb57bbfe5c1f..fc23f6f5cfff 100644
--- a/net-libs/libpcap/Manifest
+++ b/net-libs/libpcap/Manifest
@@ -5,16 +5,27 @@ AUX libpcap-1.1-cross-linux.patch 1050 SHA256 b1b6375abe00207c4ea69d0e7150eb2ed0
AUX libpcap-1.1.1-ignore-ENODEV.patch 1363 SHA256 1fa73b0ce9552352df0024af5172433fbdd3fb856b6aa53b90ceb8a31fded00c SHA512 3fb928ed0fead6a91585823d22fe3295ec190cd41671c62662c4a900ea077949a77b5df2bc7c1abb081117c78539ddfdc273bead5f9bc3228c258b27e759200e WHIRLPOOL ab67cd9f41a4b6e7185aece951daa70f3ba54582ea4339bfc12f45f94ca66be371500793c148c833a7e47812e3ac53c898118a3ecead929181542ac25ee04cb1
AUX libpcap-1.2.0-cross-linux.patch 583 SHA256 89344641676edfd9dc70b05569ac26a8ac79815fa5df0cf8e2ee77b3f9c5877f SHA512 4249129122f8ae382e086820ac4852d1413e3a7dd1f8db370aace1e94a1b0cf40d5f6d97213ca52e224e02472fed60b03c7f89d0ccd45e44ef0039a432595adb WHIRLPOOL 47598355e51ca3a15f1f817927aa73481c9a02ca15ca57ea487e1b42918a85b53aaa311be991dfc3362a2df3dd9ecee3059738e08760af8d6d9e4770578db3e3
AUX libpcap-1.3.0-canusb.patch 290 SHA256 3518dc59be25c3092df6e133694b4d4372552ff8d25e2371f3fc0f587de83054 SHA512 c3d6138d58c268fcf0799bf74c65ff648f2f7c6e46d3534d3941b9ae678510463388518db3b688ca85e89d79e31dedb147a8cbc9710b8ca0ca4a766913ba8fbf WHIRLPOOL 33225aa8eea3eb74b4d81c6746034d7cf88a0b2fad352888362cf87e565935b326b5a2aa6c4f857c21c44971a0b6b616e33130dd906511ef874e16b2872c8dd1
+AUX libpcap-1.3.0-fix-systems-without-ipv6-support.patch 13183 SHA256 14973d5dc09e036281cf507ca7fead8bf352e17dcb949a90942d58e5affda29c SHA512 cdf61a8dfe2cba0a8f3bf84a749c48eb3e75e634880f86acf7225793c921577137eca7579812c0c38a6e128cca58214d0eb614b11ec47d5f6d25d53557d49185 WHIRLPOOL 49c7ac019e969bb18f384e11b77b986417da5d2e4b5986624efe8e4555982c629a68705c1a72c0761552acd7523653ffde426fcc9bbd61aa15a44bb4a38a2417
DIST libpcap-1.1.1.tar.gz 581984 SHA256 508cca15547e55d1318498b838456a21770c450beb2dc7d7d4a96d90816e5a85 SHA512 eecdde95815575857a722176d6caf26b8e7cf6886435fa2a4bc652d83b54a1d0fcfa7f4f87075448e83874d6340619d722b49c139a61c37f2284d890789165ac WHIRLPOOL 86f49406b15bad8799302f7653b28da70dd00bbb1243d87e7843d6dd121f4bd729379d6178a2f463b78104202c852d83d772274cf999519bbb7ac9d95419af6e
DIST libpcap-1.3.0.tar.gz 608967 SHA256 41cbd9ed68383afd9f1fda279cb78427d36879d9e34ee707e31a16a1afd872b9 SHA512 c023abb3da7b9f62835fa04ca43b50203d7e3da7b624d09a693c8b02fd531c3845e1c86cbc587ae02816614133f5342585f6a2985fdaf92889fcfaca7bfb8908 WHIRLPOOL 774897ce4dcd1655945313a145399da9db0063967ce246e1c7beb21f038ee4c5bcfe2b4ec7b08316a013fdb33b50781f5195bf169a2ca6f84ddc2bf5bca78f15
EBUILD libpcap-1.1.1-r1.ebuild 1521 SHA256 93673c49162ba3723aa4217a01c6a890d28791311096a8161bd95c2e9532b764 SHA512 d0e60691f4fab29ce256ad53d4e30a05bcfc9aa934244b45ca3888fe19ca38a9084131d0bd6cf24572fd835c646b7446546a641791d6ca3cca25dc02db286a59 WHIRLPOOL 8ff93463ca08ff460d7a84b66666f58fa76efd32cecb6be61b875b5b17fc7d69e8a4d1ef6c7c9850f8a3d43c98242da1e9e19819d6286bda31e226795b2d46d5
-EBUILD libpcap-1.3.0.ebuild 1698 SHA256 ab0a17c12f068cfd3c9ff8a93c7e0b6867ba0ff677dc60a379ac71adf73d0ab9 SHA512 9b503d327509638852be2a26f60c850f20df1301b8bc2c723460c3819cdf96c30039bc7473cc22159c01730ef6ee85c4c365999576d3828ed6f7a95ce5eb356e WHIRLPOOL 5a6d1e891d71fff7b6cbc11f0795ea9d4195929cfcf0d846ade493cef7751c63fe45d87076c97185750f27c28e3cf7c0db634a757536c7cb98940422cc0c64f6
-MISC ChangeLog 24227 SHA256 c9e10cbf46183171da4fcfd8576e5d3d2e788e391d732753366f7f617fc221c1 SHA512 e4abf954b888cf3a4fa49b9edc9fc012f918d065dc26cb21a22695c01f02e40b1d473b1a4115d850629aadcc45013228f7d1d57080546c260d23f966bfb73184 WHIRLPOOL ce0a314f68da378ba5e092584e90f1bd8507bd374b38307f2e4e347c436803c54381fdf5f8fe6a3db1447eb9a09e62309e288fbbae37646f0209d78fa82dc269
+EBUILD libpcap-1.3.0-r1.ebuild 1767 SHA256 8e3f02a3d0c4995f27f0ed92d1d3a6c7fc64b147cd3db21260c735b2b2e2517f SHA512 bb9ead8d9154cb89ed40016001f4ae445daae22ccc720c258a8e5df9baa4955da51bc44f36770810fabc595863907930045e94da3f45ecfe747d8bc878a46f27 WHIRLPOOL 5738dd2bcbf474e93df1fab990d73741490d0b98600c00cb561d06056a49f4c488e5c67fa6cfa5b27a45d8a857a219bc7921e1a399dc422a12f35f9248eeef2c
+MISC ChangeLog 24615 SHA256 9e0ec0c9c41b2e108ce7e059435b9437513242139a108d4a0a52f81639d705e6 SHA512 6a927751692817004c9ce3dbbacad0df46cb28c14f5bd5ae7e4f04321472f2521d09893ab64d91af7b5355a700874d484e5969f4d69b0a7d6fa12220d65617ee WHIRLPOOL 6c20283df99a48e31042b0e2c241c44a151369a72c88379de7faab35a28b663f508d4c00dea22326a232a9c3a115d40405f19994267cc3ab24af22a3e224a6e4
MISC metadata.xml 527 SHA256 ae854bbce8236ebb2fa71609841d13824535ac9effc54bafd87935b7169c05df SHA512 71e2833754bc14961297bf0fbe11d747eb663f1bb735bd0d1354db729ee989f05f47dab4acf03380f6e1490cc49f473e755ce4bf3950d109a48d1f3714dc94c7 WHIRLPOOL c54582b13fe76a3344b2a5f8d13be9b2ef25c02afc26ca01293392ae80a8346c8a238c66e0e0c13a584c904cdbd1945979e8b2c6257f01fdd05742ef5d4b21fc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
-iEYEAREIAAYFAlBocrsACgkQuQc30/atMkAHYQCcCGsGvMpyRDrIglCmGAhqir5+
-GuUAnj8NYLOHJIpz6My27XhPioEQkxQn
-=oNQv
+iQIcBAEBCAAGBQJQ+WE/AAoJEPiazRVxLXTFxdIQAL5UsEO9xBw2iIt6OFYSAfNR
+DXA1h5wJCP6qGZ25/hBes+I6OzRq9+yjR26rGrMLgiqjrDJvtwCPiaIzNOiUgzhF
+kzjLPPdPm9zRB2iOcd+fNhXruhpkUWd3dIUQjhyBbrIz+zWpNkVXoT+qdZ7COsGW
+48hLS+vTyV4PbZnuetusvALsBwB7NhY6qts1vKwaKPeXJuonSrZCcS07GThDk2/c
+VC+q9oQA7wxWiRwNzOWaKaX3w58PQR8IAAiGuPprjcrxQuCLpFmi+4s7gdorB9Dm
+Lam1i6ibDd+haTZCu0fcIPG6u+bQN0d6M6We/+3qMZWy1ya7uPvVXTKgRioJrCqo
+e5t/PFUM1XJMUvobQRKK24votX2kh3nc5UWqp9lgqvwRoN+xm+5z9d31L8fvcL23
+rbo1l7nRo+J26E0BR+Ac+md4LXsk94eE14QwGs8pxVRAGFzaEV7Nt+LYifNgJE4C
+2r+BQAl/8JWxgZOLUML1aSoVe0Z8iH1Vcj7RMiu5yHD8tOBnuUvm8vu/PcC5pQMO
+W+bBwwx1BC7jHFIrHoxVNIxiUPK9sUXp02QowJJh5vBttFU+X5drxjWwJGwG1DLR
+Z2XmvMfCRC2jd8hvgLsMqn8UNoPtEYPNgk7dcsgDl+PLBAdQV6tFjzhe9BzZ65fO
+OtrHEFXwy2BjIlK2Af5n
+=uxBj
-----END PGP SIGNATURE-----
diff --git a/net-libs/libpcap/files/libpcap-1.3.0-fix-systems-without-ipv6-support.patch b/net-libs/libpcap/files/libpcap-1.3.0-fix-systems-without-ipv6-support.patch
new file mode 100644
index 000000000000..c7b8dd764e6a
--- /dev/null
+++ b/net-libs/libpcap/files/libpcap-1.3.0-fix-systems-without-ipv6-support.patch
@@ -0,0 +1,522 @@
+From 2ae11347945ebd5bcff0c81c4305c03309918530 Mon Sep 17 00:00:00 2001
+From: Guy Harris <guy@alum.mit.edu>
+Date: Thu, 27 Sep 2012 19:34:11 -0700
+Subject: [PATCH] Support what IPv6 stuff we can without IPv6 address resolution support.
+
+Make the INET6-only code just be code that depends on having
+getaddrinfo(), as per a complaint that, on a machine that either doesn't
+have getaddrinfo() or doesn't have INET6 enabled, a filter
+
+ dst host 127.0.0.1 and (icmp or icmp6 or ((tcp or udp or sctp) and (src
+ host 127.0.0.1)))
+
+Not having a full IPv6 stack shouldn't keep you from, for example,
+having a filter that just checks the packet type field for IPv6 or that
+looks at the protocol field in the IPv6 header. You can't check for
+IPv6 *hosts* (although we could perhaps allow them to be specified
+numerically).
+---
+ gencode.c | 89 ++++-----------------------------------------------------------
+ scanner.l | 16 ++----------
+ 2 files changed, 7 insertions(+), 98 deletions(-)
+
+diff --git a/gencode.c b/gencode.c
+index 0010df5..85e2e8e 100644
+--- a/gencode.c
++++ b/gencode.c
+@@ -240,9 +240,7 @@ static struct block *gen_linktype(int);
+ static struct block *gen_snap(bpf_u_int32, bpf_u_int32);
+ static struct block *gen_llc_linktype(int);
+ static struct block *gen_hostop(bpf_u_int32, bpf_u_int32, int, int, u_int, u_int);
+-#ifdef INET6
+ static struct block *gen_hostop6(struct in6_addr *, struct in6_addr *, int, int, u_int, u_int);
+-#endif
+ static struct block *gen_ahostop(const u_char *, int);
+ static struct block *gen_ehostop(const u_char *, int);
+ static struct block *gen_fhostop(const u_char *, int);
+@@ -252,29 +250,23 @@ static struct block *gen_ipfchostop(const u_char *, int);
+ static struct block *gen_dnhostop(bpf_u_int32, int);
+ static struct block *gen_mpls_linktype(int);
+ static struct block *gen_host(bpf_u_int32, bpf_u_int32, int, int, int);
+-#ifdef INET6
+ static struct block *gen_host6(struct in6_addr *, struct in6_addr *, int, int, int);
+-#endif
+ #ifndef INET6
+ static struct block *gen_gateway(const u_char *, bpf_u_int32 **, int, int);
+ #endif
+ static struct block *gen_ipfrag(void);
+ static struct block *gen_portatom(int, bpf_int32);
+ static struct block *gen_portrangeatom(int, bpf_int32, bpf_int32);
+-#ifdef INET6
+ static struct block *gen_portatom6(int, bpf_int32);
+ static struct block *gen_portrangeatom6(int, bpf_int32, bpf_int32);
+-#endif
+ struct block *gen_portop(int, int, int);
+ static struct block *gen_port(int, int, int);
+ struct block *gen_portrangeop(int, int, int, int);
+ static struct block *gen_portrange(int, int, int, int);
+-#ifdef INET6
+ struct block *gen_portop6(int, int, int);
+ static struct block *gen_port6(int, int, int);
+ struct block *gen_portrangeop6(int, int, int, int);
+ static struct block *gen_portrange6(int, int, int, int);
+-#endif
+ static int lookup_proto(const char *, int);
+ static struct block *gen_protochain(int, int, int);
+ static struct block *gen_proto(int, int, int);
+@@ -2841,11 +2833,9 @@ ethertype_to_ppptype(proto)
+ proto = PPP_IP;
+ break;
+
+-#ifdef INET6
+ case ETHERTYPE_IPV6:
+ proto = PPP_IPV6;
+ break;
+-#endif
+
+ case ETHERTYPE_DN:
+ proto = PPP_DECNET;
+@@ -3053,11 +3043,10 @@ gen_linktype(proto)
+ case ETHERTYPE_IP:
+ /* Check for a version number of 4. */
+ return gen_mcmp(OR_LINK, 0, BPF_B, 0x40, 0xF0);
+-#ifdef INET6
++
+ case ETHERTYPE_IPV6:
+ /* Check for a version number of 6. */
+ return gen_mcmp(OR_LINK, 0, BPF_B, 0x60, 0xF0);
+-#endif
+
+ default:
+ return gen_false(); /* always false */
+@@ -3081,10 +3070,8 @@ gen_linktype(proto)
+ /*
+ * Raw IPv6, so no type field.
+ */
+-#ifdef INET6
+ if (proto == ETHERTYPE_IPV6)
+ return gen_true(); /* always true */
+-#endif
+
+ /* Checking for something other than IPv6; always false */
+ return gen_false();
+@@ -3206,11 +3193,9 @@ gen_linktype(proto)
+ if (proto == ETHERTYPE_IP)
+ return (gen_cmp(OR_LINK, offsetof(struct pfloghdr, af),
+ BPF_B, (bpf_int32)AF_INET));
+-#ifdef INET6
+ else if (proto == ETHERTYPE_IPV6)
+ return (gen_cmp(OR_LINK, offsetof(struct pfloghdr, af),
+ BPF_B, (bpf_int32)AF_INET6));
+-#endif /* INET6 */
+ else
+ return gen_false();
+ /*NOTREACHED*/
+@@ -3228,11 +3213,9 @@ gen_linktype(proto)
+ default:
+ return gen_false();
+
+-#ifdef INET6
+ case ETHERTYPE_IPV6:
+ return (gen_cmp(OR_LINK, off_linktype, BPF_B,
+ (bpf_int32)ARCTYPE_INET6));
+-#endif /* INET6 */
+
+ case ETHERTYPE_IP:
+ b0 = gen_cmp(OR_LINK, off_linktype, BPF_B,
+@@ -3284,13 +3267,11 @@ gen_linktype(proto)
+ */
+ return gen_cmp(OR_LINK, 2, BPF_H, (0x03<<8) | 0xcc);
+
+-#ifdef INET6
+ case ETHERTYPE_IPV6:
+ /*
+ * Check for the special NLPID for IPv6.
+ */
+ return gen_cmp(OR_LINK, 2, BPF_H, (0x03<<8) | 0x8e);
+-#endif
+
+ case LLCSAP_ISONS:
+ /*
+@@ -3585,7 +3566,6 @@ gen_hostop(addr, mask, dir, proto, src_off, dst_off)
+ return b1;
+ }
+
+-#ifdef INET6
+ static struct block *
+ gen_hostop6(addr, mask, dir, proto, src_off, dst_off)
+ struct in6_addr *addr;
+@@ -3637,7 +3617,6 @@ gen_hostop6(addr, mask, dir, proto, src_off, dst_off)
+ gen_and(b0, b1);
+ return b1;
+ }
+-#endif /*INET6*/
+
+ static struct block *
+ gen_ehostop(eaddr, dir)
+@@ -4515,13 +4494,11 @@ gen_host(addr, mask, proto, dir, type)
+ case Q_MOPRC:
+ bpf_error("MOPRC host filtering not implemented");
+
+-#ifdef INET6
+ case Q_IPV6:
+ bpf_error("'ip6' modifier applied to ip host");
+
+ case Q_ICMPV6:
+ bpf_error("'icmp6' modifier applied to %s", typestr);
+-#endif /* INET6 */
+
+ case Q_AH:
+ bpf_error("'ah' modifier applied to %s", typestr);
+@@ -4559,7 +4536,6 @@ gen_host(addr, mask, proto, dir, type)
+ /* NOTREACHED */
+ }
+
+-#ifdef INET6
+ static struct block *
+ gen_host6(addr, mask, proto, dir, type)
+ struct in6_addr *addr;
+@@ -4678,7 +4654,6 @@ gen_host6(addr, mask, proto, dir, type)
+ }
+ /* NOTREACHED */
+ }
+-#endif /*INET6*/
+
+ #ifndef INET6
+ static struct block *
+@@ -4770,26 +4745,20 @@ gen_proto_abbrev(proto)
+
+ case Q_SCTP:
+ b1 = gen_proto(IPPROTO_SCTP, Q_IP, Q_DEFAULT);
+-#ifdef INET6
+ b0 = gen_proto(IPPROTO_SCTP, Q_IPV6, Q_DEFAULT);
+ gen_or(b0, b1);
+-#endif
+ break;
+
+ case Q_TCP:
+ b1 = gen_proto(IPPROTO_TCP, Q_IP, Q_DEFAULT);
+-#ifdef INET6
+ b0 = gen_proto(IPPROTO_TCP, Q_IPV6, Q_DEFAULT);
+ gen_or(b0, b1);
+-#endif
+ break;
+
+ case Q_UDP:
+ b1 = gen_proto(IPPROTO_UDP, Q_IP, Q_DEFAULT);
+-#ifdef INET6
+ b0 = gen_proto(IPPROTO_UDP, Q_IPV6, Q_DEFAULT);
+ gen_or(b0, b1);
+-#endif
+ break;
+
+ case Q_ICMP:
+@@ -4817,10 +4786,8 @@ gen_proto_abbrev(proto)
+
+ case Q_PIM:
+ b1 = gen_proto(IPPROTO_PIM, Q_IP, Q_DEFAULT);
+-#ifdef INET6
+ b0 = gen_proto(IPPROTO_PIM, Q_IPV6, Q_DEFAULT);
+ gen_or(b0, b1);
+-#endif
+ break;
+
+ #ifndef IPPROTO_VRRP
+@@ -4882,7 +4849,6 @@ gen_proto_abbrev(proto)
+ b1 = gen_linktype(ETHERTYPE_MOPRC);
+ break;
+
+-#ifdef INET6
+ case Q_IPV6:
+ b1 = gen_linktype(ETHERTYPE_IPV6);
+ break;
+@@ -4893,17 +4859,14 @@ gen_proto_abbrev(proto)
+ case Q_ICMPV6:
+ b1 = gen_proto(IPPROTO_ICMPV6, Q_IPV6, Q_DEFAULT);
+ break;
+-#endif /* INET6 */
+
+ #ifndef IPPROTO_AH
+ #define IPPROTO_AH 51
+ #endif
+ case Q_AH:
+ b1 = gen_proto(IPPROTO_AH, Q_IP, Q_DEFAULT);
+-#ifdef INET6
+ b0 = gen_proto(IPPROTO_AH, Q_IPV6, Q_DEFAULT);
+ gen_or(b0, b1);
+-#endif
+ break;
+
+ #ifndef IPPROTO_ESP
+@@ -4911,10 +4874,8 @@ gen_proto_abbrev(proto)
+ #endif
+ case Q_ESP:
+ b1 = gen_proto(IPPROTO_ESP, Q_IP, Q_DEFAULT);
+-#ifdef INET6
+ b0 = gen_proto(IPPROTO_ESP, Q_IPV6, Q_DEFAULT);
+ gen_or(b0, b1);
+-#endif
+ break;
+
+ case Q_ISO:
+@@ -5047,7 +5008,6 @@ gen_portatom(off, v)
+ return gen_cmp(OR_TRAN_IPV4, off, BPF_H, v);
+ }
+
+-#ifdef INET6
+ static struct block *
+ gen_portatom6(off, v)
+ int off;
+@@ -5055,7 +5015,6 @@ gen_portatom6(off, v)
+ {
+ return gen_cmp(OR_TRAN_IPV6, off, BPF_H, v);
+ }
+-#endif/*INET6*/
+
+ struct block *
+ gen_portop(port, proto, dir)
+@@ -5147,7 +5106,6 @@ gen_port(port, ip_proto, dir)
+ return b1;
+ }
+
+-#ifdef INET6
+ struct block *
+ gen_portop6(port, proto, dir)
+ int port, proto, dir;
+@@ -5220,7 +5178,6 @@ gen_port6(port, ip_proto, dir)
+ gen_and(b0, b1);
+ return b1;
+ }
+-#endif /* INET6 */
+
+ /* gen_portrange code */
+ static struct block *
+@@ -5325,7 +5282,6 @@ gen_portrange(port1, port2, ip_proto, dir)
+ return b1;
+ }
+
+-#ifdef INET6
+ static struct block *
+ gen_portrangeatom6(off, v1, v2)
+ int off;
+@@ -5426,7 +5382,6 @@ gen_portrange6(port1, port2, ip_proto, dir)
+ gen_and(b0, b1);
+ return b1;
+ }
+-#endif /* INET6 */
+
+ static int
+ lookup_proto(name, proto)
+@@ -5561,7 +5516,7 @@ gen_protochain(v, proto, dir)
+ s[i]->s.k = off_macpl + off_nl;
+ i++;
+ break;
+-#ifdef INET6
++
+ case Q_IPV6:
+ b0 = gen_linktype(ETHERTYPE_IPV6);
+
+@@ -5574,7 +5529,7 @@ gen_protochain(v, proto, dir)
+ s[i]->s.k = 40;
+ i++;
+ break;
+-#endif
++
+ default:
+ bpf_error("unsupported proto to gen_protochain");
+ /*NOTREACHED*/
+@@ -5601,7 +5556,6 @@ gen_protochain(v, proto, dir)
+ fix2 = i;
+ i++;
+
+-#ifdef INET6
+ if (proto == Q_IPV6) {
+ int v6start, v6end, v6advance, j;
+
+@@ -5683,9 +5637,7 @@ gen_protochain(v, proto, dir)
+ /* fixup */
+ for (j = v6start; j <= v6end; j++)
+ s[j]->s.jt = s[v6advance];
+- } else
+-#endif
+- {
++ } else {
+ /* nop */
+ s[i] = new_stmt(BPF_ALU|BPF_ADD|BPF_K);
+ s[i]->s.k = 0;
+@@ -5829,25 +5781,20 @@ gen_proto(v, proto, dir)
+ int dir;
+ {
+ struct block *b0, *b1;
+-#ifdef INET6
+ #ifndef CHASE_CHAIN
+ struct block *b2;
+ #endif
+-#endif
+
+ if (dir != Q_DEFAULT)
+ bpf_error("direction applied to 'proto'");
+
+ switch (proto) {
+ case Q_DEFAULT:
+-#ifdef INET6
+ b0 = gen_proto(v, Q_IP, dir);
+ b1 = gen_proto(v, Q_IPV6, dir);
+ gen_or(b0, b1);
+ return b1;
+-#else
+- /*FALLTHROUGH*/
+-#endif
++
+ case Q_IP:
+ /*
+ * For FDDI, RFC 1188 says that SNAP encapsulation is used,
+@@ -5998,7 +5945,6 @@ gen_proto(v, proto, dir)
+ bpf_error("'carp proto' is bogus");
+ /* NOTREACHED */
+
+-#ifdef INET6
+ case Q_IPV6:
+ b0 = gen_linktype(ETHERTYPE_IPV6);
+ #ifndef CHASE_CHAIN
+@@ -6019,7 +5965,6 @@ gen_proto(v, proto, dir)
+
+ case Q_ICMPV6:
+ bpf_error("'icmp6 proto' is bogus");
+-#endif /* INET6 */
+
+ case Q_AH:
+ bpf_error("'ah proto' is bogus");
+@@ -6276,13 +6221,9 @@ gen_scode(name, q)
+ bpf_error("illegal port number %d < 0", port);
+ if (port > 65535)
+ bpf_error("illegal port number %d > 65535", port);
+-#ifndef INET6
+- return gen_port(port, real_proto, dir);
+-#else
+ b = gen_port(port, real_proto, dir);
+ gen_or(gen_port6(port, real_proto, dir), b);
+ return b;
+-#endif /* INET6 */
+
+ case Q_PORTRANGE:
+ if (proto != Q_DEFAULT &&
+@@ -6326,13 +6267,9 @@ gen_scode(name, q)
+ if (port2 > 65535)
+ bpf_error("illegal port number %d > 65535", port2);
+
+-#ifndef INET6
+- return gen_portrange(port1, port2, real_proto, dir);
+-#else
+ b = gen_portrange(port1, port2, real_proto, dir);
+ gen_or(gen_portrange6(port1, port2, real_proto, dir), b);
+ return b;
+-#endif /* INET6 */
+
+ case Q_GATEWAY:
+ #ifndef INET6
+@@ -6480,16 +6417,12 @@ gen_ncode(s, v, q)
+ if (v > 65535)
+ bpf_error("illegal port number %u > 65535", v);
+
+-#ifndef INET6
+- return gen_port((int)v, proto, dir);
+-#else
+ {
+ struct block *b;
+ b = gen_port((int)v, proto, dir);
+ gen_or(gen_port6((int)v, proto, dir), b);
+ return b;
+ }
+-#endif /* INET6 */
+
+ case Q_PORTRANGE:
+ if (proto == Q_UDP)
+@@ -6506,16 +6439,12 @@ gen_ncode(s, v, q)
+ if (v > 65535)
+ bpf_error("illegal port number %u > 65535", v);
+
+-#ifndef INET6
+- return gen_portrange((int)v, (int)v, proto, dir);
+-#else
+ {
+ struct block *b;
+ b = gen_portrange((int)v, (int)v, proto, dir);
+ gen_or(gen_portrange6((int)v, (int)v, proto, dir), b);
+ return b;
+ }
+-#endif /* INET6 */
+
+ case Q_GATEWAY:
+ bpf_error("'gateway' requires a name");
+@@ -6805,9 +6734,7 @@ gen_load(proto, inst, size)
+ case Q_LAT:
+ case Q_MOPRC:
+ case Q_MOPDL:
+-#ifdef INET6
+ case Q_IPV6:
+-#endif
+ /*
+ * The offset is relative to the beginning of
+ * the network-layer header.
+@@ -6916,16 +6843,12 @@ gen_load(proto, inst, size)
+ gen_and(gen_proto_abbrev(proto), b = gen_ipfrag());
+ if (inst->b)
+ gen_and(inst->b, b);
+-#ifdef INET6
+ gen_and(gen_proto_abbrev(Q_IP), b);
+-#endif
+ inst->b = b;
+ break;
+-#ifdef INET6
+ case Q_ICMPV6:
+ bpf_error("IPv6 upper-layer protocol is not supported by proto[x]");
+ /*NOTREACHED*/
+-#endif
+ }
+ inst->regno = regno;
+ s = new_stmt(BPF_ST);
+@@ -7477,13 +7400,11 @@ gen_multicast(proto)
+ gen_and(b0, b1);
+ return b1;
+
+-#ifdef INET6
+ case Q_IPV6:
+ b0 = gen_linktype(ETHERTYPE_IPV6);
+ b1 = gen_cmp(OR_NET, 24, BPF_B, (bpf_int32)255);
+ gen_and(b0, b1);
+ return b1;
+-#endif /* INET6 */
+ }
+ bpf_error("link-layer multicast filters supported only on ethernet/FDDI/token ring/ARCNET/802.11/ATM LANE/Fibre Channel");
+ /* NOTREACHED */
+diff --git a/scanner.l b/scanner.l
+index 064e9c8..10ffbcd 100644
+--- a/scanner.l
++++ b/scanner.l
+@@ -206,20 +206,8 @@ vrrp return VRRP;
+ carp return CARP;
+ radio return RADIO;
+
+-ip6 {
+-#ifdef INET6
+- return IPV6;
+-#else
+- bpf_error("%s not supported", yytext);
+-#endif
+- }
+-icmp6 {
+-#ifdef INET6
+- return ICMPV6;
+-#else
+- bpf_error("%s not supported", yytext);
+-#endif
+- }
++ip6 return IPV6;
++icmp6 return ICMPV6;
+ ah return AH;
+ esp return ESP;
+
+--
+1.8.1.1
+
diff --git a/net-libs/libpcap/libpcap-1.3.0.ebuild b/net-libs/libpcap/libpcap-1.3.0-r1.ebuild
index a186aaa3cf18..8df0c4e029e6 100644
--- a/net-libs/libpcap/libpcap-1.3.0.ebuild
+++ b/net-libs/libpcap/libpcap-1.3.0-r1.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-libs/libpcap/libpcap-1.3.0.ebuild,v 1.10 2012/09/30 16:26:28 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-libs/libpcap/libpcap-1.3.0-r1.ebuild,v 1.1 2013/01/18 14:50:38 polynomial-c Exp $
EAPI=4
inherit autotools eutils
@@ -27,7 +27,8 @@ DOCS=( CREDITS CHANGES VERSION TODO README{,.dag,.linux,.macosx,.septel} )
src_prepare() {
epatch \
"${FILESDIR}"/${PN}-1.2.0-cross-linux.patch \
- "${FILESDIR}"/${PN}-1.3.0-canusb.patch
+ "${FILESDIR}"/${PN}-1.3.0-canusb.patch \
+ "${FILESDIR}"/${P}-fix-systems-without-ipv6-support.patch
# Prefix' Solaris uses GNU ld
sed -i -e 's/freebsd\*/freebsd*|solaris*/' \
-e 's/sparc64\*/sparc64*|sparcv9*/' aclocal.m4 || die