From owner-freebsd-current Wed Sep 6 09:42:25 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.freebsd.org (8.6.11/8.6.6) id JAA12260 for current-outgoing; Wed, 6 Sep 1995 09:42:25 -0700 Received: from precipice.shockwave.com (precipice.shockwave.com [171.69.108.33]) by freefall.freebsd.org (8.6.11/8.6.6) with ESMTP id JAA12248 for ; Wed, 6 Sep 1995 09:42:23 -0700 Received: from localhost (localhost [127.0.0.1]) by precipice.shockwave.com (8.6.12/8.6.12) with SMTP id JAA12524; Wed, 6 Sep 1995 09:41:16 -0700 Message-Id: <199509061641.JAA12524@precipice.shockwave.com> To: michael butler cc: current@freebsd.org Subject: Re: pppd & netmask 255.255.255.255 In-reply-to: Your message of "Thu, 07 Sep 1995 01:28:02 +1000." <199509061528.BAA15734@asstdc.scgt.oz.au> Date: Wed, 06 Sep 1995 09:41:15 -0700 From: Paul Traina Sender: current-owner@freebsd.org Precedence: bulk Try this: Index: options.c =================================================================== RCS file: /home/ncvs/src/usr.sbin/pppd/options.c,v retrieving revision 1.4 retrieving revision 1.5 diff -c -r1.4 -r1.5 *** 1.4 1995/05/30 03:51:14 --- 1.5 1995/09/06 16:33:40 *************** *** 1216,1229 **** 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); } --- 1216,1229 ---- setnetmask(argv) char **argv; { ! struct in_addr mask; ! if ((inet_aton(*argv, &mask) < 0) || (netmask & ~mask.s_addr)) { fprintf(stderr, "Invalid netmask %s\n", *argv); ! return (0); } ! netmask = mask.s_addr; return (1); }