Subject: port-mac68k/7614: if_sn.c broken with/without bpfilter after layer 2 reorg
To: None <gnats-bugs@gnats.netbsd.org>
From: Erik Bertelsen <erik@q610.ebe.uni-c.dk>
List: netbsd-bugs
Date: 05/20/1999 14:22:47
>Number:         7614
>Category:       port-mac68k
>Synopsis:       if_sn.c broken with/without bpfilter after layer 2 reorg
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    port-mac68k-maintainer (NetBSD/mac68k Portmaster)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 20 14:05:00 1999
>Last-Modified:
>Originator:     Erik Bertelsen
>Organization:
	
>Release:        NetBSD-current 20 May 1999
>Environment:
	
System: NetBSD q610.ebe.uni-c.dk 1.4 NetBSD 1.4 (Q610) #130: Fri May 7 12:44:05 MEST 1999 erik@q610.ebe.uni-c.dk:/home/src/sys/arch/mac68k/compile/Q610 mac68k


>Description:
	After yesterdays reorganisation of the handling of packets from
	network devices, the Sonic driver for the mac68k is broken,
	first as shown by a compilation:

	cc  -O2 -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes  -Wpointer-arith -Wno-main -msoft-float -I. -I../../../../arch -I../../../.. -nostdinc -DHZ="0x3c" -DNKMEMCLUSTERS="0x800" -DNMBCLUSTERS="0x400" -DM68040 -DFPSP -DMAXUSERS=16 -D_KERNEL -Dmac68k  -c ../../../../arch/mac68k/dev/if_sn.c
../../../../arch/mac68k/dev/if_sn.c: In function `sonic_read':
../../../../arch/mac68k/dev/if_sn.c:1133: `et' undeclared (first use in this function)
../../../../arch/mac68k/dev/if_sn.c:1133: (Each undeclared identifier is reported only once
../../../../arch/mac68k/dev/if_sn.c:1133: for each function it appears in.)
*** Error code 1


	Just changing et to eh is not sufficient, and disabling bpfilter
	(which deactivates the code with the compilation errors) still
	does not make a usable kernel, but at least it is bootable.
	Unusability shows as being very slow to go to multiuser and
	being unresponsive to other hosts on the LAN. You cannot
	telnet in and out of the machine.

	Doing tcpdump on another machine shows that the mac68k sends
	a lot of DNS queries around the world, but apparently they are
	not received correctly, and the traffic continues.

	Before trying to deactivate bpfilter on the mac68k in question,
	I also tried to run tcpdump -n on it (with et replaced by eh
	in three lines about line 1133) resulted in messages telling 
	that (some) packets were short by 14 bytes.
>How-To-Repeat:
>Fix:
	None supplied, but for a person understanding the recent change
	to the handling of layer two packets and when to add/subtract
	the ether headerlength, it is probably obvious what to change.

regards
Erik Bertelsen
>Audit-Trail:
>Unformatted: