From: David Miller <davem@davemloft.net>
To: morgon.j.kanter@dartmouth.edu
Cc: netdev@vger.kernel.org
Subject: Re: PROBLEM: raw sockets rewriting IP ID in rare cases.
Date: Sat, 14 Aug 2010 22:35:32 -0700 (PDT) [thread overview]
Message-ID: <20100814.223532.242143460.davem@davemloft.net> (raw)
In-Reply-To: <201008131307.38381.morgon.j.kanter@dartmouth.edu>
From: "Morgon J. Kanter" <morgon.j.kanter@dartmouth.edu>
Date: Fri, 13 Aug 2010 13:07:38 -0400
> I have stumbled across what I think is a rare bug in the raw socket mechanism
> of the kernel. When attempting to send a certain packet with an IP ID of zero
> from a raw socket created with the call "socket(AF_INET, SOCK_RAW,
> IPPROTO_RAW)", the kernel will modify the IP ID field and update the checksum.
> It only seems to do it with this specific packet for some reason, similar
> packets with an IP ID of zero do not get so mangled.
Even when using hdrinclude mode of RAW ipv4 sockets, if you specify
a zero ID field, the kernel will fill it in with the usual value.
It is expected behavior.
If you want the kernel to leave your ID field alone, provide a
non-zero one.
next prev parent reply other threads:[~2010-08-15 5:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-13 17:07 PROBLEM: raw sockets rewriting IP ID in rare cases Morgon J. Kanter
2010-08-15 5:35 ` David Miller [this message]
2010-08-15 17:57 ` Morgon.J.Kanter
2010-08-15 20:13 ` David Miller
2010-08-15 20:47 ` Eric Dumazet
2010-08-16 0:43 ` Morgon.J.Kanter
2010-08-16 6:26 ` Eric Dumazet
2010-08-16 6:50 ` Jiri Olsa
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=20100814.223532.242143460.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=morgon.j.kanter@dartmouth.edu \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).