You guys don't appear to be running the Plan 9 that I am.
1. As Boyd pointed out, the correct fix is to use lower case
in ndb. Ndb is treating its entries as plain old case-sensitive
strings. For the most part, the lookup routines have no
idea what an IP address or an ethernet address is, so when
dhcpd asks for an entry with ether=00d0c9670733 it doesn't
match against ether=00D0C9670733.
The correct fix, if there is one, is to change the ndb reading
routines to recognize certain attributes and canonicalize
them: ip, ether, dom, maybe sysname. But then it will be
weird that dom is case-insensitive but bootf is not. Should
fs be case-sensitive? Etc. I'm much happier requiring that
the ndb entries be stored in canonical form than doing magical
rewriting under the hood.
2. Parseether (which ndb isn't using) correctly handles upper
case ethernet addresses already.
3. Strtoul correctly handles upper case hex already, as required
by the C standard.
The program below prints
abcdef
abcdefabcdef
for me.
Russ
#include <u.h>
#include <libc.h>
#include <ip.h>
void
main(void)
{
uchar ea[6];
fmtinstall('H', encodefmt);
print("%x\n", strtoul("ABCDEF", 0, 16));
parseether(ea, "ABCDEFABCDEF");
print("%.6lH\n", ea);
}