token ring dev->type numbers

From: Adam Fritzler (mid@auk.cx)
Date: Sun Jan 09 2000 - 01:20:25 EST


I went to go use bootp (via kernel IP autoconfig) for a host on token ring
and was suddenly met with a segfault on the server's bootpd. The problem
is not in the bootpd [1], but in the hardware type that IP autoconfig is
putting in the BOOTP request packet.

For ethernet and the other first 8 or so hardware types listed in RFC1700,
the real values are used in linux: (linux/if_arp.h)

#define ARPHRD_ETHER 1 /* Ethernet 10Mbps */
 ...
#define ARPHRD_IEEE802 6 /* IEEE 802.2 Ethernet/TR/TB */
 ...
/* Dummy types for non ARP hardware */
#define ARPHRD_IEEE802_TR 800 /* Magic type ident for TR */

However, as shown above, a fake type is used for token ring, despite the
real type (802.2 -- 6) being listed. The autoconfig code sets the BOOTP
type directly from the dev->type field, which contains for the fake number
in the case of token ring.

I assume linux uses the fake number so that it can differentiate between
the different 802.2 hardware (which (rarely) includes non-TR things).
What's the recommended action here: 1) remove the fake number and use the
real number for token ring or 2) put a check in the autoconfig code to use
802.2 if dev->type == ARPHRD_IEEE802_TR?

af

[1] Yes, of course there is the obvious problem in the bootpd. It
should've been written more robustly.

---
  Adam Fritzler
  { mid@auk.cx, afritz@iname.com}
    http://www.auk.cx/~mid/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:13 EST