Accepting request 210861 from home:AndreasStieger:branches:Base:System
update to 1.5.2 OBS-URL: https://build.opensuse.org/request/show/210861 OBS-URL: https://build.opensuse.org/package/show/Base:System/libpcap?expand=0&rev=34
This commit is contained in:
parent
63172be653
commit
1177f467e1
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:7c6a2a4f71e8ab09804e6b4fb3aff998c5583108ac42c0e2967eee8e1dbc7406
|
|
||||||
size 619045
|
|
Binary file not shown.
@ -1,8 +1,13 @@
|
|||||||
Index: pcap-bpf.c
|
---
|
||||||
|
pcap-bpf.c | 2 +-
|
||||||
|
pcap-linux.c | 22 ++++++++++++++++++++++
|
||||||
|
2 files changed, 23 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
Index: libpcap-1.5.2/pcap-bpf.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- pcap-bpf.c.orig
|
--- libpcap-1.5.2.orig/pcap-bpf.c 2013-11-07 23:23:22.000000000 +0000
|
||||||
+++ pcap-bpf.c
|
+++ libpcap-1.5.2/pcap-bpf.c 2013-12-14 11:28:40.000000000 +0000
|
||||||
@@ -483,7 +483,7 @@ bpf_open(pcap_t *p)
|
@@ -494,7 +494,7 @@ bpf_open(pcap_t *p)
|
||||||
fd = open(device, O_RDWR);
|
fd = open(device, O_RDWR);
|
||||||
if (fd == -1 && errno == EACCES)
|
if (fd == -1 && errno == EACCES)
|
||||||
fd = open(device, O_RDONLY);
|
fd = open(device, O_RDONLY);
|
||||||
@ -11,11 +16,11 @@ Index: pcap-bpf.c
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* XXX better message for all minors used
|
* XXX better message for all minors used
|
||||||
Index: pcap-linux.c
|
Index: libpcap-1.5.2/pcap-linux.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- pcap-linux.c.orig
|
--- libpcap-1.5.2.orig/pcap-linux.c 2013-12-03 15:11:24.000000000 +0000
|
||||||
+++ pcap-linux.c
|
+++ libpcap-1.5.2/pcap-linux.c 2013-12-14 11:30:29.000000000 +0000
|
||||||
@@ -2421,8 +2421,30 @@ pcap_setfilter_linux_common(pcap_t *hand
|
@@ -2475,8 +2475,30 @@ pcap_setfilter_linux_common(pcap_t *hand
|
||||||
if (can_filter_in_kernel) {
|
if (can_filter_in_kernel) {
|
||||||
if ((err = set_kernel_filter(handle, &fcode)) == 0)
|
if ((err = set_kernel_filter(handle, &fcode)) == 0)
|
||||||
{
|
{
|
||||||
@ -25,7 +30,7 @@ Index: pcap-linux.c
|
|||||||
+ unsigned int received = 0, rec_len = 0;
|
+ unsigned int received = 0, rec_len = 0;
|
||||||
+ socklen_t optlen = sizeof(rec_len);
|
+ socklen_t optlen = sizeof(rec_len);
|
||||||
/* Installation succeded - using kernel filter. */
|
/* Installation succeded - using kernel filter. */
|
||||||
handle->md.use_bpf = 1;
|
handlep->filtering_in_kernel = 1;
|
||||||
+
|
+
|
||||||
+ oldflags = fcntl(handle->fd, F_GETFL, 0);
|
+ oldflags = fcntl(handle->fd, F_GETFL, 0);
|
||||||
+ oldflags |= O_NONBLOCK;
|
+ oldflags |= O_NONBLOCK;
|
3
libpcap-1.5.2.tar.gz
Normal file
3
libpcap-1.5.2.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:806d4ba23b126476d39a458ad1468f73dfe63c92f9586208f7e4e18c13e52ddd
|
||||||
|
size 640308
|
BIN
libpcap-1.5.2.tar.gz.sig
Normal file
BIN
libpcap-1.5.2.tar.gz.sig
Normal file
Binary file not shown.
@ -18,11 +18,11 @@
|
|||||||
sf-pcap.c | 2 +-
|
sf-pcap.c | 2 +-
|
||||||
17 files changed, 39 insertions(+), 36 deletions(-)
|
17 files changed, 39 insertions(+), 36 deletions(-)
|
||||||
|
|
||||||
Index: libpcap-1.4.0/configure.in
|
Index: libpcap-1.5.2/configure.in
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libpcap-1.4.0.orig/configure.in 2013-03-25 14:51:40.000000000 +0000
|
--- libpcap-1.5.2.orig/configure.in 2013-11-07 23:23:22.000000000 +0000
|
||||||
+++ libpcap-1.4.0/configure.in 2013-09-13 20:17:59.000000000 +0100
|
+++ libpcap-1.5.2/configure.in 2013-12-14 11:40:45.000000000 +0000
|
||||||
@@ -22,7 +22,9 @@ AC_INIT(pcap.c)
|
@@ -21,7 +21,9 @@ AC_INIT(pcap.c)
|
||||||
AC_CANONICAL_SYSTEM
|
AC_CANONICAL_SYSTEM
|
||||||
|
|
||||||
AC_LBL_C_INIT_BEFORE_CC(V_CCOPT, V_INCLS)
|
AC_LBL_C_INIT_BEFORE_CC(V_CCOPT, V_INCLS)
|
||||||
@ -33,10 +33,10 @@ Index: libpcap-1.4.0/configure.in
|
|||||||
AC_LBL_C_INIT(V_CCOPT, V_INCLS)
|
AC_LBL_C_INIT(V_CCOPT, V_INCLS)
|
||||||
AC_LBL_SHLIBS_INIT
|
AC_LBL_SHLIBS_INIT
|
||||||
AC_LBL_C_INLINE
|
AC_LBL_C_INLINE
|
||||||
Index: libpcap-1.4.0/fad-gifc.c
|
Index: libpcap-1.5.2/fad-gifc.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libpcap-1.4.0.orig/fad-gifc.c 2013-02-21 03:51:49.000000000 +0000
|
--- libpcap-1.5.2.orig/fad-gifc.c 2013-11-07 23:23:22.000000000 +0000
|
||||||
+++ libpcap-1.4.0/fad-gifc.c 2013-09-13 20:17:59.000000000 +0100
|
+++ libpcap-1.5.2/fad-gifc.c 2013-12-14 11:40:45.000000000 +0000
|
||||||
@@ -157,7 +157,7 @@ pcap_findalldevs_interfaces(pcap_if_t **
|
@@ -157,7 +157,7 @@ pcap_findalldevs_interfaces(pcap_if_t **
|
||||||
/*
|
/*
|
||||||
* Create a socket from which to fetch the list of interfaces.
|
* Create a socket from which to fetch the list of interfaces.
|
||||||
@ -46,10 +46,10 @@ Index: libpcap-1.4.0/fad-gifc.c
|
|||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
(void)snprintf(errbuf, PCAP_ERRBUF_SIZE,
|
(void)snprintf(errbuf, PCAP_ERRBUF_SIZE,
|
||||||
"socket: %s", pcap_strerror(errno));
|
"socket: %s", pcap_strerror(errno));
|
||||||
Index: libpcap-1.4.0/fad-glifc.c
|
Index: libpcap-1.5.2/fad-glifc.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libpcap-1.4.0.orig/fad-glifc.c 2013-02-21 03:51:49.000000000 +0000
|
--- libpcap-1.5.2.orig/fad-glifc.c 2013-11-07 23:23:22.000000000 +0000
|
||||||
+++ libpcap-1.4.0/fad-glifc.c 2013-09-13 20:17:59.000000000 +0100
|
+++ libpcap-1.5.2/fad-glifc.c 2013-12-14 11:40:45.000000000 +0000
|
||||||
@@ -100,7 +100,7 @@ pcap_findalldevs_interfaces(pcap_if_t **
|
@@ -100,7 +100,7 @@ pcap_findalldevs_interfaces(pcap_if_t **
|
||||||
* Create a socket from which to fetch the list of interfaces,
|
* Create a socket from which to fetch the list of interfaces,
|
||||||
* and from which to fetch IPv4 information.
|
* and from which to fetch IPv4 information.
|
||||||
@ -68,10 +68,10 @@ Index: libpcap-1.4.0/fad-glifc.c
|
|||||||
if (fd6 < 0) {
|
if (fd6 < 0) {
|
||||||
(void)snprintf(errbuf, PCAP_ERRBUF_SIZE,
|
(void)snprintf(errbuf, PCAP_ERRBUF_SIZE,
|
||||||
"socket: %s", pcap_strerror(errno));
|
"socket: %s", pcap_strerror(errno));
|
||||||
Index: libpcap-1.4.0/inet.c
|
Index: libpcap-1.5.2/inet.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libpcap-1.4.0.orig/inet.c 2013-02-21 03:51:49.000000000 +0000
|
--- libpcap-1.5.2.orig/inet.c 2013-11-07 23:23:22.000000000 +0000
|
||||||
+++ libpcap-1.4.0/inet.c 2013-09-13 20:17:59.000000000 +0100
|
+++ libpcap-1.5.2/inet.c 2013-12-14 11:40:45.000000000 +0000
|
||||||
@@ -430,7 +430,7 @@ add_addr_to_iflist(pcap_if_t **alldevs,
|
@@ -430,7 +430,7 @@ add_addr_to_iflist(pcap_if_t **alldevs,
|
||||||
*/
|
*/
|
||||||
memset(&ifrdesc, 0, sizeof ifrdesc);
|
memset(&ifrdesc, 0, sizeof ifrdesc);
|
||||||
@ -90,11 +90,11 @@ Index: libpcap-1.4.0/inet.c
|
|||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
(void)snprintf(errbuf, PCAP_ERRBUF_SIZE, "socket: %s",
|
(void)snprintf(errbuf, PCAP_ERRBUF_SIZE, "socket: %s",
|
||||||
pcap_strerror(errno));
|
pcap_strerror(errno));
|
||||||
Index: libpcap-1.4.0/nametoaddr.c
|
Index: libpcap-1.5.2/nametoaddr.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libpcap-1.4.0.orig/nametoaddr.c 2013-02-21 03:51:49.000000000 +0000
|
--- libpcap-1.5.2.orig/nametoaddr.c 2013-11-07 23:23:22.000000000 +0000
|
||||||
+++ libpcap-1.4.0/nametoaddr.c 2013-09-13 20:17:59.000000000 +0100
|
+++ libpcap-1.5.2/nametoaddr.c 2013-12-14 11:40:45.000000000 +0000
|
||||||
@@ -441,7 +441,7 @@ pcap_ether_hostton(const char *name)
|
@@ -443,7 +443,7 @@ pcap_ether_hostton(const char *name)
|
||||||
static int init = 0;
|
static int init = 0;
|
||||||
|
|
||||||
if (!init) {
|
if (!init) {
|
||||||
@ -103,11 +103,11 @@ Index: libpcap-1.4.0/nametoaddr.c
|
|||||||
++init;
|
++init;
|
||||||
if (fp == NULL)
|
if (fp == NULL)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
Index: libpcap-1.4.0/pcap-bt-linux.c
|
Index: libpcap-1.5.2/pcap-bt-linux.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libpcap-1.4.0.orig/pcap-bt-linux.c 2013-03-25 14:51:40.000000000 +0000
|
--- libpcap-1.5.2.orig/pcap-bt-linux.c 2013-11-07 23:23:22.000000000 +0000
|
||||||
+++ libpcap-1.4.0/pcap-bt-linux.c 2013-09-13 20:19:44.000000000 +0100
|
+++ libpcap-1.5.2/pcap-bt-linux.c 2013-12-14 11:40:45.000000000 +0000
|
||||||
@@ -79,7 +79,7 @@ bt_findalldevs(pcap_if_t **alldevsp, cha
|
@@ -85,7 +85,7 @@ bt_findalldevs(pcap_if_t **alldevsp, cha
|
||||||
int i, sock;
|
int i, sock;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
@ -116,8 +116,8 @@ Index: libpcap-1.4.0/pcap-bt-linux.c
|
|||||||
if (sock < 0)
|
if (sock < 0)
|
||||||
{
|
{
|
||||||
/* if bluetooth is not supported this this is not fatal*/
|
/* if bluetooth is not supported this this is not fatal*/
|
||||||
@@ -211,7 +211,7 @@ bt_activate(pcap_t* handle)
|
@@ -218,7 +218,7 @@ bt_activate(pcap_t* handle)
|
||||||
handle->md.ifindex = dev_id;
|
handlep->dev_id = dev_id;
|
||||||
|
|
||||||
/* Create HCI socket */
|
/* Create HCI socket */
|
||||||
- handle->fd = socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI);
|
- handle->fd = socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI);
|
||||||
@ -125,7 +125,7 @@ Index: libpcap-1.4.0/pcap-bt-linux.c
|
|||||||
if (handle->fd < 0) {
|
if (handle->fd < 0) {
|
||||||
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
|
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
|
||||||
"Can't create raw socket: %s", strerror(errno));
|
"Can't create raw socket: %s", strerror(errno));
|
||||||
@@ -315,7 +315,7 @@ bt_read_linux(pcap_t *handle, int max_pa
|
@@ -322,7 +322,7 @@ bt_read_linux(pcap_t *handle, int max_pa
|
||||||
|
|
||||||
/* ignore interrupt system call error */
|
/* ignore interrupt system call error */
|
||||||
do {
|
do {
|
||||||
@ -134,11 +134,11 @@ Index: libpcap-1.4.0/pcap-bt-linux.c
|
|||||||
if (handle->break_loop)
|
if (handle->break_loop)
|
||||||
{
|
{
|
||||||
handle->break_loop = 0;
|
handle->break_loop = 0;
|
||||||
Index: libpcap-1.4.0/pcap-can-linux.c
|
Index: libpcap-1.5.2/pcap-can-linux.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libpcap-1.4.0.orig/pcap-can-linux.c 2013-02-21 03:51:49.000000000 +0000
|
--- libpcap-1.5.2.orig/pcap-can-linux.c 2013-11-07 23:23:22.000000000 +0000
|
||||||
+++ libpcap-1.4.0/pcap-can-linux.c 2013-09-13 20:17:59.000000000 +0100
|
+++ libpcap-1.5.2/pcap-can-linux.c 2013-12-14 11:40:45.000000000 +0000
|
||||||
@@ -153,7 +153,7 @@ can_activate(pcap_t* handle)
|
@@ -161,7 +161,7 @@ can_activate(pcap_t* handle)
|
||||||
handle->stats_op = can_stats_linux;
|
handle->stats_op = can_stats_linux;
|
||||||
|
|
||||||
/* Create socket */
|
/* Create socket */
|
||||||
@ -147,7 +147,7 @@ Index: libpcap-1.4.0/pcap-can-linux.c
|
|||||||
if (handle->fd < 0)
|
if (handle->fd < 0)
|
||||||
{
|
{
|
||||||
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "Can't create raw socket %d:%s",
|
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "Can't create raw socket %d:%s",
|
||||||
@@ -227,7 +227,7 @@ can_read_linux(pcap_t *handle, int max_p
|
@@ -235,7 +235,7 @@ can_read_linux(pcap_t *handle, int max_p
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
@ -156,10 +156,10 @@ Index: libpcap-1.4.0/pcap-can-linux.c
|
|||||||
if (handle->break_loop)
|
if (handle->break_loop)
|
||||||
{
|
{
|
||||||
handle->break_loop = 0;
|
handle->break_loop = 0;
|
||||||
Index: libpcap-1.4.0/pcap-canusb-linux.c
|
Index: libpcap-1.5.2/pcap-canusb-linux.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libpcap-1.4.0.orig/pcap-canusb-linux.c 2013-02-21 03:51:49.000000000 +0000
|
--- libpcap-1.5.2.orig/pcap-canusb-linux.c 2013-11-07 23:23:22.000000000 +0000
|
||||||
+++ libpcap-1.4.0/pcap-canusb-linux.c 2013-09-13 20:21:19.000000000 +0100
|
+++ libpcap-1.5.2/pcap-canusb-linux.c 2013-12-14 11:40:45.000000000 +0000
|
||||||
@@ -36,6 +36,7 @@
|
@@ -36,6 +36,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
@ -167,8 +167,8 @@ Index: libpcap-1.4.0/pcap-canusb-linux.c
|
|||||||
+#include <pthread.h>
|
+#include <pthread.h>
|
||||||
#include <libusb-1.0/libusb.h>
|
#include <libusb-1.0/libusb.h>
|
||||||
|
|
||||||
#include "pcap-int.h"
|
#include <stdlib.h>
|
||||||
@@ -297,7 +298,7 @@ static int canusb_startcapture(struct ca
|
@@ -289,7 +290,7 @@ static int canusb_startcapture(struct pc
|
||||||
{
|
{
|
||||||
int pipefd[2];
|
int pipefd[2];
|
||||||
|
|
||||||
@ -176,12 +176,12 @@ Index: libpcap-1.4.0/pcap-canusb-linux.c
|
|||||||
+ if (pipe2(pipefd, O_CLOEXEC) == -1)
|
+ if (pipe2(pipefd, O_CLOEXEC) == -1)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
canusb.rdpipe = pipefd[0];
|
this->rdpipe = pipefd[0];
|
||||||
Index: libpcap-1.4.0/pcap-linux.c
|
Index: libpcap-1.5.2/pcap-linux.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libpcap-1.4.0.orig/pcap-linux.c 2013-09-13 20:15:43.000000000 +0100
|
--- libpcap-1.5.2.orig/pcap-linux.c 2013-12-14 11:32:03.000000000 +0000
|
||||||
+++ libpcap-1.4.0/pcap-linux.c 2013-09-13 20:17:59.000000000 +0100
|
+++ libpcap-1.5.2/pcap-linux.c 2013-12-14 11:40:46.000000000 +0000
|
||||||
@@ -894,7 +894,7 @@ pcap_can_set_rfmon_linux(pcap_t *handle)
|
@@ -962,7 +962,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.)
|
||||||
*/
|
*/
|
||||||
@ -190,7 +190,7 @@ Index: libpcap-1.4.0/pcap-linux.c
|
|||||||
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));
|
||||||
@@ -1422,7 +1422,7 @@ pcap_read_packet(pcap_t *handle, pcap_ha
|
@@ -1539,7 +1539,7 @@ pcap_read_packet(pcap_t *handle, pcap_ha
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_PACKET_AUXDATA) && defined(HAVE_LINUX_TPACKET_AUXDATA_TP_VLAN_TCI)
|
#if defined(HAVE_PACKET_AUXDATA) && defined(HAVE_LINUX_TPACKET_AUXDATA_TP_VLAN_TCI)
|
||||||
@ -199,7 +199,7 @@ Index: libpcap-1.4.0/pcap-linux.c
|
|||||||
#else /* defined(HAVE_PACKET_AUXDATA) && defined(HAVE_LINUX_TPACKET_AUXDATA_TP_VLAN_TCI) */
|
#else /* defined(HAVE_PACKET_AUXDATA) && defined(HAVE_LINUX_TPACKET_AUXDATA_TP_VLAN_TCI) */
|
||||||
fromlen = sizeof(from);
|
fromlen = sizeof(from);
|
||||||
packet_len = recvfrom(
|
packet_len = recvfrom(
|
||||||
@@ -1900,7 +1900,7 @@ scan_sys_class_net(pcap_if_t **devlistp,
|
@@ -2030,7 +2030,7 @@ scan_sys_class_net(pcap_if_t **devlistp,
|
||||||
/*
|
/*
|
||||||
* Create a socket from which to fetch interface information.
|
* Create a socket from which to fetch interface information.
|
||||||
*/
|
*/
|
||||||
@ -208,7 +208,7 @@ Index: libpcap-1.4.0/pcap-linux.c
|
|||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
(void)snprintf(errbuf, PCAP_ERRBUF_SIZE,
|
(void)snprintf(errbuf, PCAP_ERRBUF_SIZE,
|
||||||
"socket: %s", pcap_strerror(errno));
|
"socket: %s", pcap_strerror(errno));
|
||||||
@@ -2077,7 +2077,7 @@ scan_proc_net_dev(pcap_if_t **devlistp,
|
@@ -2207,7 +2207,7 @@ scan_proc_net_dev(pcap_if_t **devlistp,
|
||||||
/*
|
/*
|
||||||
* Create a socket from which to fetch interface information.
|
* Create a socket from which to fetch interface information.
|
||||||
*/
|
*/
|
||||||
@ -217,7 +217,7 @@ Index: libpcap-1.4.0/pcap-linux.c
|
|||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
(void)snprintf(errbuf, PCAP_ERRBUF_SIZE,
|
(void)snprintf(errbuf, PCAP_ERRBUF_SIZE,
|
||||||
"socket: %s", pcap_strerror(errno));
|
"socket: %s", pcap_strerror(errno));
|
||||||
@@ -2824,8 +2824,8 @@ activate_new(pcap_t *handle)
|
@@ -3030,8 +3030,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 ?
|
||||||
@ -228,7 +228,7 @@ Index: libpcap-1.4.0/pcap-linux.c
|
|||||||
|
|
||||||
if (sock_fd == -1) {
|
if (sock_fd == -1) {
|
||||||
if (errno == EINVAL || errno == EAFNOSUPPORT) {
|
if (errno == EINVAL || errno == EAFNOSUPPORT) {
|
||||||
@@ -2941,7 +2941,7 @@ activate_new(pcap_t *handle)
|
@@ -3147,7 +3147,7 @@ activate_new(pcap_t *handle)
|
||||||
"close: %s", pcap_strerror(errno));
|
"close: %s", pcap_strerror(errno));
|
||||||
return PCAP_ERROR;
|
return PCAP_ERROR;
|
||||||
}
|
}
|
||||||
@ -237,7 +237,7 @@ Index: libpcap-1.4.0/pcap-linux.c
|
|||||||
htons(ETH_P_ALL));
|
htons(ETH_P_ALL));
|
||||||
if (sock_fd == -1) {
|
if (sock_fd == -1) {
|
||||||
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
|
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
|
||||||
@@ -4988,7 +4988,7 @@ activate_old(pcap_t *handle)
|
@@ -5465,7 +5465,7 @@ activate_old(pcap_t *handle)
|
||||||
|
|
||||||
/* Open the socket */
|
/* Open the socket */
|
||||||
|
|
||||||
@ -246,11 +246,11 @@ Index: libpcap-1.4.0/pcap-linux.c
|
|||||||
if (handle->fd == -1) {
|
if (handle->fd == -1) {
|
||||||
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
|
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
|
||||||
"socket: %s", pcap_strerror(errno));
|
"socket: %s", pcap_strerror(errno));
|
||||||
Index: libpcap-1.4.0/pcap-netfilter-linux.c
|
Index: libpcap-1.5.2/pcap-netfilter-linux.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libpcap-1.4.0.orig/pcap-netfilter-linux.c 2013-02-21 03:51:49.000000000 +0000
|
--- libpcap-1.5.2.orig/pcap-netfilter-linux.c 2013-11-07 23:23:22.000000000 +0000
|
||||||
+++ libpcap-1.4.0/pcap-netfilter-linux.c 2013-09-13 20:17:59.000000000 +0100
|
+++ libpcap-1.5.2/pcap-netfilter-linux.c 2013-12-14 11:40:46.000000000 +0000
|
||||||
@@ -478,7 +478,7 @@ netfilter_activate(pcap_t* handle)
|
@@ -487,7 +487,7 @@ netfilter_activate(pcap_t* handle)
|
||||||
handle->stats_op = netfilter_stats_linux;
|
handle->stats_op = netfilter_stats_linux;
|
||||||
|
|
||||||
/* Create netlink socket */
|
/* Create netlink socket */
|
||||||
@ -259,8 +259,8 @@ Index: libpcap-1.4.0/pcap-netfilter-linux.c
|
|||||||
if (handle->fd < 0) {
|
if (handle->fd < 0) {
|
||||||
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "Can't create raw socket %d:%s", errno, pcap_strerror(errno));
|
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "Can't create raw socket %d:%s", errno, pcap_strerror(errno));
|
||||||
return PCAP_ERROR;
|
return PCAP_ERROR;
|
||||||
@@ -626,7 +626,7 @@ netfilter_findalldevs(pcap_if_t **alldev
|
@@ -634,7 +634,7 @@ netfilter_findalldevs(pcap_if_t **alldev
|
||||||
pcap_if_t *found_dev = *alldevsp;
|
{
|
||||||
int sock;
|
int sock;
|
||||||
|
|
||||||
- sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_NETFILTER);
|
- sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_NETFILTER);
|
||||||
@ -268,11 +268,11 @@ Index: libpcap-1.4.0/pcap-netfilter-linux.c
|
|||||||
if (sock < 0) {
|
if (sock < 0) {
|
||||||
/* if netlink is not supported this is not fatal */
|
/* if netlink is not supported this is not fatal */
|
||||||
if (errno == EAFNOSUPPORT || errno == EPROTONOSUPPORT)
|
if (errno == EAFNOSUPPORT || errno == EPROTONOSUPPORT)
|
||||||
Index: libpcap-1.4.0/pcap-nit.c
|
Index: libpcap-1.5.2/pcap-nit.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libpcap-1.4.0.orig/pcap-nit.c 2013-02-21 03:51:49.000000000 +0000
|
--- libpcap-1.5.2.orig/pcap-nit.c 2013-11-07 23:23:22.000000000 +0000
|
||||||
+++ libpcap-1.4.0/pcap-nit.c 2013-09-13 20:17:59.000000000 +0100
|
+++ libpcap-1.5.2/pcap-nit.c 2013-12-14 11:40:46.000000000 +0000
|
||||||
@@ -259,7 +259,7 @@ pcap_activate_nit(pcap_t *p)
|
@@ -282,7 +282,7 @@ pcap_activate_nit(pcap_t *p)
|
||||||
p->snapshot = 96;
|
p->snapshot = 96;
|
||||||
|
|
||||||
memset(p, 0, sizeof(*p));
|
memset(p, 0, sizeof(*p));
|
||||||
@ -281,11 +281,11 @@ Index: libpcap-1.4.0/pcap-nit.c
|
|||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
snprintf(p->errbuf, PCAP_ERRBUF_SIZE,
|
snprintf(p->errbuf, PCAP_ERRBUF_SIZE,
|
||||||
"socket: %s", pcap_strerror(errno));
|
"socket: %s", pcap_strerror(errno));
|
||||||
Index: libpcap-1.4.0/pcap-sita.c
|
Index: libpcap-1.5.2/pcap-sita.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libpcap-1.4.0.orig/pcap-sita.c 2013-02-21 03:51:49.000000000 +0000
|
--- libpcap-1.5.2.orig/pcap-sita.c 2013-11-07 23:23:22.000000000 +0000
|
||||||
+++ libpcap-1.4.0/pcap-sita.c 2013-09-13 20:17:59.000000000 +0100
|
+++ libpcap-1.5.2/pcap-sita.c 2013-12-14 11:40:46.000000000 +0000
|
||||||
@@ -329,7 +329,7 @@ static int open_with_IOP(unit_t *u, int
|
@@ -326,7 +326,7 @@ static int open_with_IOP(unit_t *u, int
|
||||||
u->serv_addr->sin_addr.s_addr = inet_addr(ip);
|
u->serv_addr->sin_addr.s_addr = inet_addr(ip);
|
||||||
u->serv_addr->sin_port = htons(IOP_SNIFFER_PORT);
|
u->serv_addr->sin_port = htons(IOP_SNIFFER_PORT);
|
||||||
|
|
||||||
@ -294,11 +294,11 @@ Index: libpcap-1.4.0/pcap-sita.c
|
|||||||
fprintf(stderr, "pcap can't open a socket for connecting to IOP at %s\n", ip);
|
fprintf(stderr, "pcap can't open a socket for connecting to IOP at %s\n", ip);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
Index: libpcap-1.4.0/pcap-snit.c
|
Index: libpcap-1.5.2/pcap-snit.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libpcap-1.4.0.orig/pcap-snit.c 2013-02-21 03:51:49.000000000 +0000
|
--- libpcap-1.5.2.orig/pcap-snit.c 2013-11-07 23:23:22.000000000 +0000
|
||||||
+++ libpcap-1.4.0/pcap-snit.c 2013-09-13 20:17:59.000000000 +0100
|
+++ libpcap-1.5.2/pcap-snit.c 2013-12-14 11:40:46.000000000 +0000
|
||||||
@@ -297,9 +297,9 @@ pcap_activate_snit(pcap_t *p)
|
@@ -321,9 +321,9 @@ pcap_activate_snit(pcap_t *p)
|
||||||
* the device in question) can be indicated at open
|
* the device in question) can be indicated at open
|
||||||
* time.
|
* time.
|
||||||
*/
|
*/
|
||||||
@ -310,11 +310,11 @@ Index: libpcap-1.4.0/pcap-snit.c
|
|||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "%s: %s", dev,
|
snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "%s: %s", dev,
|
||||||
pcap_strerror(errno));
|
pcap_strerror(errno));
|
||||||
Index: libpcap-1.4.0/pcap-snoop.c
|
Index: libpcap-1.5.2/pcap-snoop.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libpcap-1.4.0.orig/pcap-snoop.c 2013-02-21 03:51:49.000000000 +0000
|
--- libpcap-1.5.2.orig/pcap-snoop.c 2013-11-07 23:23:22.000000000 +0000
|
||||||
+++ libpcap-1.4.0/pcap-snoop.c 2013-09-13 20:17:59.000000000 +0100
|
+++ libpcap-1.5.2/pcap-snoop.c 2013-12-14 11:40:46.000000000 +0000
|
||||||
@@ -205,7 +205,7 @@ pcap_activate_snoop(pcap_t *p)
|
@@ -214,7 +214,7 @@ pcap_activate_snoop(pcap_t *p)
|
||||||
int snooplen;
|
int snooplen;
|
||||||
struct ifreq ifr;
|
struct ifreq ifr;
|
||||||
|
|
||||||
@ -323,11 +323,11 @@ Index: libpcap-1.4.0/pcap-snoop.c
|
|||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "snoop socket: %s",
|
snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "snoop socket: %s",
|
||||||
pcap_strerror(errno));
|
pcap_strerror(errno));
|
||||||
Index: libpcap-1.4.0/pcap-usb-linux.c
|
Index: libpcap-1.5.2/pcap-usb-linux.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libpcap-1.4.0.orig/pcap-usb-linux.c 2013-02-21 03:51:49.000000000 +0000
|
--- libpcap-1.5.2.orig/pcap-usb-linux.c 2013-11-07 23:23:22.000000000 +0000
|
||||||
+++ libpcap-1.4.0/pcap-usb-linux.c 2013-09-13 20:17:59.000000000 +0100
|
+++ libpcap-1.5.2/pcap-usb-linux.c 2013-12-14 11:43:09.000000000 +0000
|
||||||
@@ -252,7 +252,7 @@ probe_devices(int bus)
|
@@ -263,7 +263,7 @@ probe_devices(int bus)
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "/dev/bus/usb/%03d/%s", bus, data->d_name);
|
snprintf(buf, sizeof(buf), "/dev/bus/usb/%03d/%s", bus, data->d_name);
|
||||||
|
|
||||||
@ -336,56 +336,56 @@ Index: libpcap-1.4.0/pcap-usb-linux.c
|
|||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@@ -353,7 +353,7 @@ usb_activate(pcap_t* handle)
|
@@ -365,7 +365,7 @@ usb_activate(pcap_t* handle)
|
||||||
|
|
||||||
/*now select the read method: try to open binary interface */
|
/*now select the read method: try to open binary interface */
|
||||||
snprintf(full_path, USB_LINE_LEN, LINUX_USB_MON_DEV"%d", handle->md.ifindex);
|
snprintf(full_path, USB_LINE_LEN, LINUX_USB_MON_DEV"%d", handlep->bus_index);
|
||||||
- handle->fd = open(full_path, O_RDONLY, 0);
|
- handle->fd = open(full_path, O_RDONLY, 0);
|
||||||
+ handle->fd = open(full_path, O_RDONLY|O_CLOEXEC, 0);
|
+ handle->fd = open(full_path, O_RDONLY|O_CLOEXEC, 0);
|
||||||
if (handle->fd >= 0)
|
if (handle->fd >= 0)
|
||||||
{
|
{
|
||||||
if (handle->opt.rfmon) {
|
if (handle->opt.rfmon) {
|
||||||
@@ -388,7 +388,7 @@ usb_activate(pcap_t* handle)
|
@@ -400,7 +400,7 @@ usb_activate(pcap_t* handle)
|
||||||
else {
|
else {
|
||||||
/*Binary interface not available, try open text interface */
|
/*Binary interface not available, try open text interface */
|
||||||
snprintf(full_path, USB_LINE_LEN, USB_TEXT_DIR"/%dt", handle->md.ifindex);
|
snprintf(full_path, USB_LINE_LEN, USB_TEXT_DIR"/%dt", handlep->bus_index);
|
||||||
- handle->fd = open(full_path, O_RDONLY, 0);
|
- handle->fd = open(full_path, O_RDONLY, 0);
|
||||||
+ handle->fd = open(full_path, O_RDONLY|O_CLOEXEC, 0);
|
+ handle->fd = open(full_path, O_RDONLY|O_CLOEXEC, 0);
|
||||||
if (handle->fd < 0)
|
if (handle->fd < 0)
|
||||||
{
|
{
|
||||||
if (errno == ENOENT)
|
if (errno == ENOENT)
|
||||||
@@ -398,7 +398,7 @@ usb_activate(pcap_t* handle)
|
@@ -410,7 +410,7 @@ usb_activate(pcap_t* handle)
|
||||||
* the old location.
|
* the old location.
|
||||||
*/
|
*/
|
||||||
snprintf(full_path, USB_LINE_LEN, USB_TEXT_DIR_OLD"/%dt", handle->md.ifindex);
|
snprintf(full_path, USB_LINE_LEN, USB_TEXT_DIR_OLD"/%dt", handlep->bus_index);
|
||||||
- handle->fd = open(full_path, O_RDONLY, 0);
|
- handle->fd = open(full_path, O_RDONLY, 0);
|
||||||
+ handle->fd = open(full_path, O_RDONLY|O_CLOEXEC, 0);
|
+ handle->fd = open(full_path, O_RDONLY|O_CLOEXEC, 0);
|
||||||
}
|
}
|
||||||
if (handle->fd < 0) {
|
if (handle->fd < 0) {
|
||||||
/* no more fallback, give it up*/
|
/* no more fallback, give it up*/
|
||||||
@@ -664,7 +664,7 @@ usb_stats_linux(pcap_t *handle, struct p
|
@@ -678,7 +678,7 @@ usb_stats_linux(pcap_t *handle, struct p
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
snprintf(string, USB_LINE_LEN, USB_TEXT_DIR"/%ds", handle->md.ifindex);
|
snprintf(string, USB_LINE_LEN, USB_TEXT_DIR"/%ds", handlep->bus_index);
|
||||||
- fd = open(string, O_RDONLY, 0);
|
- fd = open(string, O_RDONLY, 0);
|
||||||
+ fd = open(string, O_RDONLY|O_CLOEXEC, 0);
|
+ fd = open(string, O_RDONLY|O_CLOEXEC, 0);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
{
|
{
|
||||||
if (errno == ENOENT)
|
if (errno == ENOENT)
|
||||||
@@ -674,7 +674,7 @@ usb_stats_linux(pcap_t *handle, struct p
|
@@ -688,7 +688,7 @@ usb_stats_linux(pcap_t *handle, struct p
|
||||||
* location.
|
* location.
|
||||||
*/
|
*/
|
||||||
snprintf(string, USB_LINE_LEN, USB_TEXT_DIR_OLD"/%ds", handle->md.ifindex);
|
snprintf(string, USB_LINE_LEN, USB_TEXT_DIR_OLD"/%ds", handlep->bus_index);
|
||||||
- fd = open(string, O_RDONLY, 0);
|
- fd = open(string, O_RDONLY, 0);
|
||||||
+ fd = open(string, O_RDONLY|O_CLOEXEC, 0);
|
+ fd = open(string, O_RDONLY|O_CLOEXEC, 0);
|
||||||
}
|
}
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
|
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
|
||||||
Index: libpcap-1.4.0/savefile.c
|
Index: libpcap-1.5.2/savefile.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libpcap-1.4.0.orig/savefile.c 2013-02-21 03:51:49.000000000 +0000
|
--- libpcap-1.5.2.orig/savefile.c 2013-11-07 23:23:22.000000000 +0000
|
||||||
+++ libpcap-1.4.0/savefile.c 2013-09-13 20:17:59.000000000 +0100
|
+++ libpcap-1.5.2/savefile.c 2013-12-14 11:40:46.000000000 +0000
|
||||||
@@ -189,7 +189,7 @@ pcap_open_offline(const char *fname, cha
|
@@ -190,7 +190,7 @@ pcap_open_offline_with_tstamp_precision(
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
#if !defined(WIN32) && !defined(MSDOS)
|
#if !defined(WIN32) && !defined(MSDOS)
|
||||||
@ -394,11 +394,11 @@ Index: libpcap-1.4.0/savefile.c
|
|||||||
#else
|
#else
|
||||||
fp = fopen(fname, "rb");
|
fp = fopen(fname, "rb");
|
||||||
#endif
|
#endif
|
||||||
Index: libpcap-1.4.0/sf-pcap.c
|
Index: libpcap-1.5.2/sf-pcap.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libpcap-1.4.0.orig/sf-pcap.c 2013-02-21 03:51:49.000000000 +0000
|
--- libpcap-1.5.2.orig/sf-pcap.c 2013-11-07 23:23:22.000000000 +0000
|
||||||
+++ libpcap-1.4.0/sf-pcap.c 2013-09-13 20:17:59.000000000 +0100
|
+++ libpcap-1.5.2/sf-pcap.c 2013-12-14 11:40:46.000000000 +0000
|
||||||
@@ -550,7 +550,7 @@ pcap_dump_open(pcap_t *p, const char *fn
|
@@ -679,7 +679,7 @@ pcap_dump_open(pcap_t *p, const char *fn
|
||||||
fname = "standard output";
|
fname = "standard output";
|
||||||
} else {
|
} else {
|
||||||
#if !defined(WIN32) && !defined(MSDOS)
|
#if !defined(WIN32) && !defined(MSDOS)
|
||||||
|
@ -1,3 +1,24 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Dec 14 12:08:46 UTC 2013 - andreas.stieger@gmx.de
|
||||||
|
|
||||||
|
- update to 1.5.2
|
||||||
|
Version 1.5.0 revised for non-code related edits Version,
|
||||||
|
1.5.1 revised for for interop against Linux 3.1.0
|
||||||
|
* TPACKET_V3 support added for Linux
|
||||||
|
* Point users to the the-tcpdump-group repository on GitHub
|
||||||
|
rather than the mcr repository
|
||||||
|
* Checks added for malloc()/realloc()/etc. failures
|
||||||
|
* Support filtering filtering E1 SS7 traffic on MTP2 layer Annex A
|
||||||
|
* Use "ln -s" to link man pages by default
|
||||||
|
* Added pcap_open_dead_with_tstamp_precision API interface.
|
||||||
|
* Many changes to autoconf to deal better with non-GCC compilers
|
||||||
|
added many new DLT types
|
||||||
|
- require pkg-config for devel library support detection
|
||||||
|
- add support for D-Bus capture
|
||||||
|
- modified patches for upstream changes:
|
||||||
|
* libpcap-ocloexec.patch
|
||||||
|
* libpcap-1.0.0-filter-fix.patch to libpcap-1.5.2-filter-fix.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Sep 13 19:35:02 UTC 2013 - andreas.stieger@gmx.de
|
Fri Sep 13 19:35:02 UTC 2013 - andreas.stieger@gmx.de
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: libpcap
|
Name: libpcap
|
||||||
Version: 1.4.0
|
Version: 1.5.2
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A Library for Network Sniffers
|
Summary: A Library for Network Sniffers
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
@ -27,7 +27,7 @@ Source: http://www.tcpdump.org/release/%{name}-%{version}.tar.gz
|
|||||||
Source2: baselibs.conf
|
Source2: baselibs.conf
|
||||||
Source3: http://www.tcpdump.org/tcpdump-workers.asc#/%{name}.keyring
|
Source3: http://www.tcpdump.org/tcpdump-workers.asc#/%{name}.keyring
|
||||||
Source4: http://www.tcpdump.org/release/%{name}-%{version}.tar.gz.sig
|
Source4: http://www.tcpdump.org/release/%{name}-%{version}.tar.gz.sig
|
||||||
Patch0: libpcap-1.0.0-filter-fix.patch
|
Patch0: libpcap-1.5.2-filter-fix.patch
|
||||||
Patch1: libpcap-1.0.0-pcap-bpf.patch
|
Patch1: libpcap-1.0.0-pcap-bpf.patch
|
||||||
Patch2: libpcap-1.0.0-ppp.patch
|
Patch2: libpcap-1.0.0-ppp.patch
|
||||||
Patch3: libpcap-1.0.0-s390.patch
|
Patch3: libpcap-1.0.0-s390.patch
|
||||||
@ -35,8 +35,10 @@ Patch4: libpcap-ocloexec.patch
|
|||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: bluez-devel
|
BuildRequires: bluez-devel
|
||||||
|
BuildRequires: dbus-1-devel
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: libusb-devel
|
BuildRequires: libusb-devel
|
||||||
|
BuildRequires: pkg-config
|
||||||
%if %{?suse_version} >= 1210
|
%if %{?suse_version} >= 1210
|
||||||
BuildRequires: libnl3-devel
|
BuildRequires: libnl3-devel
|
||||||
%endif
|
%endif
|
||||||
@ -89,7 +91,7 @@ program yourself.
|
|||||||
%prep
|
%prep
|
||||||
%{?gpg_verify: %gpg_verify %{S:4}}
|
%{?gpg_verify: %gpg_verify %{S:4}}
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0
|
%patch0 -p1
|
||||||
%patch1
|
%patch1
|
||||||
%patch2
|
%patch2
|
||||||
%patch3
|
%patch3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user