Accepting request 70085 from home:cyliu:branches:Base:System
fix bug #674278. (This fix already included in upstream libpcap.) OBS-URL: https://build.opensuse.org/request/show/70085 OBS-URL: https://build.opensuse.org/package/show/Base:System/libpcap?expand=0&rev=14
This commit is contained in:
parent
0af25bcefd
commit
d7bfe13d00
22
libpcap-1.1.1-scanif.patch
Normal file
22
libpcap-1.1.1-scanif.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
pcap_findalldevs was failing when use bonding device.
|
||||||
|
|
||||||
|
In /sys/class/net, there are these for bonding:
|
||||||
|
drwxr-xr-x 4 root root 0 Apr 27 16:12 bond0
|
||||||
|
-rw-r--r-- 1 root root 4096 Apr 27 16:11 bonding_masters
|
||||||
|
|
||||||
|
When scan_sys_class_net encounters the bonding_masters file, the ioctl below fails with "no device".
|
||||||
|
|
||||||
|
This patch fixes it.
|
||||||
|
Index: pcap-linux.c
|
||||||
|
===================================================================
|
||||||
|
--- pcap-linux.c
|
||||||
|
+++ pcap-linux.c
|
||||||
|
@@ -1883,7 +1883,7 @@ scan_sys_class_net(pcap_if_t **devlistp,
|
||||||
|
*/
|
||||||
|
strncpy(ifrflags.ifr_name, name, sizeof(ifrflags.ifr_name));
|
||||||
|
if (ioctl(fd, SIOCGIFFLAGS, (char *)&ifrflags) < 0) {
|
||||||
|
- if (errno == ENXIO)
|
||||||
|
+ if (errno == ENXIO || errno == ENODEV)
|
||||||
|
continue;
|
||||||
|
(void)snprintf(errbuf, PCAP_ERRBUF_SIZE,
|
||||||
|
"SIOCGIFFLAGS: %.*s: %s",
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 14 14:19:41 CST 2011 - cyliu@novell.com
|
||||||
|
- fix bug#674278: pcap_findalldevs error with bonding device
|
||||||
|
libpcap-1.1.1-scanif.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Apr 6 08:19:41 UTC 2010 - puzel@novell.com
|
Tue Apr 6 08:19:41 UTC 2010 - puzel@novell.com
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@ Patch3: libpcap-1.0.0-ppp.patch
|
|||||||
Patch4: libpcap-1.0.0-s390.patch
|
Patch4: libpcap-1.0.0-s390.patch
|
||||||
Patch5: libpcap-1.0.0-man.patch
|
Patch5: libpcap-1.0.0-man.patch
|
||||||
Patch6: libpcap-1.0.0-mac_syntax.patch
|
Patch6: libpcap-1.0.0-mac_syntax.patch
|
||||||
|
Patch7: libpcap-1.1.1-scanif.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: bluez-devel
|
BuildRequires: bluez-devel
|
||||||
@ -131,6 +132,7 @@ Authors:
|
|||||||
%patch4
|
%patch4
|
||||||
%patch5
|
%patch5
|
||||||
%patch6
|
%patch6
|
||||||
|
%patch7
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%ifarch %sparc
|
%ifarch %sparc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user