SGI Indy DHCP problems since 5.6 and still in 6.0-current

Previous Topic Next Topic
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

SGI Indy DHCP problems since 5.6 and still in 6.0-current

Frank Scheiner
Hi all,

during Christmas vacation I wanted to test out a harddisk installation
of OpenBSD 6.0. Using it diskless is not possible currently due to the
problems described in [1] (end of August 2016 on openbsd-bugs), so I
thought I maybe could diagnose this further with a disk installation.

[1]: https://marc.info/?t=147170611200002&r=1&w=2

Using BOOTP to get its IP address and TFTP to get the RAMDISK kernel
itself worked fine from the PROM monitor. The kernel (`bsd.rd.IP22`)
also booted up fine.

During installation I recognized that it does not get an IP address via
DHCP though. Checking this in more detail in a shell showed that
`dhclient` was not able to receive or to accept an IP address from the
DHCP server, although I could see (using `tcpdump`) that the DHCP server
answered every DHCPDISCOVER request:

# dhclient sq0
DHCPDISCOVER on sq0 - interval 3
DHCPDISCOVER on sq0 - interval 8
DHCPDISCOVER on sq0 - interval 13
DHCPDISCOVER on sq0 - interval 11
DHCPDISCOVER on sq0 - interval 18
DHCPDISCOVER on sq0 - interval 8
No acceptable DHCPOFFERS received.
No working leases in persistent database - sleeping.

After some fiddling I found out that `dhclient` actually succeeds, if I
run it after setting an arbitrary IP address manually:

# ifconfig sq0

# dhclient sq0
DHCPDISCOVER on sq0 - interval 3
DHCPOFFER from (b8:27:eb:11:22:33)
DHCPACK from (b8:27:eb:11:22:33)
bound to -- renewal in 300 seconds.

I recently acquired a second Silicon Graphics Indy (w/R4600 instead of
R4400) and could therefore also check this with a different machine just
today, albeit with the same result.

I assumed a relation to the RARP problems I described earlier and hence
tested with the specific kernels from OpenBSD versions 5.5, 5.6, 6.0 and
6.0-current (1487719470). And indeed DHCP works in 5.5 but starts to
fail in 5.6. But as DHCP always works after an IP address was manually
configured via `ifconfig`, could it be that the sq driver is missing
some initialisation code, maybe? So after the driver was loaded the
interface is in a state that does not allow to accept an IP address,
neither via RARP nor via DHCP. But when manually setting an IP address -
no matter what IP is used actually - this (missing) initialisation is
done and `dhclient` succeeds.

Just a rough guess.

I attached a file with logs of all OpenBSD versions I tried with more
detailed information (incl. interface flags between each step). Maybe
this could be helpful for further investigations.

I hope someone on the list has an idea what's wrong here and what I
could do to solve this issue. I'd be glad to be of help for any further

All the best,

sgi-indy-dhcp-problems.md (16K) Download Attachment
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Re: SGI Indy DHCP problems since 5.6 and still in 6.0-current

Miod Vallat
Thank you for researching this.

This behaviour is caused by a stupid mistake in the driver's code, where
the receiver is disabled unless either an address is set or the
interface is switched to promiscuous mode.

The following patch will fix the problem.

Index: if_sq.c
RCS file: /OpenBSD/src/sys/arch/sgi/hpc/if_sq.c,v
retrieving revision 1.28
diff -u -p -r1.28 if_sq.c
--- if_sq.c 22 Jan 2017 10:17:37 -0000 1.28
+++ if_sq.c 2 Mar 2017 07:13:48 -0000
@@ -580,7 +580,7 @@ sq_set_filter(struct sq_softc *sc)
  * Unless otherwise specified, always accept broadcast frames.
- if ((sc->sc_rxcmd & ~RXCMD_REC_MASK) == RXCMD_REC_NONE)
+ if ((sc->sc_rxcmd & RXCMD_REC_MASK) == RXCMD_REC_NONE)
  sc->sc_rxcmd |= RXCMD_REC_BROAD;