libpcap: update to version 1.7.4
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 46776
This commit is contained in:
parent
55a76c19b1
commit
41a9f280c4
6 changed files with 51 additions and 23 deletions
|
@ -8,12 +8,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=libpcap
|
PKG_NAME:=libpcap
|
||||||
PKG_VERSION:=1.5.3
|
PKG_VERSION:=1.7.4
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=http://www.tcpdump.org/release/
|
PKG_SOURCE_URL:=http://www.tcpdump.org/release/
|
||||||
PKG_MD5SUM:=7e7321fb3aff2f2bb05c8229f3795d4a
|
PKG_MD5SUM:=b2e13142bbaba857ab1c6894aedaf547
|
||||||
PKG_FIXUP:=patch-libtool
|
PKG_FIXUP:=patch-libtool
|
||||||
|
|
||||||
PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
|
PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/Makefile.in
|
--- a/Makefile.in
|
||||||
+++ b/Makefile.in
|
+++ b/Makefile.in
|
||||||
@@ -585,68 +585,12 @@ install: install-shared install-archive
|
@@ -590,70 +590,12 @@ install: install-shared install-archive
|
||||||
(mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir))
|
(mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir))
|
||||||
[ -d $(DESTDIR)$(includedir)/pcap ] || \
|
[ -d $(DESTDIR)$(includedir)/pcap ] || \
|
||||||
(mkdir -p $(DESTDIR)$(includedir)/pcap; chmod 755 $(DESTDIR)$(includedir)/pcap)
|
(mkdir -p $(DESTDIR)$(includedir)/pcap; chmod 755 $(DESTDIR)$(includedir)/pcap)
|
||||||
|
@ -58,6 +58,8 @@
|
||||||
- $(LN_S) pcap_open_offline.3pcap pcap_fopen_offline.3pcap && \
|
- $(LN_S) pcap_open_offline.3pcap pcap_fopen_offline.3pcap && \
|
||||||
- rm -f pcap_fopen_offline_with_tstamp_precision.3pcap && \
|
- rm -f pcap_fopen_offline_with_tstamp_precision.3pcap && \
|
||||||
- $(LN_S) pcap_open_offline.3pcap pcap_fopen_offline_with_tstamp_precision.3pcap && \
|
- $(LN_S) pcap_open_offline.3pcap pcap_fopen_offline_with_tstamp_precision.3pcap && \
|
||||||
|
- rm -f pcap_tstamp_type_val_to_description.3pcap && \
|
||||||
|
- $(LN_S) pcap_tstamp_type_val_to_name.3pcap pcap_tstamp_type_val_to_description.3pcap && \
|
||||||
- rm -f pcap_getnonblock.3pcap && \
|
- rm -f pcap_getnonblock.3pcap && \
|
||||||
- $(LN_S) pcap_setnonblock.3pcap pcap_getnonblock.3pcap)
|
- $(LN_S) pcap_setnonblock.3pcap pcap_getnonblock.3pcap)
|
||||||
- for i in $(MANFILE); do \
|
- for i in $(MANFILE); do \
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
--- a/Makefile.in
|
--- a/Makefile.in
|
||||||
+++ b/Makefile.in
|
+++ b/Makefile.in
|
||||||
@@ -59,7 +59,7 @@ LN_S = @LN_S@
|
@@ -57,7 +57,7 @@ LN_S = @LN_S@
|
||||||
MKDEP = @MKDEP@
|
MKDEP = @MKDEP@
|
||||||
CCOPT = @V_CCOPT@
|
CCOPT = @V_CCOPT@
|
||||||
INCLS = -I. @V_INCLS@
|
INCLS = -I. @V_INCLS@
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/gencode.c
|
--- a/gencode.c
|
||||||
+++ b/gencode.c
|
+++ b/gencode.c
|
||||||
@@ -511,20 +511,6 @@ pcap_compile_nopcap(int snaplen_arg, int
|
@@ -543,20 +543,6 @@ pcap_compile_nopcap(int snaplen_arg, int
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
* back to another unresolved block (or nil). At least one of the fields
|
* back to another unresolved block (or nil). At least one of the fields
|
||||||
--- a/pcap.c
|
--- a/pcap.c
|
||||||
+++ b/pcap.c
|
+++ b/pcap.c
|
||||||
@@ -1075,6 +1075,59 @@ static const u_char charmap[] = {
|
@@ -1087,6 +1087,59 @@ static const u_char charmap[] = {
|
||||||
(u_char)'\374', (u_char)'\375', (u_char)'\376', (u_char)'\377',
|
(u_char)'\374', (u_char)'\375', (u_char)'\376', (u_char)'\377',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
{
|
{
|
||||||
--- a/optimize.c
|
--- a/optimize.c
|
||||||
+++ b/optimize.c
|
+++ b/optimize.c
|
||||||
@@ -2193,45 +2193,6 @@ icode_to_fcode(struct block *root, u_int
|
@@ -2203,45 +2203,6 @@ icode_to_fcode(struct block *root, u_int
|
||||||
return fp;
|
return fp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,4 +130,30 @@
|
||||||
-
|
-
|
||||||
#ifdef BDEBUG
|
#ifdef BDEBUG
|
||||||
static void
|
static void
|
||||||
opt_dump(struct block *root)
|
dot_dump_node(struct block *block, struct bpf_program *prog, FILE *out)
|
||||||
|
--- a/pcap-common.c
|
||||||
|
+++ b/pcap-common.c
|
||||||
|
@@ -1372,14 +1372,23 @@ swap_pseudo_headers(int linktype, struct
|
||||||
|
switch (linktype) {
|
||||||
|
|
||||||
|
case DLT_USB_LINUX:
|
||||||
|
+#ifndef PCAP_SUPPORT_USB
|
||||||
|
+ return;
|
||||||
|
+#endif
|
||||||
|
swap_linux_usb_header(hdr, data, 0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DLT_USB_LINUX_MMAPPED:
|
||||||
|
+#ifndef PCAP_SUPPORT_USB
|
||||||
|
+ return;
|
||||||
|
+#endif
|
||||||
|
swap_linux_usb_header(hdr, data, 1);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DLT_NFLOG:
|
||||||
|
+#ifndef PCAP_SUPPORT_NETFILTER
|
||||||
|
+ return;
|
||||||
|
+#endif
|
||||||
|
swap_nflog_header(hdr, data);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/pcap-linux.c
|
--- a/pcap-linux.c
|
||||||
+++ b/pcap-linux.c
|
+++ b/pcap-linux.c
|
||||||
@@ -380,7 +380,7 @@ static int iface_get_id(int fd, const ch
|
@@ -414,7 +414,7 @@ static int iface_get_id(int fd, const ch
|
||||||
static int iface_get_mtu(int fd, const char *device, char *ebuf);
|
static int iface_get_mtu(int fd, const char *device, char *ebuf);
|
||||||
static int iface_get_arptype(int fd, const char *device, char *ebuf);
|
static int iface_get_arptype(int fd, const char *device, char *ebuf);
|
||||||
#ifdef HAVE_PF_PACKET_SOCKETS
|
#ifdef HAVE_PF_PACKET_SOCKETS
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
#ifdef IW_MODE_MONITOR
|
#ifdef IW_MODE_MONITOR
|
||||||
static int has_wext(int sock_fd, const char *device, char *ebuf);
|
static int has_wext(int sock_fd, const char *device, char *ebuf);
|
||||||
#endif /* IW_MODE_MONITOR */
|
#endif /* IW_MODE_MONITOR */
|
||||||
@@ -963,7 +963,7 @@ pcap_can_set_rfmon_linux(pcap_t *handle)
|
@@ -1028,7 +1028,7 @@ pcap_can_set_rfmon_linux(pcap_t *handle)
|
||||||
* (We assume that if we have Wireless Extensions support
|
* (We assume that if we have Wireless Extensions support
|
||||||
* we also have PF_PACKET support.)
|
* we also have PF_PACKET support.)
|
||||||
*/
|
*/
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
if (sock_fd == -1) {
|
if (sock_fd == -1) {
|
||||||
(void)snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
|
(void)snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
|
||||||
"socket: %s", pcap_strerror(errno));
|
"socket: %s", pcap_strerror(errno));
|
||||||
@@ -1251,6 +1251,9 @@ pcap_activate_linux(pcap_t *handle)
|
@@ -1337,6 +1337,9 @@ pcap_activate_linux(pcap_t *handle)
|
||||||
handle->read_op = pcap_read_linux;
|
handle->read_op = pcap_read_linux;
|
||||||
handle->stats_op = pcap_stats_linux;
|
handle->stats_op = pcap_stats_linux;
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
/*
|
/*
|
||||||
* The "any" device is a special device which causes us not
|
* The "any" device is a special device which causes us not
|
||||||
* to bind to a particular device and thus to look at all
|
* to bind to a particular device and thus to look at all
|
||||||
@@ -3012,8 +3015,8 @@ activate_new(pcap_t *handle)
|
@@ -3160,8 +3163,8 @@ activate_new(pcap_t *handle)
|
||||||
* try a SOCK_RAW socket for the raw interface.
|
* try a SOCK_RAW socket for the raw interface.
|
||||||
*/
|
*/
|
||||||
sock_fd = is_any_device ?
|
sock_fd = is_any_device ?
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
if (sock_fd == -1) {
|
if (sock_fd == -1) {
|
||||||
if (errno == EINVAL || errno == EAFNOSUPPORT) {
|
if (errno == EINVAL || errno == EAFNOSUPPORT) {
|
||||||
@@ -3130,7 +3133,7 @@ activate_new(pcap_t *handle)
|
@@ -3279,7 +3282,7 @@ activate_new(pcap_t *handle)
|
||||||
return PCAP_ERROR;
|
return PCAP_ERROR;
|
||||||
}
|
}
|
||||||
sock_fd = socket(PF_PACKET, SOCK_DGRAM,
|
sock_fd = socket(PF_PACKET, SOCK_DGRAM,
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
if (sock_fd == -1) {
|
if (sock_fd == -1) {
|
||||||
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
|
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
|
||||||
"socket: %s", pcap_strerror(errno));
|
"socket: %s", pcap_strerror(errno));
|
||||||
@@ -3193,7 +3196,7 @@ activate_new(pcap_t *handle)
|
@@ -3343,7 +3346,7 @@ activate_new(pcap_t *handle)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((err = iface_bind(sock_fd, handlep->ifindex,
|
if ((err = iface_bind(sock_fd, handlep->ifindex,
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
close(sock_fd);
|
close(sock_fd);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
@@ -4667,7 +4670,7 @@ iface_get_id(int fd, const char *device,
|
@@ -5050,7 +5053,7 @@ iface_get_id(int fd, const char *device,
|
||||||
* or a PCAP_ERROR_ value on a hard error.
|
* or a PCAP_ERROR_ value on a hard error.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
{
|
{
|
||||||
struct sockaddr_ll sll;
|
struct sockaddr_ll sll;
|
||||||
int err;
|
int err;
|
||||||
@@ -4676,7 +4679,7 @@ iface_bind(int fd, int ifindex, char *eb
|
@@ -5059,7 +5062,7 @@ iface_bind(int fd, int ifindex, char *eb
|
||||||
memset(&sll, 0, sizeof(sll));
|
memset(&sll, 0, sizeof(sll));
|
||||||
sll.sll_family = AF_PACKET;
|
sll.sll_family = AF_PACKET;
|
||||||
sll.sll_ifindex = ifindex;
|
sll.sll_ifindex = ifindex;
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
|
|
||||||
if (bind(fd, (struct sockaddr *) &sll, sizeof(sll)) == -1) {
|
if (bind(fd, (struct sockaddr *) &sll, sizeof(sll)) == -1) {
|
||||||
if (errno == ENETDOWN) {
|
if (errno == ENETDOWN) {
|
||||||
@@ -5561,7 +5564,7 @@ activate_old(pcap_t *handle)
|
@@ -6049,7 +6052,7 @@ activate_old(pcap_t *handle)
|
||||||
|
|
||||||
/* Open the socket */
|
/* Open the socket */
|
||||||
|
|
||||||
|
@ -86,15 +86,15 @@
|
||||||
"socket: %s", pcap_strerror(errno));
|
"socket: %s", pcap_strerror(errno));
|
||||||
--- a/pcap.c
|
--- a/pcap.c
|
||||||
+++ b/pcap.c
|
+++ b/pcap.c
|
||||||
@@ -556,6 +556,7 @@ pcap_create_common(const char *source, c
|
@@ -562,6 +562,7 @@ pcap_create_common(const char *source, c
|
||||||
p->opt.promisc = 0;
|
p->opt.promisc = 0;
|
||||||
p->opt.rfmon = 0;
|
p->opt.rfmon = 0;
|
||||||
p->opt.immediate = 0;
|
p->opt.immediate = 0;
|
||||||
+ p->opt.proto = -1;
|
+ p->opt.proto = -1;
|
||||||
p->opt.tstamp_type = -1; /* default to not setting time stamp type */
|
p->opt.tstamp_type = -1; /* default to not setting time stamp type */
|
||||||
p->opt.tstamp_precision = PCAP_TSTAMP_PRECISION_MICRO;
|
p->opt.tstamp_precision = PCAP_TSTAMP_PRECISION_MICRO;
|
||||||
return (p);
|
|
||||||
@@ -713,6 +714,15 @@ pcap_get_tstamp_precision(pcap_t *p)
|
@@ -725,6 +726,15 @@ pcap_get_tstamp_precision(pcap_t *p)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -112,7 +112,7 @@
|
||||||
int status;
|
int status;
|
||||||
--- a/pcap/pcap.h
|
--- a/pcap/pcap.h
|
||||||
+++ b/pcap/pcap.h
|
+++ b/pcap/pcap.h
|
||||||
@@ -68,6 +68,7 @@ extern "C" {
|
@@ -66,6 +66,7 @@ extern "C" {
|
||||||
#define PCAP_VERSION_MINOR 4
|
#define PCAP_VERSION_MINOR 4
|
||||||
|
|
||||||
#define PCAP_ERRBUF_SIZE 256
|
#define PCAP_ERRBUF_SIZE 256
|
||||||
|
@ -130,7 +130,7 @@
|
||||||
int pcap_activate(pcap_t *);
|
int pcap_activate(pcap_t *);
|
||||||
--- a/pcap-int.h
|
--- a/pcap-int.h
|
||||||
+++ b/pcap-int.h
|
+++ b/pcap-int.h
|
||||||
@@ -88,6 +88,7 @@ struct pcap_opt {
|
@@ -109,6 +109,7 @@ struct pcap_opt {
|
||||||
char *source;
|
char *source;
|
||||||
int timeout; /* timeout for buffering */
|
int timeout; /* timeout for buffering */
|
||||||
int buffer_size;
|
int buffer_size;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/pcap-linux.c
|
--- a/pcap-linux.c
|
||||||
+++ b/pcap-linux.c
|
+++ b/pcap-linux.c
|
||||||
@@ -249,6 +249,8 @@ static const char rcsid[] _U_ =
|
@@ -254,6 +254,8 @@
|
||||||
typedef int socklen_t;
|
typedef int socklen_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue