Subject: CVS commit: syssrc
To: None <>
From: Jason R Thorpe <>
List: source-changes
Date: 10/18/2000 20:09:17
Module Name:	syssrc
Committed By:	thorpej
Date:		Wed Oct 18 17:09:17 UTC 2000

Modified Files:
	syssrc/sys/netinet: in_proto.c ip_icmp.c ip_icmp.h tcp_subr.c tcp_var.h
	syssrc/sys/netinet6: ah.h ah_input.c esp.h esp_input.c

Log Message:
Restructure the Path MTU Discovery code somewhat to avoid
entering rtentry's for hosts we're not actually communicating

Do this by invoking the ctlinput for the protocol, which is
responsible for validating the ICMP message:
	* TCP -- Lookup the connection based on the address/port
	  pairs in the ICMP message.
	* AH/ESP -- Lookup the SA based on the SPI in the ICMP message.

If validation succeeds, ctlinput is responsible for calling
icmp_mtudisc().  icmp_mtudisc() then invokes callbacks registered
by protocols (such as TCP) which want to take some sort of special
action when a path's MTU changes.  For TCP, this is where we now
refresh cached routes and re-enter slow-start.

As a side-effect, this fixes the problem where TCP would not be
notified when a path's MTU changed if AH/ESP were being used.

XXX Note, this is only a fix for the IPv4 case.  For the IPv6
XXX case, we need to wait for the KAME folks.

Reviewed by and

To generate a diff of this commit:
cvs rdiff -r1.43 -r1.44 syssrc/sys/netinet/in_proto.c
cvs rdiff -r1.54 -r1.55 syssrc/sys/netinet/ip_icmp.c
cvs rdiff -r1.14 -r1.15 syssrc/sys/netinet/ip_icmp.h
cvs rdiff -r1.97 -r1.98 syssrc/sys/netinet/tcp_subr.c
cvs rdiff -r1.75 -r1.76 syssrc/sys/netinet/tcp_var.h
cvs rdiff -r1.12 -r1.13 syssrc/sys/netinet6/ah.h
cvs rdiff -r1.19 -r1.20 syssrc/sys/netinet6/ah_input.c
cvs rdiff -r1.13 -r1.14 syssrc/sys/netinet6/esp.h
cvs rdiff -r1.9 -r1.10 syssrc/sys/netinet6/esp_input.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.