diff options
author | peter <peter@FreeBSD.org> | 1995-11-04 10:44:22 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1995-11-04 10:44:22 +0000 |
commit | 484ade7718e310f1744bd84a2e279513b21dc249 (patch) | |
tree | e946ad6ade3be48a724ddc57453d86af001fb3d2 /usr.sbin/pppd | |
parent | 3c4628f918646101de23b7064e79a19c59fefca4 (diff) | |
download | FreeBSD-src-484ade7718e310f1744bd84a2e279513b21dc249.zip FreeBSD-src-484ade7718e310f1744bd84a2e279513b21dc249.tar.gz |
Recover lost support for netmask 255.255.255.255 that was lost in the merge.
Submitted by: Michael Butler <imb@scgt.oz.au>
Diffstat (limited to 'usr.sbin/pppd')
-rw-r--r-- | usr.sbin/pppd/options.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/pppd/options.c b/usr.sbin/pppd/options.c index 491d2eb..6bea932 100644 --- a/usr.sbin/pppd/options.c +++ b/usr.sbin/pppd/options.c @@ -18,7 +18,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: options.c,v 1.6 1995/10/31 21:21:31 peter Exp $"; +static char rcsid[] = "$Id: options.c,v 1.7 1995/10/31 21:29:25 peter Exp $"; #endif #include <stdio.h> @@ -1391,14 +1391,14 @@ static int setnetmask(argv) char **argv; { - u_int32_t mask; + struct in_addr mask; - if ((mask = inet_addr(*argv)) == -1 || (netmask & ~mask) != 0) { + if ((inet_aton(*argv, &mask)) == -1 || (netmask & ~mask.s_addr)) { fprintf(stderr, "Invalid netmask %s\n", *argv); - return 0; + return (0); } - netmask = mask; + netmask = mask.s_addr; return (1); } |