diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2014-07-24 13:32:58 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2014-07-24 13:32:58 +0000 |
commit | b5646534525f3eb9cce485f6580fe9a473ce2ba7 (patch) | |
tree | ffddb673c48038e781d69f6c3d08ec8855ad33a5 /security/fragroute | |
parent | afee9d5cd365a4ef10c99ef86e5358e76a5d37f2 (diff) | |
download | ports-b5646534525f3eb9cce485f6580fe9a473ce2ba7.tar.gz ports-b5646534525f3eb9cce485f6580fe9a473ce2ba7.zip |
Only use libevent2
Remove libevent as libevent2 is providing a good compatibility interface as well
as providing better performances.
Remove custom patches from libevent2 and install libevent2 the regular way
Mark ports abusing private fields of the libevent1 API as broken
Import a patch from fedora to have honeyd working with libevent2
Remove most of the patches necessary to find the custom installation we used to
have for libevent2
With hat: portmgr
Notes
Notes:
svn path=/head/; revision=362796
Diffstat (limited to 'security/fragroute')
-rw-r--r-- | security/fragroute/Makefile | 4 | ||||
-rw-r--r-- | security/fragroute/files/patch-fragroute.c | 78 |
2 files changed, 80 insertions, 2 deletions
diff --git a/security/fragroute/Makefile b/security/fragroute/Makefile index 070d0c455489..70f3b715906f 100644 --- a/security/fragroute/Makefile +++ b/security/fragroute/Makefile @@ -3,7 +3,7 @@ PORTNAME= fragroute PORTVERSION= 1.2 -PORTREVISION= 11 +PORTREVISION= 12 CATEGORIES= security net MASTER_SITES= http://monkey.org/~dugsong/fragroute/ \ ${MASTER_SITE_PACKETSTORM} @@ -15,7 +15,7 @@ COMMENT= Tool for intercepting, modifying, and rewriting egress traffic LICENSE= BSD3CLAUSE LIB_DEPENDS= libdnet.so:${PORTSDIR}/net/libdnet \ - libevent-1.4.so:${PORTSDIR}/devel/libevent + libevent.so:${PORTSDIR}/devel/libevent2 GNU_CONFIGURE= yes CONFIGURE_ARGS+= --with-libdnet=${LOCALBASE} \ diff --git a/security/fragroute/files/patch-fragroute.c b/security/fragroute/files/patch-fragroute.c new file mode 100644 index 000000000000..f8dc691ade55 --- /dev/null +++ b/security/fragroute/files/patch-fragroute.c @@ -0,0 +1,78 @@ +$NetBSD: patch-fragroute.c,v 1.1 2013/05/23 16:02:13 christos Exp $ +In the unix case, don't use the obsolete libevent signal interface + +--- fragroute.c.orig 2002-04-07 18:55:20.000000000 -0400 ++++ fragroute.c 2013-05-23 11:59:52.000000000 -0400 +@@ -36,10 +36,6 @@ + + static struct fr_ctx ctx; + +-/* XXX - these should be in event.h */ +-extern int (*event_sigcb)(void); +-extern int event_gotsig; +- + static void + usage(void) + { +@@ -136,6 +132,10 @@ + } + + #ifdef WIN32 ++/* XXX - these should be in event.h */ ++extern int (*event_sigcb)(void); ++extern int event_gotsig; ++ + static BOOL CALLBACK + fragroute_signal(DWORD sig) + { +@@ -144,12 +144,25 @@ + return (TRUE); + } + #else ++ + static void +-fragroute_signal(int sig) ++fragroute_signal(evutil_socket_t fd, short what, void *arg) + { ++ int sig; ++ recv(fd, &sig, sizeof(sig), 0); + warnx("exiting on signal %d", sig); +- event_gotsig++; ++ exit(sig); + } ++ ++static void ++addsignal(int sig) { ++ struct event sig_ev; ++ int got; ++ ++ evsignal_set(&sig_ev, sig, fragroute_signal, &got); ++ evsignal_add(&sig_ev, NULL); ++} ++ + #endif + + static void +@@ -165,9 +178,6 @@ + err(1, "couldn't initialize Winsock"); + + SetConsoleCtrlHandler(fragroute_signal, TRUE); +-#else +- signal(SIGINT, fragroute_signal); +- signal(SIGTERM, fragroute_signal); + #endif + if (addr_aton(dst, &ctx.dst) < 0) + err(1, "destination address invalid"); +@@ -178,7 +188,12 @@ + pkt_init(128); + + event_init(); ++#ifdef WIN32 + event_sigcb = fragroute_close; ++#else ++ addsignal(SIGINT); ++ addsignal(SIGTERM); ++#endif + + if ((ctx.arp = arp_open()) == NULL || + (ctx.intf = intf_open()) == NULL || |