Hello community,

here is the log from the commit of package libpcap for openSUSE:Factory checked 
in at 2015-04-28 20:42:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libpcap (Old)
 and      /work/SRC/openSUSE:Factory/.libpcap.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libpcap"

Changes:
--------
--- /work/SRC/openSUSE:Factory/libpcap/libpcap.changes  2015-03-16 
06:53:28.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.libpcap.new/libpcap.changes     2015-04-28 
20:42:59.000000000 +0200
@@ -1,0 +2,6 @@
+Sun Apr 26 18:55:17 UTC 2015 - astie...@suse.com
+
+- libpcap 1.7.3:
+  * work around a Linux bonding driver bug.
+
+-------------------------------------------------------------------

Old:
----
  libpcap-1.7.2.tar.gz
  libpcap-1.7.2.tar.gz.sig

New:
----
  libpcap-1.7.3.tar.gz
  libpcap-1.7.3.tar.gz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libpcap.spec ++++++
--- /var/tmp/diff_new_pack.LCAzkS/_old  2015-04-28 20:43:00.000000000 +0200
+++ /var/tmp/diff_new_pack.LCAzkS/_new  2015-04-28 20:43:00.000000000 +0200
@@ -20,7 +20,7 @@
 %bcond_with    bluetooth
 
 Name:           libpcap
-Version:        1.7.2
+Version:        1.7.3
 Release:        0
 Summary:        A Library for Network Sniffers
 License:        BSD-3-Clause

++++++ libpcap-1.7.2.tar.gz -> libpcap-1.7.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libpcap-1.7.2/CHANGES new/libpcap-1.7.3/CHANGES
--- old/libpcap-1.7.2/CHANGES   2015-03-09 20:22:07.000000000 +0100
+++ new/libpcap-1.7.3/CHANGES   2015-04-22 22:19:15.000000000 +0200
@@ -1,15 +1,27 @@
+Friday Apr. 10, 2015 g...@alum.mit.edu
+  Summary for 1.7.3 libpcap release
+       Work around a Linux bonding driver bug.
+
 Thursday Feb. 12, 2015 g...@alum.mit.edu/m...@sandelman.ca
-  Summary for 1.8.0 libpcap release
+  Summary for 1.7.2 libpcap release
        Support for filtering Geneve encapsulated packets.
+       Generalize encapsulation handling, fixing some bugs.
+       Don't add null addresses to address lists.
+       Add pcap_dump_open_append() to open for appending.
+       Fix the swapping of isochronous descriptors in Linux USB.
+       Attempt to handle TPACKET_V1 with 32-bit userland and 64-bit kernel.
 
 Wednesday Nov. 12, 2014 g...@alum.mit.edu/m...@sandelman.ca
   Summary for 1.7.0 libpcap release
        Fix handling of zones for BPF on Solaris
        new DLT for ZWAVE
        clarifications for read timeouts.
-       added bpf_filter1() with extensions
+       Use BPF extensions in compiled filters, fixing VLAN filters
        some fixes to compilation without stdint.h
        EBUSY can now be returned by SNFv3 code.
+       Fix the range checks in BPF loads
+       Various DAG fixes.
+       Various Linux fixes.
 
 Monday Aug. 12, 2014 g...@alum.mit.edu
   Summary for 1.6.2 libpcap release
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libpcap-1.7.2/VERSION new/libpcap-1.7.3/VERSION
--- old/libpcap-1.7.2/VERSION   2015-03-09 20:23:05.000000000 +0100
+++ new/libpcap-1.7.3/VERSION   2015-04-22 22:19:15.000000000 +0200
@@ -1 +1 @@
-1.7.2
+1.7.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libpcap-1.7.2/config.h.in 
new/libpcap-1.7.3/config.h.in
--- old/libpcap-1.7.2/config.h.in       2015-03-09 20:22:07.000000000 +0100
+++ new/libpcap-1.7.3/config.h.in       2015-04-22 22:19:15.000000000 +0200
@@ -76,12 +76,18 @@
 /* Define to 1 if you have the <linux/ethtool.h> header file. */
 #undef HAVE_LINUX_ETHTOOL_H
 
+/* Define to 1 if you have the <linux/if_bonding.h> header file. */
+#undef HAVE_LINUX_IF_BONDING_H
+
 /* Define to 1 if you have the <linux/if_packet.h> header file. */
 #undef HAVE_LINUX_IF_PACKET_H
 
 /* Define to 1 if you have the <linux/net_tstamp.h> header file. */
 #undef HAVE_LINUX_NET_TSTAMP_H
 
+/* Define to 1 if you have the <linux/sockios.h> header file. */
+#undef HAVE_LINUX_SOCKIOS_H
+
 /* if tp_vlan_tci exists */
 #undef HAVE_LINUX_TPACKET_AUXDATA_TP_VLAN_TCI
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libpcap-1.7.2/configure new/libpcap-1.7.3/configure
--- old/libpcap-1.7.2/configure 2015-03-09 20:22:07.000000000 +0100
+++ new/libpcap-1.7.3/configure 2015-04-22 22:19:15.000000000 +0200
@@ -4710,6 +4710,28 @@
 
 fi
 
+case "$host_os" in
+linux*)
+       for ac_header in linux/sockios.h linux/if_bonding.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
+#include <sys/socket.h>
+#include <linux/if.h>
+
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+       ;;
+esac
+
 if test "$GCC" = yes ; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI ioctl 
definitions" >&5
 $as_echo_n "checking for ANSI ioctl definitions... " >&6; }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libpcap-1.7.2/configure.in 
new/libpcap-1.7.3/configure.in
--- old/libpcap-1.7.2/configure.in      2015-03-09 20:22:07.000000000 +0100
+++ new/libpcap-1.7.3/configure.in      2015-04-22 22:19:15.000000000 +0200
@@ -148,6 +148,16 @@
 #include <net/if.h>])
 fi
 
+case "$host_os" in
+linux*)
+       AC_CHECK_HEADERS(linux/sockios.h linux/if_bonding.h,,,
+       [
+#include <sys/socket.h>
+#include <linux/if.h>
+       ])
+       ;;
+esac
+
 AC_LBL_FIXINCLUDES
 
 AC_CHECK_FUNCS(strerror strlcpy)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libpcap-1.7.2/pcap-linux.c 
new/libpcap-1.7.3/pcap-linux.c
--- old/libpcap-1.7.2/pcap-linux.c      2015-03-09 20:22:46.000000000 +0100
+++ new/libpcap-1.7.3/pcap-linux.c      2015-04-22 22:19:15.000000000 +0200
@@ -215,6 +215,14 @@
 #include <linux/net_tstamp.h>
 #endif
 
+#ifdef HAVE_LINUX_SOCKIOS_H
+#include <linux/sockios.h>
+#endif
+
+#ifdef HAVE_LINUX_IF_BONDING_H
+#include <linux/if_bonding.h>
+#endif
+
 /*
  * Got Wireless Extensions?
  */
@@ -934,6 +942,41 @@
 }
 #endif /* HAVE_LIBNL */
 
+#ifdef IW_MODE_MONITOR
+/*
+ * Bonding devices mishandle unknown ioctls; they fail with ENODEV
+ * rather than ENOTSUP, EOPNOTSUPP, or ENOTTY, so Wireless Extensions
+ * will fail with ENODEV if we try to do them on a bonding device,
+ * making us return a "no such device" indication rather than just
+ * saying "no Wireless Extensions".
+ *
+ * So we check for bonding devices, if we can, before trying those
+ * ioctls, by trying a bonding device information query ioctl to see
+ * whether it succeeds.
+ */
+static int
+is_bonding_device(int fd, const char *device)
+{
+#if defined(BOND_INFO_QUERY_OLD) || defined(SIOCBONDINFOQUERY)
+       struct ifreq ifr;
+       ifbond ifb;
+
+       memset(&ifr, 0, sizeof ifr);
+       strlcpy(ifr.ifr_name, device, sizeof ifr.ifr_name);
+       memset(&ifb, 0, sizeof ifb);
+       ifr.ifr_data = (caddr_t)&ifb;
+#ifdef SIOCBONDINFOQUERY
+       if (ioctl(fd, SIOCBONDINFOQUERY, &ifr) == 0)
+#else /* SIOCBONDINFOQUERY */
+       if (ioctl(fd, BOND_INFO_QUERY_OLD, &ifr) == 0)
+#endif /* SIOCBONDINFOQUERY */
+               return 1;       /* success, so it's a bonding device */
+#endif /* defined(BOND_INFO_QUERY_OLD) || defined(SIOCBONDINFOQUERY) */
+
+       return 0;       /* no, it's not a bonding device */
+}
+#endif /* IW_MODE_MONITOR */
+
 static int
 pcap_can_set_rfmon_linux(pcap_t *handle)
 {
@@ -992,6 +1035,12 @@
                return PCAP_ERROR;
        }
 
+       if (is_bonding_device(sock_fd, handle->opt.source)) {
+               /* It's a bonding device, so don't even try. */
+               close(sock_fd);
+               return 0;
+       }
+
        /*
         * Attempt to get the current mode.
         */
@@ -5066,12 +5115,15 @@
 {
        struct iwreq ireq;
 
+       if (is_bonding_device(sock_fd, device))
+               return 0;       /* bonding device, so don't even try */
+
        strlcpy(ireq.ifr_ifrn.ifrn_name, device,
            sizeof ireq.ifr_ifrn.ifrn_name);
        if (ioctl(sock_fd, SIOCGIWNAME, &ireq) >= 0)
                return 1;       /* yes */
        snprintf(ebuf, PCAP_ERRBUF_SIZE,
-           "%s: SIOCGIWPRIV: %s", device, pcap_strerror(errno));
+           "%s: SIOCGIWNAME: %s", device, pcap_strerror(errno));
        if (errno == ENODEV)
                return PCAP_ERROR_NO_SUCH_DEVICE;
        return 0;



Reply via email to