Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Oct 1997 11:14:31 +0100 (BST)
From:      Duncan Barclay <dmlb@ragnet.demon.co.uk>
To:        freebsd-hackers@freebsd.org
Subject:   Mountd and PLIP interfaces.
Message-ID:  <XFMail.971012125949.dmlb@ragnet.demon.co.uk>

next in thread | raw e-mail | index | archive | help
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.
________________________________________________________________________



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.971012125949.dmlb>