Subject: misc/18418: pppd route created with wrong interface
To: None <gnats-bugs@gnats.netbsd.org>
From: None <chris@cjones.org>
List: netbsd-bugs
Date: 09/25/2002 11:42:58
>Number:         18418
>Category:       misc
>Synopsis:       pppd route created with wrong interface
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 25 10:44:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Chris Jones
>Release:        NetBSD 1.6
>Organization:
	
>Environment:
	
	
System: NetBSD ns 1.6 NetBSD 1.6 (NS) #0: Mon Sep 23 13:18:58 MDT 2002 chris@legolas.mt.sri.com:/usr/src/sys/arch/i386/compile/NS i386
Architecture: i386
Machine: i386

Machine is a router, IPSec gateway, and dialup server.  More detailed
information follows:

Abbreviated routing table:
default            206.127.79.89      UGS         3   426388      -  we1
206.127.76.64/26   link#1             UC         18        0      -  fxp0
206.127.76.97      00:90:27:87:95:55  UHLc        1   103621      -  lo0
206.127.76.136/29  206.127.76.104     UGS         0      246      -  fxp0
206.127.79.88/29   link#2             UC          1        0      -  we1

Interface information:
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        address: 00:90:27:87:95:55
        inet 206.127.76.97 netmask 0xffffffc0 broadcast 206.127.76.127
we1: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        address: 00:00:c0:50:b9:0a
        inet 206.127.79.91 netmask 0xfffffff8 broadcast 206.127.79.95
ppp0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1524
        inet 206.127.76.97 -> 206.127.76.129 netmask 0xffffffc0
ppp1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
        inet 206.127.76.97 -> 206.127.76.130 netmask 0xffffffc0

IPSec configured as a gateway between 206.127.76.64/26 and a remote network,
and 206.127.76.128/27 and the same remote network.  Running racoon.

>Description:
When a user dials in, the route added by pppd either doesn't get added,
or gets added on the wrong interface.

Scenario 1:  The user's assigned IP (206.127.76.87) is in the range for the
local net.  When he dials in, he gets two route entries added.  One
has "link#1" as its next-hop, and the other has this machine's MAC addr as
its next-hop (results of the proxyarp pppd option).  Both entries have
fxp0 (the interface for the local network) listed as their interface,
instead of ppp1.  Traffic from this node to the remote one doesn't go
through, presumably because it's sent over fxp0.

Scenario 2:  The user's assigned IP is in a free range, not listed in this
node's routing tables (206.127.76.130).  When he dials in, he gets no route
entries added.  Traffic to the remote node doesn't go through, presumably
because it's sent over the default interface (we1).

To make things stranger, another user is using ppp0, and he is reachable.
His route entry (from netstat) looks like this:

206.127.76.129     206.127.76.97      UH          0     4491      -  ppp0

>How-To-Repeat:
See above.
>Fix:
Unknown.
>Release-Note:
>Audit-Trail:
>Unformatted: