9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: [9fans] 9vx dns funny
Date: Sun,  6 Jul 2008 11:56:26 -0400	[thread overview]
Message-ID: <8db7f9a1866d1cd5c07eca58a04f7d35@quanstro.net> (raw)

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	other threads:[~2008-07-06 15:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-06 15:56 erik quanstrom [this message]
2008-07-06 17:20 ` ron minnich
2008-07-08 17:17 ` Russ Cox
2008-07-08 17:25   ` erik quanstrom
2008-07-10  7:40   ` Nathaniel W Filardo
2008-07-10 10:40     ` maht
2008-07-06 19:36 erik quanstrom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8db7f9a1866d1cd5c07eca58a04f7d35@quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).