Subject: bin/11823: 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: 12/27/2000 03:39:20
>Number:         11823
>Category:       bin
>Synopsis:       pppd; netmask option doesn't actually set netmask
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 27 03:39:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     enami tsugutomo
>Release:        NetBSD-current 1997 June 29
>Organization:
>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);
 }
 
>Release-Note:
>Audit-Trail:
>Unformatted: