public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Jeroen Roovers" <jer@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/nemesis/, net-misc/nemesis/files/
Date: Fri, 31 Jan 2020 15:28:22 +0000 (UTC)	[thread overview]
Message-ID: <1580484498.24a56226228d802b32fe2f383dcb4301a447b41f.jer@gentoo> (raw)

commit:     24a56226228d802b32fe2f383dcb4301a447b41f
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 31 15:27:53 2020 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> 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 <jer <AT> 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 <string.h>
+ #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 <libnet-1.0.h>
+ #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 <libnet-1.0.h>
+ #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 <pcap.h>
+ #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 <libnet-1.0.h>
+ #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
+}


             reply	other threads:[~2020-01-31 15:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-31 15:28 Jeroen Roovers [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-01-18 11:36 [gentoo-commits] repo/gentoo:master commit in: net-misc/nemesis/, net-misc/nemesis/files/ David Seifert
2020-09-25 16:03 Jeroen Roovers
2018-06-21  8:32 Jeroen Roovers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1580484498.24a56226228d802b32fe2f383dcb4301a447b41f.jer@gentoo \
    --to=jer@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox