From 06f354c5442e3b17b9f9db822f375efc0234acd2 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 30 Apr 2010 14:31:18 +0000 Subject: [PATCH] arpd: - fix compilation against newer libevent by dropping obsolete external references - fix uninitialized pointer to pcap pattern leading to invalid filter patterns even if -a is not used - remove dependency on @BROKEN SVN-Revision: 21268 --- net/arpd/Makefile | 2 +- net/arpd/patches/003-pcap_and_arg.patch | 7 +++-- ...005-remove-dropped-libevent-features.patch | 29 +++++++++++++++++++ 3 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 net/arpd/patches/005-remove-dropped-libevent-features.patch diff --git a/net/arpd/Makefile b/net/arpd/Makefile index 49abe30e1..8cf732762 100644 --- a/net/arpd/Makefile +++ b/net/arpd/Makefile @@ -22,7 +22,7 @@ include $(INCLUDE_DIR)/package.mk define Package/arpd SECTION:=net CATEGORY:=Network - DEPENDS:=+libpcap +libdnet +libevent +librt @BROKEN + DEPENDS:=+libpcap +libdnet +libevent +librt TITLE:=A daemon to fake ARP replies URL:=http://niels.xtdnet.nl/honeyd/ endef diff --git a/net/arpd/patches/003-pcap_and_arg.patch b/net/arpd/patches/003-pcap_and_arg.patch index b7edc0f4a..c48b8f4d1 100644 --- a/net/arpd/patches/003-pcap_and_arg.patch +++ b/net/arpd/patches/003-pcap_and_arg.patch @@ -34,7 +34,7 @@ if ((arpd_pcap = pcap_open_live(dev, 128, 0, 500, ebuf)) == NULL) errx(1, "pcap_open_live: %s", ebuf); -@@ -465,14 +469,14 @@ main(int argc, char *argv[]) +@@ -465,14 +469,15 @@ main(int argc, char *argv[]) { struct event recv_ev; extern int (*event_sigcb)(void); @@ -44,6 +44,7 @@ FILE *fp; dev = NULL; ++ and_pcap_exp = NULL; debug = 0; - while ((c = getopt(argc, argv, "di:h?")) != -1) { @@ -51,7 +52,7 @@ switch (c) { case 'd': debug = 1; -@@ -480,6 +484,9 @@ main(int argc, char *argv[]) +@@ -480,6 +485,9 @@ main(int argc, char *argv[]) case 'i': dev = optarg; break; @@ -61,7 +62,7 @@ default: usage(); break; -@@ -489,9 +496,9 @@ main(int argc, char *argv[]) +@@ -489,9 +497,9 @@ main(int argc, char *argv[]) argv += optind; if (argc == 0) diff --git a/net/arpd/patches/005-remove-dropped-libevent-features.patch b/net/arpd/patches/005-remove-dropped-libevent-features.patch new file mode 100644 index 000000000..09363457e --- /dev/null +++ b/net/arpd/patches/005-remove-dropped-libevent-features.patch @@ -0,0 +1,29 @@ +--- a/arpd.c ++++ b/arpd.c +@@ -449,9 +449,6 @@ arpd_recv(int fd, short type, void *ev) + void + terminate_handler(int sig) + { +- extern int event_gotsig; +- +- event_gotsig = 1; + arpd_sig = sig; + } + +@@ -468,7 +465,6 @@ int + main(int argc, char *argv[]) + { + struct event recv_ev; +- extern int (*event_sigcb)(void); + char *dev, *and_pcap_exp; + int c, debug; + FILE *fp; +@@ -532,8 +528,6 @@ main(int argc, char *argv[]) + perror("signal"); + return (-1); + } +- event_sigcb = arpd_signal; +- + event_dispatch(); + + return (0); -- 2.30.2