From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C36EF138350 for ; Fri, 31 Jan 2020 15:28:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DE2F9E07DB; Fri, 31 Jan 2020 15:28:24 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B628AE07DB for ; Fri, 31 Jan 2020 15:28:24 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 98ACF34E580 for ; Fri, 31 Jan 2020 15:28:23 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 55B0E7B for ; Fri, 31 Jan 2020 15:28:22 +0000 (UTC) From: "Jeroen Roovers" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jeroen Roovers" Message-ID: <1580484498.24a56226228d802b32fe2f383dcb4301a447b41f.jer@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/nemesis/, net-misc/nemesis/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-misc/nemesis/files/nemesis-1.4-fno-common.patch net-misc/nemesis/nemesis-1.4-r2.ebuild X-VCS-Directories: net-misc/nemesis/ net-misc/nemesis/files/ X-VCS-Committer: jer X-VCS-Committer-Name: Jeroen Roovers X-VCS-Revision: 24a56226228d802b32fe2f383dcb4301a447b41f X-VCS-Branch: master Date: Fri, 31 Jan 2020 15:28:22 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: fe659752-1773-483f-85e5-f870a4523ca9 X-Archives-Hash: 1a05935686bce66ce34d6159e2406625 commit: 24a56226228d802b32fe2f383dcb4301a447b41f Author: Jeroen Roovers gentoo org> AuthorDate: Fri Jan 31 15:27:53 2020 +0000 Commit: Jeroen Roovers gentoo org> CommitDate: Fri Jan 31 15:28:18 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24a56226 net-misc/nemesis: Fix CFLAGS=-fno-common Package-Manager: Portage-2.3.86, Repoman-2.3.20 Closes: https://bugs.gentoo.org/show_bug.cgi?id=707292 Signed-off-by: Jeroen Roovers gentoo.org> .../nemesis/files/nemesis-1.4-fno-common.patch | 150 +++++++++++++++++++++ net-misc/nemesis/nemesis-1.4-r2.ebuild | 36 +++++ 2 files changed, 186 insertions(+) diff --git a/net-misc/nemesis/files/nemesis-1.4-fno-common.patch b/net-misc/nemesis/files/nemesis-1.4-fno-common.patch new file mode 100644 index 00000000000..068fef61b6e --- /dev/null +++ b/net-misc/nemesis/files/nemesis-1.4-fno-common.patch @@ -0,0 +1,150 @@ +--- a/src/nemesis.c ++++ b/src/nemesis.c +@@ -12,6 +12,8 @@ + #include + #include "nemesis.h" + ++int mode; /* injection mode */ ++ + int main(int argc, char **argv) + { + char **avtmp, *avval; +--- a/src/nemesis-dns.c ++++ b/src/nemesis-dns.c +@@ -37,6 +37,8 @@ + static void dns_validatedata(void); + static void dns_verbose(void); + ++int state; /* default to UDP */ ++ + void nemesis_dns(int argc, char **argv) + { + const char *module = "DNS Packet Injection"; +--- a/src/nemesis-dns.h ++++ b/src/nemesis-dns.h +@@ -32,7 +32,7 @@ + #include + #include "nemesis.h" + +-int state; /* default to UDP */ ++extern int state; /* default to UDP */ + + int builddns(ETHERhdr *, IPhdr *, TCPhdr *, UDPhdr *, DNShdr *, FileData *, + FileData *, FileData *, char *); +--- a/src/nemesis.h ++++ b/src/nemesis.h +@@ -122,6 +122,8 @@ + extern int got_ipoptions; + extern int got_tcpoptions; + ++extern int mode; /* injection mode */ ++ + typedef struct _FileData + { + int32_t file_s; /* file size */ +--- a/src/nemesis-icmp.c ++++ b/src/nemesis-icmp.c +@@ -38,6 +38,8 @@ + static void icmp_validatedata(void); + static void icmp_verbose(void); + ++int got_origoptions; ++ + void nemesis_icmp(int argc, char **argv) + { + const char *module = "ICMP Packet Injection"; +--- a/src/nemesis-icmp.h ++++ b/src/nemesis-icmp.h +@@ -42,8 +42,7 @@ + #include + #include "nemesis.h" + +-int mode; /* ICMP injection mode */ +-int got_origoptions; ++extern int got_origoptions; + + int buildicmp(ETHERhdr *, IPhdr *, ICMPhdr *, IPhdr *, FileData *, FileData *, + FileData *, char *); +--- a/src/nemesis-ospf.c ++++ b/src/nemesis-ospf.c +@@ -15,6 +15,37 @@ + #include + #endif + ++u_short id, /* IP id */ ++ frag, /* frag shit */ ++ mtusize, /* Max dgram length (DBD) */ ++ num, /* LSA_RTR num */ ++ interval, /* secs since last pkt sent */ ++ rtr_flags, /* LSA_RTR flags */ ++ metric, /* OSPF metric */ ++ ospf_age; /* OSPF advertisement age */ ++ ++u_long source, /* source address */ ++ dest, /* destination address */ ++ neighbor, /* neighbor router */ ++ as_fwd, /* AS_EXT forward address */ ++ addrid, /* advertising router id */ ++ addaid, /* advertising area id */ ++ router, /* advertising router */ ++ auth[2], /* authentication type */ ++ mask; /* subnet mask (icmp_mask) */ ++ ++u_char priority, /* OSPF priority */ ++ exchange, /* DBD exchange type */ ++ rtrtype, /* LSA_RTR type */ ++ ooptions; /* OSPF options */ ++ ++u_int dead_int, /* dead router interval in secs */ ++ as_tag, /* AS_EXT tag */ ++ seqnum, /* seqnum for LSA */ ++ bcastnum, /* num of LSAs to bcast (LSU) */ ++ rtrdata, /* LSA_RTR router data */ ++ rtrid; /* router id for LSA */ ++ + static ETHERhdr etherhdr; + static IPhdr iphdr; + static OSPFhdr ospfhdr; +--- a/src/nemesis-ospf.h ++++ b/src/nemesis-ospf.h +@@ -35,7 +35,7 @@ + #include + #include "nemesis.h" + +-u_short id, /* IP id */ ++extern u_short id, /* IP id */ + frag, /* frag shit */ + mtusize, /* Max dgram length (DBD) */ + num, /* LSA_RTR num */ +@@ -44,7 +44,7 @@ + metric, /* OSPF metric */ + ospf_age; /* OSPF advertisement age */ + +-u_long source, /* source address */ ++extern u_long source, /* source address */ + dest, /* destination address */ + neighbor, /* neighbor router */ + as_fwd, /* AS_EXT forward address */ +@@ -54,20 +54,18 @@ + auth[2], /* authentication type */ + mask; /* subnet mask (icmp_mask) */ + +-u_char priority, /* OSPF priority */ ++extern u_char priority, /* OSPF priority */ + exchange, /* DBD exchange type */ + rtrtype, /* LSA_RTR type */ + ooptions; /* OSPF options */ + +-u_int dead_int, /* dead router interval in secs */ ++extern u_int dead_int, /* dead router interval in secs */ + as_tag, /* AS_EXT tag */ + seqnum, /* seqnum for LSA */ + bcastnum, /* num of LSAs to bcast (LSU) */ + rtrdata, /* LSA_RTR router data */ + rtrid; /* router id for LSA */ + +-int mode; /* OSPF injection mode */ +- + int buildospf(ETHERhdr *, IPhdr *, FileData *, FileData *, char *); + + #endif /* __NEMESIS_OSPF_H__ */ diff --git a/net-misc/nemesis/nemesis-1.4-r2.ebuild b/net-misc/nemesis/nemesis-1.4-r2.ebuild new file mode 100644 index 00000000000..e7b2e7d1891 --- /dev/null +++ b/net-misc/nemesis/nemesis-1.4-r2.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +DESCRIPTION="A commandline-based, portable human IP stack for UNIX/Linux" +HOMEPAGE="http://nemesis.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P/_}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~sparc ~x86" + +RDEPEND=" + net-libs/libpcap +" +DEPEND=" + ${RDEPEND} + =net-libs/libnet-1.0* +" + +DOCS="CREDITS ChangeLog README" + +PATCHES=( + "${FILESDIR}"/${P}-fileio.patch + "${FILESDIR}"/${P}-libnet-1.0.patch + "${FILESDIR}"/${P}-prototcp.patch +) + +src_prepare() { + default +for i in src/*.[ch]; do cp -av $i $i.orig || die; done + eapply "${FILESDIR}"/${P}-fno-common.patch + eautoreconf +}