here's the symptom

        ndb/dnsquery 9hal.ath.cx
        9hal.ath.cx ip  9.0.0.0

the problem is that devip.c:/^lookuphost tries
to avoid calling gethostbyname when given an
ip address by testing to see if the return value
of v4parseip is nozero.  unfortunately, v4parseip
parses "9hal.ath.cx" as the ip address 9.0.0.0.

here is one tacky solution:

; diff -c devip.c /tmp
devip.c:811,817 - /tmp/devip.c:811,816
        v4parseip(to, s);
        ip = nhgetl(to);
        if(ip != 0)
-       if(strspn(s, "0123456789.") == strlen(s))
                return 0;
        if((s = hostlookup(s)) == nil)
                return -1;

on a related note, would it be worth while to
put effort into supporting ptr queries, ip6 &c using
the host's lookup facilities or should that effort be
directed into adding bits to enable ndb/dns to run?

i guess this gets to a more philosophical question
on how 9vx networking relates to the host.

personally, i feel it would be more useful to be
able to use plan 9's native network stack.  but
i'm biased.  i want to send aoe/cec/il packets.

- erik

Reply via email to