From: Ricardo <rjpp@mega.ist.utl.pt>
To: linux-kernel@vger.kernel.org
Subject: socket() datalink bug
Date: Thu, 20 Mar 2003 17:01:20 +0000 (WET) [thread overview]
Message-ID: <Pine.GSO.4.44.0303201640410.4714-100000@mega> (raw)
This was found while experimenting with a sniffer, so I have IFF_PROMISC
set when doing the recv(). And my kernel is a 2.4.19-gentoo-r9, but a
normal 2.4.18 from slackware 8.1 has the same behavior.
socket(PF_PACKET,SOCK_RAW,htons(ETH_P_IP));
Does not return a copy of the packets send by the computer you are on. It
returns the IP traffic that other people send normally. So the sniffer
can't see packets from the computer it is running on. This shouldn't be so
as htons(ETH_P_IP) should only be a filter that would return IP only
packets.
socket(PF_PACKET,SOCK_RAW,htons(ETH_P_ALL));
Works just fine, so I think the filter is excluding too much.
Or isn't it a bug?
Please Cc it to me as I haven't subscribed the mailing list.
reply other threads:[~2003-03-20 16:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.GSO.4.44.0303201640410.4714-100000@mega \
--to=rjpp@mega.ist.utl.pt \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®