9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: presotto@plan9.bell-labs.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] ndb/cs problem?
Date: Mon, 17 Jun 2002 08:19:28 -0400	[thread overview]
Message-ID: <6e2b7a1edb6298c7e78f65799f7801b7@plan9.bell-labs.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 631 bytes --]

Its supposed to be the default.  It doesn't work because I left the
return out of the if in the loop when I rewrote it to go with
the new readipifc interface.  The code should look like:

void
readipinterfaces(void)
{
	Ipifc *nifc;
	Iplifc *lifc;

	ipifcs = readipifc(mntpt, ipifcs, -1);
	for(nifc = ipifcs; nifc; nifc = nifc->next)
		for(lifc = nifc->lifc; lifc; lifc = lifc->next)
			if(ipcmp(lifc->ip, IPnoaddr) != 0){
				ipmove(ipa, lifc->ip);
				sprint(ipaddr, "%I", ipa);
				if(debug)
					syslog(0, "dns", "ipaddr is %s\n", ipaddr);
				return;
			}
	ipmove(ipa, IPnoaddr);
}

Thanks, I'm an idiot.

[-- Attachment #2: Type: message/rfc822, Size: 1695 bytes --]

From: Fco.J.Ballesteros <nemo@plan9.escet.urjc.es>
To: 9fans@cse.psu.edu
Subject: [9fans] ndb/cs problem?
Date: Mon, 17 Jun 2002 10:04:56 +0200
Message-ID: <2aaf2727225e09ab22df56d9a86dd340@plan9.escet.urjc.es>


Hi,

Readipinterfaces() in ndb/cs.c sets ipa to IPnoaddr (even though it's
able to locate a real ip address in the loops before).

The problem with this is that when you start cs on a machine without
an ethernet interface and a loopback ip interface, cs no longer
sets the system name.

I just commented out the "ipmove(ipa, IPnoaddr)" and it works like a
charm.  Is there anything I'm missing, i.e.  any reason for that line
of code to be there?

thanks



             reply	other threads:[~2002-06-17 12:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-17 12:19 presotto [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-06-18 17:09 FJ Ballesteros
2002-06-17  8:04 Fco.J.Ballesteros

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=6e2b7a1edb6298c7e78f65799f7801b7@plan9.bell-labs.com \
    --to=presotto@plan9.bell-labs.com \
    --cc=9fans@cse.psu.edu \
    /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).