[packages] arpd:
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 30 Apr 2010 14:31:18 +0000 (14:31 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 30 Apr 2010 14:31:18 +0000 (14:31 +0000)
- 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
net/arpd/patches/003-pcap_and_arg.patch
net/arpd/patches/005-remove-dropped-libevent-features.patch [new file with mode: 0644]

index 49abe30..8cf7327 100644 (file)
@@ -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
index b7edc0f..c48b8f4 100644 (file)
@@ -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 (file)
index 0000000..0936345
--- /dev/null
@@ -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);