From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <6e2b7a1edb6298c7e78f65799f7801b7@plan9.bell-labs.com> From: presotto@plan9.bell-labs.com To: 9fans@cse.psu.edu Subject: Re: [9fans] ndb/cs problem? MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-wwlvryyrdzbclqofexseffcdjp" Date: Mon, 17 Jun 2002 08:19:28 -0400 Topicbox-Message-UUID: b0e7dad2-eaca-11e9-9e20-41e7f4b1d025 This is a multi-part message in MIME format. --upas-wwlvryyrdzbclqofexseffcdjp Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit 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. --upas-wwlvryyrdzbclqofexseffcdjp Content-Type: message/rfc822 Content-Disposition: inline Received: from plan9.cs.bell-labs.com ([135.104.9.2]) by plan9; Mon Jun 17 04:06:17 EDT 2002 Received: from mail.cse.psu.edu ([130.203.4.6]) by plan9; Mon Jun 17 04:06:16 EDT 2002 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.18.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id DEDC019AD0; Mon, 17 Jun 2002 04:06:08 -0400 (EDT) Delivered-To: 9fans@cse.psu.edu Received: from nautilus.escet.urjc.es (nautilus.escet.urjc.es [212.128.4.207]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id 0853319A59 for <9fans@cse.psu.edu>; Mon, 17 Jun 2002 04:05:18 -0400 (EDT) Message-ID: <2aaf2727225e09ab22df56d9a86dd340@plan9.escet.urjc.es> To: 9fans@cse.psu.edu From: Fco.J.Ballesteros MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] ndb/cs problem? Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Mon, 17 Jun 2002 10:04:56 +0200 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 --upas-wwlvryyrdzbclqofexseffcdjp--