Port-sun2 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [sun2] ndbootd server on i386 trouble



> Hi Folks--
> 
> Have an i386 setup with 1.6 as ndbootd/install server
> for sun2. No Joy, the ndbootd ignores packet:
> 
> taranza# /usr/sbin/ndbootd -s /tftpboot -w 2 -d /tftpboot/bootyy
> ndbootd: opening interface tlp0
> ndbootd: bpf: trying /dev/bpf0
> ndbootd: bpf: failed to open /dev/bpf0: Device busy
> ndbootd: bpf: trying /dev/bpf1
> ndbootd: bpf: opened /dev/bpf1
> ndbootd: bpf: buffer size for /dev/bpf1 is 8192
> ndbootd: opened interface tlp0 (ip 192.58.220.92 ether 00:e0:29:05:89:36)
> ndbootd: bpf: calling select
> ndbootd: bpf: calling read
> ndbootd: bpf: read 84 bytes of packets
> ndbootd: ignoring a packet with bad total length 66
> ndbootd: bpf: calling select
> ndbootd: bpf: calling read
> ndbootd: bpf: read 84 bytes of packets
> ndbootd: ignoring a packet with bad total length 66
> 
> Here's what tcpdump on the i386 sees:
> 
> 
> 
> 13:07:55.978564 0.1.1.203 > 0.0.0.0:  nd 28
>                          4500 0030 0000 0000 044d b4b6 0001 01cb
>                          0000 0000 0940 0000 0000 007d 0000 0000
>                          0000 0400 0000 0000 0000 0000 0000 0000
>                          133b 2f95
> 
> Perhaps an endian problem?

This is a tulip/BPF issue.

The total packet length that BPF reports to ndbootd is supposed to be 
exactly the length of the Ethernet header (always 14 bytes), length of 
the IP header (whatever the IP header says), and IP payload (always 28 
bytes = one ND packet).

Here, BPF reported a total packet length of 66, which is not
14 + 20 + 28 = 62.  For some reason it's reporting four extra bytes,
and if you size everything up you will find four extra bytes in the 
tcpdump output too.

These extra bytes appear to be the Ethernet CRC, also called the
Frame Check Sequence.  Apparently in rev. 1.80 of src/sys/dev/ic/tulip.c,
a change was made to explicitly pass the CRC to the upper layers, 
including BPF.  Passing it to BPF was probably unintentional, since it 
makes BPF on tulip work slightly differently than on other interfaces.

Two possible workarounds: use a different kind of Ethernet card, or
recompile ndbootd with the != in the offending "if" statement turned 
into a <, to make the check less strict.

What kind of sun2 do you have?

-- 
Matt Fredette



Home | Main Index | Thread Index | Old Index