Bug 842660 - Arpwatch may not start if no interface is specified
Arpwatch may not start if no interface is specified
Product: Fedora
Classification: Fedora
Component: arpwatch (Show other bugs)
Unspecified Linux
unspecified Severity low
: ---
: ---
Assigned To: Jan Synacek
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-07-24 07:52 EDT by Jan Synacek
Modified: 2013-01-18 15:27 EST (History)
2 users (show)

See Also:
Fixed In Version: arpwatch-2.1a15-22.fc18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-07-24 08:13:51 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Jan Synacek 2012-07-24 07:52:10 EDT
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:

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):

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 11:52:14 EDT
arpwatch-2.1a15-25.fc18 has been submitted as an update for Fedora 18.
Comment 4 Ales Ledvinka 2012-10-16 06:43:22 EDT
the last 2 patches are need for f18 only. f17 works ok.
Comment 5 Fedora Update System 2013-01-18 15:27:43 EST
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.