From owner-freebsd-hackers Sun Oct 12 09:36:16 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id JAA01417 for hackers-outgoing; Sun, 12 Oct 1997 09:36:16 -0700 (PDT) (envelope-from owner-freebsd-hackers) Received: from punt-1.mail.demon.net (punt-1d.mail.demon.net [194.217.242.138]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id JAA01406 for ; Sun, 12 Oct 1997 09:36:11 -0700 (PDT) (envelope-from dmlb@demon.co.uk) Received: from ragnet.demon.co.uk ([158.152.46.40]) by punt-1.mail.demon.net id aa0921447; 12 Oct 97 17:01 BST Received: (from dmlb@localhost) by demon.co.uk (8.8.5/8.8.6) id MAA07466 for freebsd-hackers@freebsd.org; Sun, 12 Oct 1997 12:59:51 +0100 (BST) Message-ID: X-Mailer: XFMail 1.1 [p0] on FreeBSD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Date: Sat, 11 Oct 1997 11:14:31 +0100 (BST) From: Duncan Barclay To: freebsd-hackers@freebsd.org Subject: Mountd and PLIP interfaces. Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I have a problem with starting mountd and friends on a system with a PLIP interface that is up. I use the PLIP interface to an old 486/25 laptop which doesnt have PC-Cards... Mountd doesn't start; it can't register it's RPC and fails with a "no route to host" error. Chasing through mountd and the RPC code in libc I found the problem in /usr/src/lib/libc/rpc/get_myaddress.c, which returns the IP address of the first configured and running network interface that it finds. The simplicity in get_myaddress() becomes a problem with an actived PLIP link. This interface is the first to be returned by the ioctl get_myaddress() uses to probe for interfaces (SIOCGIFCONF). get_myaddress() then obtains the IP address of this interface; which is of course not reachable as PLIP is a point to point link. This problem will also manifest itself on PPP/SLIP links (with the added inconvience of causing dial-outs). Currently, I have overcome this by setting up a static route from the local end of the PLIP link to the loopback: route add 192.168.201.32 127.0.0.1 1 is this the "best" solution or should get_myaddress() check for point to point interfaces. If the latter could somebody test and commit this (untested) patch? Relative to 2.2-STABLE of a couple of weeks ago: *** get_myaddress.c Mon Nov 25 07:23:37 1996 --- /usr/home/dmlb/get_myaddress.c Sun Oct 12 12:50:17 1997 *************** *** 82,87 **** --- 82,88 ---- exit(1); } if ((ifreq.ifr_flags & IFF_UP) && + !(ifreq.ifr_flags & IFF_POINTOPOINT) && ifr->ifr_addr.sa_family == AF_INET) { *addr = *((struct sockaddr_in *)&ifr->ifr_addr); addr->sin_port = htons(PMAPPORT); Thanks Duncan ________________________________________________________________________ Duncan Barclay | God smiles upon the little children, dmlb@ragnet.demon.co.uk | the alcoholics, and the permanently stoned. ________________________________________________________________________