summaryrefslogtreecommitdiffstats
path: root/network/dsniff/patches/38_fix-pcap_init.patch
diff options
context:
space:
mode:
author Matteo Bernardini2021-04-07 19:43:09 +0200
committer Matteo Bernardini2021-04-07 19:43:09 +0200
commitfc3c9447da6cded0b6741cf3e6c2386c16493440 (patch)
tree4e2d3e3a7ba5c8cb879728d8e965da94d1fd4850 /network/dsniff/patches/38_fix-pcap_init.patch
parenta6bf666d73b4dccae0636e4ca04113d5953b956c (diff)
downloadslackbuilds-current-20210407.1.tar.gz
20210407.1 global branch merge.current-20210407.1
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'network/dsniff/patches/38_fix-pcap_init.patch')
-rw-r--r--network/dsniff/patches/38_fix-pcap_init.patch63
1 files changed, 63 insertions, 0 deletions
diff --git a/network/dsniff/patches/38_fix-pcap_init.patch b/network/dsniff/patches/38_fix-pcap_init.patch
new file mode 100644
index 0000000000..5a91c2b40a
--- /dev/null
+++ b/network/dsniff/patches/38_fix-pcap_init.patch
@@ -0,0 +1,63 @@
+Description: Resolve naming collision due to libpcap API changes
+ dsniff was written with a function named pcap_init() that predates
+ the one in libpcap and is entirely different. This patch renames it
+ out of the way.
+Author: Dennis Filder <d.filder@web.de>
+Bug-Debian: https://bugs.debian.org/980588
+Last-Update: 2021-02-10
+---
+--- a/tcpnice.c
++++ b/tcpnice.c
+@@ -204,7 +204,7 @@
+
+ filter = copy_argv(argv);
+
+- if ((pd = pcap_init(intf, filter, 128)) == NULL)
++ if ((pd = pcap_init_dsniff(intf, filter, 128)) == NULL)
+ errx(1, "couldn't initialize sniffing");
+
+ if ((pcap_off = pcap_dloff(pd)) < 0)
+--- a/dnsspoof.c
++++ b/dnsspoof.c
+@@ -309,7 +309,7 @@
+ else snprintf(buf, sizeof(buf), "udp dst port 53 and not src %s",
+ libnet_addr2name4(lnet_ip, LIBNET_DONT_RESOLVE));
+
+- if ((pcap_pd = pcap_init(dev, buf, 128)) == NULL)
++ if ((pcap_pd = pcap_init_dsniff(dev, buf, 128)) == NULL)
+ errx(1, "couldn't initialize sniffing");
+
+ if ((pcap_off = pcap_dloff(pcap_pd)) < 0)
+--- a/pcaputil.h
++++ b/pcaputil.h
+@@ -11,7 +11,7 @@
+ #ifndef PCAPUTIL_H
+ #define PCAPUTIL_H
+
+-pcap_t *pcap_init(char *intf, char *filter, int snaplen);
++pcap_t *pcap_init_dsniff(char *intf, char *filter, int snaplen);
+
+ int pcap_dloff(pcap_t *pd);
+
+--- a/tcpkill.c
++++ b/tcpkill.c
+@@ -130,7 +130,7 @@
+
+ filter = copy_argv(argv);
+
+- if ((pd = pcap_init(intf, filter, 64)) == NULL)
++ if ((pd = pcap_init_dsniff(intf, filter, 64)) == NULL)
+ errx(1, "couldn't initialize sniffing");
+
+ if ((pcap_off = pcap_dloff(pd)) < 0)
+--- a/pcaputil.c
++++ b/pcaputil.c
+@@ -63,7 +63,7 @@
+ }
+
+ pcap_t *
+-pcap_init(char *intf, char *filter, int snaplen)
++pcap_init_dsniff(char *intf, char *filter, int snaplen)
+ {
+ pcap_t *pd;
+ u_int net, mask;