Problem with DEUNA/Ethernet

Pat Keziah pjk at ascvax.UUCP
Fri Mar 14 10:09:01 AEST 1986


neil at ux.cs.man.ac.uk writes in <34 at ux.cs.man.ac.uk>:
> .
> .
> .
> 
> I have a Vax 8600 running 4.3 Beta and two 750s running 4.2. They are
> all on an ethernet, connected using DEUNAs.
> .
> .
> .
> 
> Traffic between the 750s is fine. But the 8600 will run ok for about
> an hour or so and then the Ethernet from the 8600 effectively dies -
> the 750s remain ok. [. . . a sentence deleted. . . ]
> I've switched in the debugging and this
> annouces that the 8600 thinks that there are checksum errors.
> 
> .
> .
> .

There is a bug in the udp checksum generated by the 4.2 BSD kernel.
The 4.2 kernel defaults to not checking udp checksums, thus the 4.2
systems are able to talk to each other fine.  [Un?]Fortunately,
4.3 includes the fix for the outgoing checksums and checks them on
input.  We were able to get our 4.2 VAX to work with the PC/IP software
from MIT (which seems to handle checksums correctly) by adding
a line to the code in the routine udp_output (source file ==
/sys/netinet/udp_usrreq.c).  The resulting code in udp_output that
builds the udp header and checksum looks like this:

	ui = mtod(m, struct udpiphdr *);
	ui->ui_next = ui->ui_prev = 0;
	ui->ui_x1 = 0;
	ui->ui_pr = IPPROTO_UDP;
	ui->ui_len = len + sizeof (struct udphdr);
	ui->ui_src = inp->inp_laddr;
	ui->ui_dst = inp->inp_faddr;
	ui->ui_sport = inp->inp_lport;
	ui->ui_dport = inp->inp_fport;
	ui->ui_ulen = htons((u_short)ui->ui_len);
|	ui->ui_len = htons((u_short)ui->ui_len);   /* the line we added */

	/*
	 * Stuff checksum and output datagram.
	 */
	ui->ui_sum = 0;
	ui->ui_sum = in_cksum(m, sizeof (struct udpiphdr) + len);

The line that we added was line 194 in our sources.

You should be able to make this change to your 4.2 BSD systems
and clear up the ethernet problem ( and charge on to the next crisis).

Good Luck,
-- 

Pat Keziah				Ampex Switcher Company
{hao,boulder,avsdS}!ascvax!pjk		10604 West 48th Avenue
					Wheatridge,  CO  80033
					USA
					(303)423-1300 x226



More information about the Comp.bugs.4bsd.ucb-fixes mailing list