1 |
commit: e2c5f5be51b7e3144c853d05d2bd055be0074afa |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Feb 17 14:15:34 2019 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Feb 17 14:17:54 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2c5f5be |
7 |
|
8 |
net-analyzer/fragroute: Fix pcap_open clash |
9 |
|
10 |
Package-Manager: Portage-2.3.60, Repoman-2.3.12 |
11 |
Fixes: https://bugs.gentoo.org/662474 |
12 |
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org> |
13 |
|
14 |
.../files/fragroute-1.2.6-pcap_open.patch | 44 ++++++++++++++++++++ |
15 |
net-analyzer/fragroute/fragroute-1.2.6-r1.ebuild | 47 ++++++++++++++++++++++ |
16 |
2 files changed, 91 insertions(+) |
17 |
|
18 |
diff --git a/net-analyzer/fragroute/files/fragroute-1.2.6-pcap_open.patch b/net-analyzer/fragroute/files/fragroute-1.2.6-pcap_open.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..6dedb535d3b |
21 |
--- /dev/null |
22 |
+++ b/net-analyzer/fragroute/files/fragroute-1.2.6-pcap_open.patch |
23 |
@@ -0,0 +1,44 @@ |
24 |
+--- a/fragtest.c |
25 |
++++ b/fragtest.c |
26 |
+@@ -458,7 +458,7 @@ |
27 |
+ if ((ctx.ip = ip_open()) == NULL) |
28 |
+ err(1, "couldn't open raw IP interface"); |
29 |
+ |
30 |
+- if ((ctx.pcap = pcap_open(ifent.intf_name)) == NULL) |
31 |
++ if ((ctx.pcap = fragroute_pcap_open(ifent.intf_name)) == NULL) |
32 |
+ err(1, "couldn't open %s for sniffing", ifent.intf_name); |
33 |
+ |
34 |
+ if ((ctx.dloff = pcap_dloff(ctx.pcap)) < 0) |
35 |
+--- a/tun-loop.c |
36 |
++++ b/tun-loop.c |
37 |
+@@ -331,7 +331,7 @@ |
38 |
+ return (tun_close(tun)); |
39 |
+ |
40 |
+ /* Set up to sniff on loopback. */ |
41 |
+- if ((tun->pcap = pcap_open(tun->ifent->intf_name)) == NULL) |
42 |
++ if ((tun->pcap = fragroute_pcap_open(tun->ifent->intf_name)) == NULL) |
43 |
+ return (tun_close(tun)); |
44 |
+ |
45 |
+ if (pcap_filter(tun->pcap, "ip dst %s", addr_ntoa(dst)) < 0) |
46 |
+--- a/pcaputil.c |
47 |
++++ b/pcaputil.c |
48 |
+@@ -27,7 +27,7 @@ |
49 |
+ #include "pcaputil.h" |
50 |
+ |
51 |
+ pcap_t * |
52 |
+-pcap_open(char *device) |
53 |
++fragroute_pcap_open(char *device) |
54 |
+ { |
55 |
+ char ebuf[PCAP_ERRBUF_SIZE]; |
56 |
+ pcap_t *pcap; |
57 |
+--- a/pcaputil.h |
58 |
++++ b/pcaputil.h |
59 |
+@@ -9,7 +9,7 @@ |
60 |
+ #ifndef PCAPUTIL_H |
61 |
+ #define PCAPUTIL_H |
62 |
+ |
63 |
+-pcap_t *pcap_open(char *device); |
64 |
++pcap_t *fragroute_pcap_open(char *device); |
65 |
+ int pcap_dloff(pcap_t *pcap); |
66 |
+ int pcap_filter(pcap_t *pcap, const char *fmt, ...); |
67 |
+ |
68 |
|
69 |
diff --git a/net-analyzer/fragroute/fragroute-1.2.6-r1.ebuild b/net-analyzer/fragroute/fragroute-1.2.6-r1.ebuild |
70 |
new file mode 100644 |
71 |
index 00000000000..d432afe4d5b |
72 |
--- /dev/null |
73 |
+++ b/net-analyzer/fragroute/fragroute-1.2.6-r1.ebuild |
74 |
@@ -0,0 +1,47 @@ |
75 |
+# Copyright 1999-2019 Gentoo Authors |
76 |
+# Distributed under the terms of the GNU General Public License v2 |
77 |
+ |
78 |
+EAPI=7 |
79 |
+ |
80 |
+MY_P="${P}-ipv6" |
81 |
+ |
82 |
+inherit autotools |
83 |
+ |
84 |
+DESCRIPTION="Testing of network intrusion detection systems, firewalls and TCP/IP stacks" |
85 |
+HOMEPAGE="https://github.com/stsi/fragroute-ipv6" |
86 |
+SRC_URI="https://fragroute-ipv6.googlecode.com/files/${MY_P}.tar.gz" |
87 |
+ |
88 |
+LICENSE="BSD" |
89 |
+SLOT="0" |
90 |
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" |
91 |
+ |
92 |
+RDEPEND=" |
93 |
+ dev-libs/libevent |
94 |
+ net-libs/libpcap |
95 |
+ >=dev-libs/libdnet-1.12[ipv6] |
96 |
+" |
97 |
+DEPEND=" |
98 |
+ ${RDEPEND} |
99 |
+ virtual/awk |
100 |
+" |
101 |
+DOCS=( INSTALL README TODO ) |
102 |
+PATCHES=( |
103 |
+ "${FILESDIR}"/${P}-pcap_open.patch |
104 |
+) |
105 |
+S="${WORKDIR}/${MY_P}" |
106 |
+ |
107 |
+src_prepare() { |
108 |
+ default |
109 |
+ # Remove broken and old files, autotools will regen needed files |
110 |
+ rm *.m4 acconfig.h missing Makefile.in || die |
111 |
+ # Add missing includes |
112 |
+ sed -i -e "/#define IPUTIL_H/a#include <stdio.h>\n#include <stdint.h>" iputil.h || die |
113 |
+ eautoreconf |
114 |
+} |
115 |
+ |
116 |
+src_configure() { |
117 |
+ econf \ |
118 |
+ --with-libdnet="${EPREFIX}"/usr \ |
119 |
+ --with-libevent="${EPREFIX}"/usr \ |
120 |
+ --with-libpcap="${EPREFIX}"/usr |
121 |
+} |