Subject: Re: 2292bis comment

From: Tim Hartrick <[email-masked]>
Date: Tue, 23 Nov 1999 09:27:55 -0800 (PST)

All,

	The processing sequence we use is:

1) Verify checksum.  If it fails the checksum then discard it.

2) Allow the kernel to process ICMPv6 messages types in which it is interested.
   If the ICMPv6 message fails any validity check during this processing then
   discard it.

3) Apply the socket's filter.  If the socket has requested the ICMPv6 message's
   type pass the ICMPv6 message to the socket.

4) Repeat step 3 for each socket that is listening for ICMPv6 messages.

	In general it seems to me that if the kernel knows a message is in-
valid it shouldn't waste the application's time by passing it out to user
space.

Tim Hartrick
Mentat Inc.
--------------------------------------------------------------------
IETF IPng Working Group Mailing List
IPng Home Page:                      http://playground.sun.com/ipng
FTP archive:                      ftp://playground.sun.com/pub/ipng
Direct all administrative requests to [email-masked]
--------------------------------------------------------------------

---

From: Erik Nordmark <[email-masked]>
Date: Wed, 24 Nov 1999 15:59:25 -0800 (PST)

> valid it shouldn't waste the application's time by passing it out to user

Sure, but that doesn't provide any help for portable applications
since they don't know what different kernel implementations will consider
invalid.

But for extensibility I don't think the kernel should be dropping unknown
ICMP types - an application might want to use new types.
In most cases those types will be informational but for extensibility
I don't see any harm in passing up unknown error types (suject to the 
ICMP6_FILTER stuff).

Thus what we can say in the 2292bis is something like:
	The protocol stack will verify the ICMPv6 checksum and discard
	any packets with invalid checksums.

	An implementation might perform additional validity checks
	on the ICMP message content and discard malformed packets.
	However, a portable application must not assume that such 
	validity checks have been performed.

	The protocol stack should not automatically discard packets if
	the ICMP type is unknown to the stack. For extensibility reasons
	received ICMP packets with any type (informational or error) 
	must be passed to the applications (subject to ICMP6_FILTER filtering
	on the type value and the checksum verification).

  Erik