Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Sep 1995 01:28:02 +1000 (EST)
From:      michael butler <imb@scgt.oz.au>
To:        current@freebsd.org
Subject:   pppd & netmask 255.255.255.255
Message-ID:  <199509061528.BAA15734@asstdc.scgt.oz.au>

next in thread | raw e-mail | index | archive | help
I'm currently set up to allow dial-in IP access via a (small) modem pool and
I have two basic problems that I'm sure other intending ISPs will strike:

i) we have no dynamic allocation of IP numbers :-(

ii) the following code fragment from /usr/src/usr.sbin/pppd/options.c
refuses a netmask for a host route (255.255.255.255) ..

/*
 * setnetmask - set the netmask to be used on the interface.
 */
static int
setnetmask(argv)
    char **argv;
{
    u_long mask;

    if ((mask = inet_addr(*argv)) == -1 || (netmask & ~mask) != 0) {
	fprintf(stderr, "Invalid netmask %s\n", *argv);
	return 0;
    }

    netmask = mask;
    return (1);
}

The result is that "ifconfig -a" shows a netmask of 255.255.255.0 :-(. The
"natural netmask" on this (sub)net is 255.255.255.240 but that's not what I
want either .. these are single-interface Windows boxes dialling in.

On the same machine, however, gated apparently advertises just the host
route as intended. gated is configured NOT to export kernel routes (obtained
via routing socket). Which is wrong .. ifconfig or gated ?

	michael



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