From: Eric Dumazet <eric.dumazet@gmail.com>
To: Torsten Schmidt <torsten.schmidt@s2006.tu-chemnitz.de>
Cc: Linux Netdev List <netdev@vger.kernel.org>
Subject: Re: [PATCH] IPv4: skip loopback checksums in ip_rcv()
Date: Mon, 19 Oct 2009 23:10:57 +0200 [thread overview]
Message-ID: <4ADCD5E1.7060400@gmail.com> (raw)
In-Reply-To: <200910192256.52780.schmto@hrz.tu-chemnitz.de>
Torsten Schmidt a écrit :
> Eric Dumazet wrotes:
>> This is bogus IMHO.
>>
>> One bit could be corrupted in iph, and ntohl(iph->daddr) becomes 0x7fxxyyzz,
>> we then accept a bogus frame. This is a RFC violation.
>>
>> This also slows down non loopback devices, adding an extra test.
>>
>> ip_fast_csum() is really fast (about 16 instructions).
>
> Yes, you are right. So it would be better to only skip csum if *dev is
> our loopback interface ? Right ?
An application could send a bogus IP packet using RAW interface, and we still should
check IP checksum before delivering this packet, even on loopback device.
next prev parent reply other threads:[~2009-10-19 21:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-19 19:34 [PATCH] IPv4: skip loopback checksums in ip_rcv() Torsten Schmidt
2009-10-19 20:42 ` Eric Dumazet
2009-10-19 20:56 ` Torsten Schmidt
2009-10-19 21:10 ` Eric Dumazet [this message]
2009-10-19 21:34 ` Torsten Schmidt
2009-10-20 0:24 ` David Miller
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=4ADCD5E1.7060400@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=torsten.schmidt@s2006.tu-chemnitz.de \
/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).