[net.lan] IP fragmentation bugs in 4.2bsd or Sun UNIX

jonab@sdcrdcf.UUCP (Jonathan Biggar) (05/07/86)

We have a problem with IP fragmentation-reassembly causing bad tcp
checksums at the receiving end under Sun 3.0 UNIX.  Any pointers
to bug fixes related to this for SUN 3.0, SUN 2.0, or 4.2bsd would
be appreciated.

Jonathan Biggar
sdcrdcf!jonab

shinoda@takuya.uucp (Yoichi Shinoda) (05/10/86)

    I'm not sure if this helps, but....

    When fragmented IP packets are routed with further fragmentation,
they are sent wrong with ip_off field of the first outgoing packet
corresponding to each orginal fragmented text reset to 0, causing
reassembly of the original packet to be impossible.

	original		fragmented		further fragmented
	udp packet.		ip packet.		ip packet.
	---------		---------		---------
	|	|		|off=0	|		|off=0	|
	|	|		|	|		|	|
	|	|		|	|		---------
	|	|		|	|		---------
	|	|		|	|		|off=50	|
	|	|		|	|		|	|
	|	|		---------		---------
	|	|		---------		---------
	|	|		|off=100|		|off=0	| (should be
	|	|		|	|		|	|	100)
	|	|		|	|		---------
	|	|		|	|		---------
	|	|		|	|		|off=50	| (should be
	|	|		|	|		|	|	150)
	---------		---------		---------
				 MTU~=~100		 MTU~=~50

    Note that the bug shows up only if interfaces of different MTU
are employed in the transmission.

-----------------------------------------------------------------------

*** ip_output.c	Sat May 10 16:44:16 1986
--- ip_output.c.old	Mon Oct 29 02:11:17 1984
***************
*** 155,161
  			mh->m_len = sizeof (struct ip) + olen;
  		} else
  			mh->m_len = sizeof (struct ip);
! 		mhip->ip_off = (off >> 3) + (ip->ip_off & ~(IP_MF|IP_DF)) ;
  		if (off + len >= ip->ip_len-hlen)
  			len = mhip->ip_len = ip->ip_len - hlen - off;
  		else {

--- 155,161 -----
  			mh->m_len = sizeof (struct ip) + olen;
  		} else
  			mh->m_len = sizeof (struct ip);
! 		mhip->ip_off = off >> 3;
  		if (off + len >= ip->ip_len-hlen)
  			len = mhip->ip_len = ip->ip_len - hlen - off;
  		else {


-----------------------------------------------------------------------

					Yoichi Shinoda
					Tokyo Inst. of Tech.
					Dept. of CS

			UUCP: ...{ihnp4!seismo!mcvax}!kddlab!koudai!shinoda
			JUNET: shinoda@cs.titech.junet

hutch@sdcsvax.UUCP (Jim Hutchison) (05/12/86)

In article <913@takuya.uucp> shinoda@takuya.UUCP (Yoichi Shinoda) writes:
>    When fragmented IP packets are routed with further fragmentation,
>they are sent wrong with ip_off field of the first outgoing packet
>corresponding to each orginal fragmented text reset to 0, causing
>reassembly of the original packet to be impossible.

Does anyone know how this would affect the transmission of large
datagrams (UDP) between a vax and a sun network (4.2sunII-to-4.2/3vax780)?
-- 
/*	Jim Hutchison	UUCP:	{dcdwest,ucbvax}!sdcsvax!hutch
			ARPA:	Hutch@sdcsvax.ucsd.edu
		    [ Disclaimer eaten by a passing kiwi ]	 */