All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: Florian Westphal <fw@strlen.de>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH] ipv4/ipv6: check hop limit field on input
Date: Tue, 02 Jun 2009 11:30:08 +0200	[thread overview]
Message-ID: <4A24F120.8060706@dev.6wind.com> (raw)
In-Reply-To: <20090601171340.GB29745@Chamillionaire.breakpoint.cc>

Florian Westphal wrote:
> Nicolas Dichtel <nicolas.dichtel@6wind.com> wrote:
>>> Whats wrong with the checks in ip(6)_forward?
>> It's on forward, not on input. Router must not process it.
>> For example, if you try to ping (with ttl set to 0) the router, you will 
>> receive a reply.
> 
> Ah.  That makes more sense.
> However, I'd argue that this is sane behaviour.
> 
> The datagram did reach its intended destination and the TTL did not
> "exceed in transit" (if it had, the datagram would not have been
> received).  Why discard an otherwise perfectly legal packet?
Because RFC requires this:

RFC792 Page 6:
   If the gateway processing a datagram finds the time to live field
   is zero it must discard the datagram.  The gateway may also notify
   the source host via the time exceeded message.

RFC4443 Section 3.3:
    If a router receives a packet with a Hop Limit of zero, or if a
    router decrements a packet's Hop Limit to zero, it MUST discard the
    packet and originate an ICMPv6 Time Exceeded message with Code 0 to
    the source of the packet.

Nicolas


  reply	other threads:[~2009-06-02 10:03 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-01 15:13 [PATCH] ipv4/ipv6: check hop limit field on input Nicolas Dichtel
2009-06-01 16:19 ` Florian Westphal
2009-06-01 16:49   ` Nicolas Dichtel
2009-06-01 17:13     ` Florian Westphal
2009-06-02  9:30       ` Nicolas Dichtel [this message]
2009-06-01 18:43     ` Eric Dumazet
2009-06-01 18:55       ` Brian Haley
2009-06-02  1:54         ` John Dykstra
2009-06-02  2:02           ` David Miller
2009-06-02  9:22             ` John Dykstra
2009-06-02  9:32               ` David Miller
2009-06-02  9:35           ` Nicolas Dichtel
2009-06-02  9:30         ` Nicolas Dichtel
2009-06-02  9:30       ` Nicolas Dichtel
2009-06-02  2:04 ` David Miller
2009-06-02  5:31   ` Eric Dumazet
2009-06-02  5:43     ` David Miller
2009-06-02  9:36   ` Nicolas Dichtel
2009-06-02  9:37     ` 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=4A24F120.8060706@dev.6wind.com \
    --to=nicolas.dichtel@6wind.com \
    --cc=fw@strlen.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.