fix -i with invalid interface specified

This commit is contained in:
Ales Ledvinka 2012-10-15 17:11:25 +02:00
commit 12acff196f
2 changed files with 18 additions and 1 deletions

View file

@ -0,0 +1,12 @@
diff -up ./arpwatch.c.iinval ./arpwatch.c
--- ./arpwatch.c.iinval 2012-10-15 16:55:58.646218256 +0200
+++ ./arpwatch.c 2012-10-15 17:04:30.566199946 +0200
@@ -171,7 +171,7 @@ try_dev(char *interface, pcap_t **pd, in
timeout = 1000;
*pd = pcap_open_live(interface, snaplen, 1, timeout, errbuf);
- if (NULL == pd) {
+ if (NULL == *pd) {
syslog(LOG_ERR, "pcap open %s: %s", interface, errbuf);
return NULL;
}

View file

@ -3,7 +3,7 @@
Name: arpwatch
Epoch: 14
Version: 2.1a15
Release: 24%{?dist}
Release: 25%{?dist}
Summary: Network monitoring tools for tracking IP addresses on a network
Group: Applications/System
License: BSD with advertising
@ -36,6 +36,7 @@ Patch11: arpwatch-exitcode.patch
Patch12: arpwatch-2.1a15-dropgroup.patch
Patch13: arpwatch-2.1a15-devlookup.patch
Patch14: arpwatch-2.1a15-lookupiselect.patch
Patch15: arpwatch-2.1a15-lookupiinvalid.patch
%description
The arpwatch package contains arpwatch and arpsnmp. Arpwatch and
@ -64,6 +65,7 @@ network.
%patch12 -p1 -b .dropgroup
%patch13 -p1 -b .devlookup
%patch14 -p1 -b .iselect
%patch15 -p1 -b .iinval
%build
%configure
@ -141,6 +143,9 @@ fi
%attr(-,arpwatch,arpwatch) %verify(not md5 size mtime) %config(noreplace) %{_vararpwatch}/ethercodes.dat
%changelog
* Mon Oct 15 2012 Ales Ledvinka <aledvink@redhat.com> - 14:2.1a15-25
- fix -i with invalid interface specified (#842660)
* Mon Oct 15 2012 Ales Ledvinka <aledvink@redhat.com> - 14:2.1a15-24
- fix devlookup to start with -i interface specified (#842660)