Subject: bin/3819: pppd; netmask option doesn't actually set netmask
To: None <gnats-bugs@gnats.netbsd.org>
From: None <enami@ba2.so-net.or.jp>
List: netbsd-bugs
Date: 07/01/1997 09:13:05
>Number:         3819
>Category:       bin
>Synopsis:       pppd; netmask option doesn't actually set netmask
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul  1 04:50:03 1997
>Last-Modified:
>Originator:     enami tsugutomo
>Organization:
>Release:        NetBSD-current 1997 June 29
>Environment:
System: NetBSD pavlov.enami.ba2.so-net.or.jp 1.2G NetBSD 1.2G (PAVLOV) #299: Sat Jun 28 11:55:32 JST 1997 enami@pavlov.enami.ba2.so-net.or.jp:/b/netbsd/kernel/compile/PAVLOV i386


>Description:
	netmask option of pppd doesn't actually set netmask.

>How-To-Repeat:
	invoke pppd with netmask option other than default mask,
	and see actual netmask by ifconfig ppp?.

	or, inspect the source code.  there is no place where
	some value is assigned to the global variable `netmask'
	other than initalization.

>Fix:
	Here is my fix:

Index: options.c
===================================================================
RCS file: /a/cvsroot/NetBSD/src/usr.sbin/pppd/pppd/options.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 options.c
--- options.c	1997/05/18 13:38:58	1.1.1.2
+++ options.c	1997/06/30 12:26:24
@@ -1835,6 +1835,7 @@
 	return 0;
     }
 
+    netmask = mask;
     return (1);
 }
 
>Audit-Trail:
>Unformatted: