[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A24F120.8060706@dev.6wind.com>
Date: Tue, 02 Jun 2009 11:30:08 +0200
From: Nicolas Dichtel <nicolas.dichtel@...nd.com>
To: Florian Westphal <fw@...len.de>
Cc: netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH] ipv4/ipv6: check hop limit field on input
Florian Westphal wrote:
> Nicolas Dichtel <nicolas.dichtel@...nd.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists