Bug 78808

Summary: inappropriate bogon messages with -n flag
Product: [Retired] Red Hat Linux Reporter: Need Real Name <jamesm>
Component: tcpdumpAssignee: Harald Hoyer <harald>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-12-01 01:04:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Need Real Name 2002-12-01 01:03:54 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

Description of problem:
Running arpwatch with the -n flag still gives me bogon messages.
The -n flag doesn't seem to work as advertized.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. arpwatch -d -n 123.123.123.0/8


Actual Results:  arpwatch: bogon 123.123.123.123 0:xx:xx:xx:xx:xx


Expected Results:  No bogon messages for an address in the additional networks

Additional info:

arpwatch.c:774 checks for bogons:
   if ((sia & np->netmask) == np->net)
       return 0;

with -n 123.123.123.0/8 and a packet from 123.123.123.123, the variables I see are:

  sia:         0x7B7B7B7B
  np->netmask: 0x000000FF
  np->net:     0x007B7B7B

np->netmask seems to have the wrong byte order.

Comment 1 Need Real Name 2002-12-01 01:17:08 UTC
Okay, I've just realized that I'm an idiot.  I wanted 123.123.123.0/24, not /8...

arpwatch works fine if I give it correct input.