From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
To: David Miller <davem@davemloft.net>
Cc: vladislav.yasevich@hp.com, netdev@vger.kernel.org
Subject: Re: [RFC] sctp/tcp: Question -- ICMPv4 length check (not) redundant?
Date: Sat, 26 Jul 2008 08:03:08 +0100 [thread overview]
Message-ID: <20080726070308.GA4674@gerrit.erg.abdn.ac.uk> (raw)
In-Reply-To: <20080725.213857.160776686.davem@davemloft.net>
| > * icmp_unreach() in net/ipv4/icmp.c already has this test:
| >
| > /* Checkin full IP header plus 8 bytes of protocol to
| > * avoid additional coding at protocol handlers.
| > */
| > if (!pskb_may_pull(skb, iph->ihl * 4 + 8))
| > goto out;
|
| I just noticed that this won't bump the ICMP MIB counter.
|
| The ICMP code will only bump the counter if the IP header isn't there,
| or has a bogus header length.
|
| But it is clear in the callers that the intention is (or was) to bump
| the counter if the 8 bytes of post IP header bits are not there.
|
If `goto out' is replaced with `goto out_err' in icmp_unreach(),
it may be worth considering the analogous case in icmpv6_notify():
/* Checkin header including 8 bytes of inner protocol header. */
if (!pskb_may_pull(skb, inner_offset+8))
return;
and the `discard_it' jump label in icmpv6_rcv().
next prev parent reply other threads:[~2008-07-26 7:03 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-25 15:20 [RFC] sctp/tcp: Question -- ICMPv4 length check (not) redundant? Gerrit Renker
2008-07-26 2:15 ` Vlad Yasevich
2008-07-26 4:38 ` David Miller
2008-07-26 7:03 ` Gerrit Renker [this message]
2008-07-26 7:36 ` David Miller
2008-07-26 8:10 ` Gerrit Renker
2008-07-27 4:48 ` Herbert Xu
2008-07-27 4:51 ` Herbert Xu
2008-07-28 11:25 ` Gerrit Renker
2008-07-28 13:08 ` Herbert Xu
2008-07-28 13:14 ` Vlad Yasevich
2008-07-28 17:08 ` Gerrit Renker
2008-07-28 17:27 ` Vlad Yasevich
2008-07-28 17:44 ` Gerrit Renker
2008-07-28 18:09 ` Vlad Yasevich
2008-07-30 10:19 ` David Miller
2008-07-30 12:49 ` Vlad Yasevich
2008-07-29 1:56 ` Herbert Xu
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=20080726070308.GA4674@gerrit.erg.abdn.ac.uk \
--to=gerrit@erg.abdn.ac.uk \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=vladislav.yasevich@hp.com \
/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).