Bug 842660 - Arpwatch may not start if no interface is specified
Summary: Arpwatch may not start if no interface is specified
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: arpwatch
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Jan Synacek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-24 11:52 UTC by Jan Synacek
Modified: 2013-01-18 20:27 UTC (History)
2 users (show)

Fixed In Version: arpwatch-2.1a15-22.fc18
Clone Of:
Environment:
Last Closed: 2012-07-24 12:13:51 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
[Patch] find suitable default interface (3.25 KB, patch)
2012-07-24 11:52 UTC, Jan Synacek
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 834325 1 None None None 2021-01-20 06:05:38 UTC

Internal Links: 834325

Description Jan Synacek 2012-07-24 11:52:10 UTC
Created attachment 599990 [details]
[Patch] find suitable default interface

Description of problem:

This issue is not interface specific, but depends on what libpcap sees as monitorable devices.

If no device is specified when arpwatch is executed, pcap_lookupdev() is called. That returns the first device in the list of libpcap monitorable devices.

For example, the list on my Fedora 17 box looks like this:
 virbr0
 bluetooth0
 nflog
 em1
 virbr1
 usbmon1
 usbmon2

In my case, "virbr0" is supplied to arpwatch as the first interface from the list. But on some machines, e.g. "usbmon1" can be first and then arpwatch fails to start.


Version-Release number of selected component (if applicable):
arpwatch-2.1a15-21

How reproducible:
Always (on the right machine)


Steps to Reproduce:
1. # arpwatch -d
2. # tail /var/log/messages
3. observe arpwatch error (see additional info)
  
Actual results:
arpwatch uses only the first device and fails, if it is not ethernet or fddi, but never tries additional devices in the list


Expected results:
arpwatch searches for suitable default device when no -i is specified


Additional info:
# cat /var/log/message:
...
Jun 21 10:28:16 myhost arpwatch: Link layer type 220 not ethernet or fddi
...

Comment 3 Fedora Update System 2012-10-15 15:52:14 UTC
arpwatch-2.1a15-25.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/arpwatch-2.1a15-25.fc18

Comment 4 Ales Ledvinka 2012-10-16 10:43:22 UTC
the last 2 patches are need for f18 only. f17 works ok.

Comment 5 Fedora Update System 2013-01-18 20:27:43 UTC
arpwatch-2.1a15-25.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.