Subject: bin/11720: pppd mishandles IP address directives
To: None <>
From: Donald Lee <>
List: netbsd-bugs
Date: 12/12/2000 22:25:17
>Number:         11720
>Category:       bin
>Synopsis:       pppd mishandles IP address directives
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 12 22:25:00 PST 2000
>Originator:     Donald Lee
>Release:        NetBSD 1.5 release
	PMac 7600
	NetBSD 1.5
	pppd 2.4.0
System: NetBSD pm7600 1.5 NetBSD 1.5 (GENERIC) #1: Sun Nov 19 13:58:47 PST 2000 matt@duel.local:/u1/kobj/GENERIC macppc

	The pppd daemon appears to have a problem with
	directive processing that prevents it from handling the "my-ip:rem-ip"
	directive.  This is ignored - apparently only when a speed
	(like 57600) is specified previously in the /etc/ppp/options
	file. (dial-in setup)

	My setup has a bunch of stuff in /etc/ppp/options like


	In /etc/ppp/options.tty00 I have


	and when I run it, pppd complains of needing to use the
	default IP remotely , presumably because it has not "seen"
	this :290... directive.
	For dial-up, use the following in /etc/ppp/options:

nodetach	# Don't detach from controlling terminal - no background
auth		# force peer to authenticate
login		# use system login for auth
local		# ignore modem control
crtscts		# Hardware flow control
idle 895

	and in /etc/ppp/options use:


	then try to dial up.  pppd will complain with:

Dec 10 23:31:10 pm7600 pppd[1866]: Could not determine remote IP address: defaul
ting to
Dec 10 23:31:10 pm7600 pppd[1866]: Cannot determine ethernet address for proxy A
Dec 10 23:31:10 pm7600 pppd[1866]: local  IP address
Dec 10 23:31:10 pm7600 pppd[1866]: remote IP address

The (to be) deleted statements below prevent the calling compound if() at
line 342 from ever seeing the ipaddr spec if provided in ppp/options.ttyname.

I think the code is wrong, because it should not check override or
inspeed until *after* it has determined that the input string is
a number.  The code, as is, returns "success" any time it's parsing
an file and a speed is already set, which prevents
processing the IP address.

Not sure what this code is supposed to do.  It looks like a dup of the
if() stmt at lined 1356 and 1357, but reversed....  When I remove these
lines, it works again.

*** options.c   Tue Oct 17 12:50:28 2000
--- options.mod Mon Dec 11 00:21:55 2000
*** 1348,1355 ****
      char *ptr;
      int spd;

-     if (no_override && inspeed != 0)
-       return 1;
      spd = strtol(arg, &ptr, 0);
      if (ptr == arg || *ptr != 0 || spd == 0)
        return 0;
--- 1348,1353 ----