From nobody@FreeBSD.ORG  Fri Nov 17 20:30:58 2000
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id B889F37B479; Fri, 17 Nov 2000 20:30:58 -0800 (PST)
Message-Id: <20001118043058.B889F37B479@hub.freebsd.org>
Date: Fri, 17 Nov 2000 20:30:58 -0800 (PST)
From: greg@macquarrie.com.au
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@FreeBSD.org
Subject: User ppp assigns wrong interface to added route
X-Send-Pr-Version: www-1.0

>Number:         22930
>Category:       misc
>Synopsis:       User ppp assigns wrong interface to added route
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    brian
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 17 20:40:00 PST 2000
>Closed-Date:    Sat Nov 18 18:23:49 PST 2000
>Last-Modified:  Sun Nov 19 09:10:01 PST 2000
>Originator:     Greg Quinlan
>Release:        4.1.1-Stable & 3.5-Stable
>Organization:
Macquarrie Corp.
>Environment:
FreeBSD dns0.macquarrie.com.au 3.5-STABLE FreeBSD 3.5-STABLE #0: Thu Nov 16 12:3
3:08 EST 2000     greg@dns0.macquarrie.com.au:/usr/src/sys/compile/server  i386
>Description:
On an incoming ppp connection, ppp assigns the wrong interface name to an added network route.

This means that the new newtork can not function.

-----8<----- extract from ppp.conf

incoming:
 enable chap
 disable pap
 accept dns
 set ifaddr 10.1.7.1 10.1.7.2 255.255.255.0
 set dns 10.1.0.254
 set nbns 10.1.0.254
 # enable proxyall
 add 10.1.5.0/24 10.1.7.2  <<

------>8--------------

netstat -rn

Routing tables

Internet:
Destination        Gateway            Flags     Refs     Use     Netif Expire
default            139.130.59.129     UGSc       11     7961     ppp0
10.1/24            link#1             UC          0        0      xl0
10.1.0.17          0:d0:b7:83:f7:f2   UHLW        1    16540      xl0   1148
10.1.0.18          0:d0:b7:90:8f:2d   UHLW        0      846      xl0    600
10.1.0.251         0:60:8:cd:39:89    UHLW        2    31612      xl0   1172
10.1.0.254         0:0:4c:d1:8e:54    UHLW        0     1885      lo0
10.1.5/24          10.1.7.2           UGSc        0        4     ppp0 <<
10.1.6/24          10.1.0.251         UGSc        0    19761      xl0
10.1.7.2           10.1.7.1           UH          1        0     tun0
127.0.0.1          127.0.0.1          UH          1  1399284      lo0

The route must be deleted by hand and re-added giving:

10.1.5/24          10.1.7.2           UGSc        0        4     tun0




>How-To-Repeat:

Have one link dialed out using kernel ppp (pppd) and one link dialed in using user ppp.

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->brian 
Responsible-Changed-By: brian 
Responsible-Changed-When: Sat Nov 18 18:18:34 PST 2000 
Responsible-Changed-Why:  
ppp's mine.  A followup is on it's way 

http://www.freebsd.org/cgi/query-pr.cgi?pr=22930 

From: Brian Somers <brian@Awfulhak.org>
To: greg@macquarrie.com.au
Cc: freebsd-gnats-submit@FreeBSD.ORG, brian@Awfulhak.org
Subject: Re: misc/22930: User ppp assigns wrong interface to added route 
Date: Sun, 19 Nov 2000 02:15:32 +0000

 > >Number:         22930
 > >Category:       misc
 > >Synopsis:       User ppp assigns wrong interface to added route
 [.....]
 > incoming:
 >  enable chap
 >  disable pap
 >  accept dns
 >  set ifaddr 10.1.7.1 10.1.7.2 255.255.255.0
 >  set dns 10.1.0.254
 >  set nbns 10.1.0.254
 >  # enable proxyall
 >  add 10.1.5.0/24 10.1.7.2  <<
 > 
 > ------>8--------------
 > 
 > netstat -rn
 > 
 > Routing tables
 > 
 > Internet:
 > Destination        Gateway            Flags     Refs     Use     Netif Expire
 > default            139.130.59.129     UGSc       11     7961     ppp0
 > 10.1/24            link#1             UC          0        0      xl0
 > 10.1.0.17          0:d0:b7:83:f7:f2   UHLW        1    16540      xl0   1148
 > 10.1.0.18          0:d0:b7:90:8f:2d   UHLW        0      846      xl0    600
 > 10.1.0.251         0:60:8:cd:39:89    UHLW        2    31612      xl0   1172
 > 10.1.0.254         0:0:4c:d1:8e:54    UHLW        0     1885      lo0
 > 10.1.5/24          10.1.7.2           UGSc        0        4     ppp0 <<
 > 10.1.6/24          10.1.0.251         UGSc        0    19761      xl0
 > 10.1.7.2           10.1.7.1           UH          1        0     tun0
 > 127.0.0.1          127.0.0.1          UH          1  1399284      lo0
 > 
 > The route must be deleted by hand and re-added giving:
 > 
 > 10.1.5/24          10.1.7.2           UGSc        0        4     tun0
 
 This is happening due to a mis-configuration.
 
 If you put a hard-coded ``add'' line (ie, one without HISADDR in it), 
 ppp simply runs it.
 
 You can probably get away with changing your add line to
 
   add 10.1.5.0/24 HISADDR
 
 so that ppp re-adjusts the route when the interface address changes, 
 or alternatively (and more correctly), put the above line (with 
 HISADDR) in ppp.linkup so that it's added *after* the interface has 
 been negotiated and set up.
 -- 
 Brian <brian@Awfulhak.org>                        <brian@[uk.]FreeBSD.org>
       <http://www.Awfulhak.org>                   <brian@[uk.]OpenBSD.org>
 Don't _EVER_ lose your sense of humour !
 
 
 
State-Changed-From-To: open->closed 
State-Changed-By: brian 
State-Changed-When: Sat Nov 18 18:23:49 PST 2000 
State-Changed-Why:  
This is a configuration error 

http://www.freebsd.org/cgi/query-pr.cgi?pr=22930 

From: "Greg Quinlan" <greg@macquarrie.com.au>
To: "Brian Somers" <brian@Awfulhak.org>
Cc: <freebsd-gnats-submit@FreeBSD.ORG>, <brian@Awfulhak.org>
Subject: Re: misc/22930: User ppp assigns wrong interface to added route 
Date: Mon, 20 Nov 2000 01:59:58 +1100

 Thanks Brian! :))
 
 Maybe someone should change the 'man' page for ppp.
 
 I had a problem with the man page!
 
 It said :- it is possible to use HISADDR, MYADDR .... It does not say that
 the link will be given a random interface name if you DO NOT use HISADDR. Or
 say it is
 important that you use HISADDR for new incoming IP addresses............just
 traps for newbies I suppose :)
 
 It also does not help when you read the 'man' examples of 'add' like
 this....
 
 ------- start ppp man entract
 >
 >The entry in /etc/ppp/ppp.conf on awfulhak (the initiator) >should contain
 the following:
 >
 >           ui-gate:
 >            set escape 0xff
 >            set device ui-gate:ppp-in/tcp
 >            set dial
 >            set timeout 30
 >            set log Phase Chat Connect hdlc LCP IPCP CCP tun
 >            set ifaddr 10.0.4.2 10.0.4.1
 >            add 10.0.2.0/24 10.0.4.1   <<
 
 ---- END ppp man extract
 
 Maybe this should read "add 10.0.2.0/24 HISADDR" instead.
 
 Many thanks again, Brian!
 
 Greg
 
 
 :)
 
 ----- Original Message -----
 From: "Brian Somers" <brian@Awfulhak.org>
 To: <greg@macquarrie.com.au>
 Cc: <freebsd-gnats-submit@FreeBSD.ORG>; <brian@Awfulhak.org>
 Sent: Sunday, November 19, 2000 1:15 PM
 Subject: Re: misc/22930: User ppp assigns wrong interface to added route
 
 
 > > >Number:         22930
 > > >Category:       misc
 > > >Synopsis:       User ppp assigns wrong interface to added route
 > [.....]
 > > incoming:
 > >  enable chap
 > >  disable pap
 > >  accept dns
 > >  set ifaddr 10.1.7.1 10.1.7.2 255.255.255.0
 > >  set dns 10.1.0.254
 > >  set nbns 10.1.0.254
 > >  # enable proxyall
 > >  add 10.1.5.0/24 10.1.7.2  <<
 > >
 > > ------>8--------------
 > >
 > > netstat -rn
 > >
 > > Routing tables
 > >
 > > Internet:
 > > Destination        Gateway            Flags     Refs     Use     Netif
 Expire
 > > default            139.130.59.129     UGSc       11     7961     ppp0
 > > 10.1/24            link#1             UC          0        0      xl0
 > > 10.1.0.17          0:d0:b7:83:f7:f2   UHLW        1    16540      xl0
 1148
 > > 10.1.0.18          0:d0:b7:90:8f:2d   UHLW        0      846      xl0
 600
 > > 10.1.0.251         0:60:8:cd:39:89    UHLW        2    31612      xl0
 1172
 > > 10.1.0.254         0:0:4c:d1:8e:54    UHLW        0     1885      lo0
 > > 10.1.5/24          10.1.7.2           UGSc        0        4     ppp0 <<
 > > 10.1.6/24          10.1.0.251         UGSc        0    19761      xl0
 > > 10.1.7.2           10.1.7.1           UH          1        0     tun0
 > > 127.0.0.1          127.0.0.1          UH          1  1399284      lo0
 > >
 > > The route must be deleted by hand and re-added giving:
 > >
 > > 10.1.5/24          10.1.7.2           UGSc        0        4     tun0
 >
 > This is happening due to a mis-configuration.
 >
 > If you put a hard-coded ``add'' line (ie, one without HISADDR in it),
 > ppp simply runs it.
 >
 > You can probably get away with changing your add line to
 >
 >   add 10.1.5.0/24 HISADDR
 >
 > so that ppp re-adjusts the route when the interface address changes,
 > or alternatively (and more correctly), put the above line (with
 > HISADDR) in ppp.linkup so that it's added *after* the interface has
 > been negotiated and set up.
 > --
 > Brian <brian@Awfulhak.org>                        <brian@[uk.]FreeBSD.org>
 >       <http://www.Awfulhak.org>                   <brian@[uk.]OpenBSD.org>
 > Don't _EVER_ lose your sense of humour !
 >
 >
 >
 
 
 

From: Brian Somers <brian@Awfulhak.org>
To: "Greg Quinlan" <greg@macquarrie.com.au>
Cc: "Brian Somers" <brian@Awfulhak.org>,
	freebsd-gnats-submit@FreeBSD.ORG, brian@Awfulhak.org
Subject: Re: misc/22930: User ppp assigns wrong interface to added route 
Date: Sun, 19 Nov 2000 17:01:24 +0000

 > It also does not help when you read the 'man' examples of 'add' like
 > this....
 
 Ah, yes, this stuff is a bit wrong :-I  I've made some modifications. 
 Please let me know if they don't make sense.
 
 Cheers.
 
 -- 
 Brian <brian@Awfulhak.org>                        <brian@[uk.]FreeBSD.org>
       <http://www.Awfulhak.org>                   <brian@[uk.]OpenBSD.org>
 Don't _EVER_ lose your sense of humour !
 
 
 
>Unformatted:
