Red Hat Bugzilla – Bug 842660
Arpwatch may not start if no interface is specified
Last modified: 2013-01-18 15:27:43 EST
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):
Always (on the right machine)
Steps to Reproduce:
1. # arpwatch -d
2. # tail /var/log/messages
3. observe arpwatch error (see additional info)
arpwatch uses only the first device and fails, if it is not ethernet or fddi, but never tries additional devices in the list
arpwatch searches for suitable default device when no -i is specified
# cat /var/log/message:
Jun 21 10:28:16 myhost arpwatch: Link layer type 220 not ethernet or fddi
reopened/reclosed to fix invalid startup with -i parameter and with invalid -i parameter.
arpwatch-2.1a15-25.fc18 has been submitted as an update for Fedora 18.
the last 2 patches are need for f18 only. f17 works ok.
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.