Bug 164329 - ip broadcast filter doesn't check network field
ip broadcast filter doesn't check network field
Product: Fedora
Classification: Fedora
Component: tcpdump (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Martin Stransky
Depends On:
  Show dependency treegraph
Reported: 2005-07-26 18:41 EDT by Kenneth Porter
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-09-01 06:51:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Kenneth Porter 2005-07-26 18:41:29 EDT
Using tcpdump-3.9.1-1.src.rpm.

Using "ip broadcast" as a filter on an aliased interface fails because the
network part of the address is not checked for a match. For instance, here's an
invocation using a /24 setup:

[root@segw ken]# tcpdump -i eth1:1 ip broadcast -d -O
(000) ldh      [12]
(001) jeq      #0x800           jt 2    jf 9
(002) ld       [30]
(003) and      #0xff000000
(004) jeq      #0x0             jt 8    jf 5
(005) ld       [30]
(006) and      #0xff000000
(007) jeq      #0xff000000      jt 8    jf 9
(008) ret      #96
(009) ret      #0

Note how the host field is checked for all-zeroes and all-ones, but the network
field is not matched against the interface's configured address. This causes
lots of false positives on an unswitched network.
Comment 1 Martin Stransky 2005-09-01 06:51:51 EDT
In this case, you're using netmask If it isn't the correct one
(probably because libpcap can't obtain correct netmask from aliased interface),
you have to specify it with the "net" directive (see man tcpdump) instead the
"ip broadcast". If locally broadcasted packet goes to other subnets, it's a bug
in routing.

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