PPP and Route Delete

Luiz Otavio O Souza lists.br at gmail.com
Tue Jan 11 09:41:15 UTC 2011


On Jan 10, 2011, at 2:25 PM, Melissa Jenkins wrote:
> 
> I've been working on migrating a PPTP server from FreeBSD 7.1 to FreeBSD 8.1.  The server is configured using PopTop (from ports) and PPP (/usr/sbin) rather than MPD.  (Before anybody tells me to use MPD we can't because it doesn't inject packets into the kernel in the same way and it's not possible to filter on them correctly)
> 
> Basic PPTP connection works properly.  
> 
> The fun happens when I have two simultaneous users.  The first one to DISCONNECT deletes the routes for both of them and all PPTP traffic ceases.
> 
> I believe this is because of the third RTM_DELETE message in the route monitor output below (From FreeBSD 8.1):


I believe it's the second call... but probably doesn't matter...

> 
> got message of size 304 on Mon Jan 10 15:48:40 2011
> RTM_CHANGE: Change Metrics or flags: len 304, pid: 7871, seq 3, errno 0, flags:<UP,DONE,STATIC>
> locks:  inits: <mtu>
> sockaddrs: <DST,GATEWAY,NETMASK,IFP,IFA>
> 10.0.0.31 tun0 (255) ffff ffff ffff tun0 10.0.5.1
> 
> got message of size 232 on Mon Jan 10 15:48:40 2011
> RTM_DELETE: Delete Route: len 232, pid: 7871, seq 4, errno 0, flags:<DONE,STATIC>
> locks:  inits:
> sockaddrs: <DST,GATEWAY,NETMASK>
> 10.0.0.31 tun0 (255) ffff ffff ffff
> 
> got message of size 168 on Mon Jan 10 15:48:40 2011
> RTM_IFINFO: iface status change: len 168, if# 11, link: up, flags:<PTP,RUNNING,MULTICAST>
> 
> got message of size 192 on Mon Jan 10 15:48:40 2011
> RTM_DELETE: Delete Route: len 192, pid: 0, seq 0, errno 0, flags:<UP,GATEWAY,STATIC>
> locks:  inits:
> sockaddrs: <DST,GATEWAY,NETMASK>
> default 10.0.5.1 default
> 
> got message of size 116 on Mon Jan 10 15:48:40 2011
> RTM_DELADDR: address being removed from iface: len 116, metric 0, flags:
> sockaddrs: <NETMASK,IFP,IFA,BRD>
> 255.255.255.255 tun0 10.0.5.1 10.0.0.31
> 
> On FreeBSD 7.1 the output is as follows:
> 
> got message of size 232 on Mon Jan 10 16:18:11 2011
> RTM_CHANGE: Change Metrics or flags: len 232, pid: 43773, seq 3, errno 0, flags:<UP,DONE,STATIC>
> locks:  inits: <mtu>
> sockaddrs: <DST,GATEWAY,NETMASK>
> 10.0.0.31 tun14 (255) ffff ffff ffff
> 
> got message of size 232 on Mon Jan 10 16:18:11 2011
> RTM_DELETE: Delete Route: len 232, pid: 43773, seq 4, errno 0, flags:<GATEWAY,DONE,STATIC>
> locks:  inits: 
> sockaddrs: <DST,GATEWAY,NETMASK>
> 10.0.0.31 tun14 (255) ffff ffff ffff
> 
> got message of size 168 on Mon Jan 10 16:18:11 2011
> RTM_IFINFO: iface status change: len 168, if# 23, link: unknown, flags:<PTP,RUNNING,MULTICAST>
> 
> 
> There are quite a few additional messages on connect as well but I don't believe they are impacting on my issue.  Looking in usr.sbin/ppp/route.c I can't see any changes that would obviously impact on this :(
> 
> My ppp config for both 7.1 & 8.x is as follows:
> 
> default:
> set log Chat LCP IPCP CCP tun command
> 
> pptp:
> set timeout 0
> set login
> set ifaddr 10.0.5.1/24 HISADDR 255.255.255.255
> disable deflate pred1
> deny deflate pred1
> enable MPPE
> accept MPPE
> enable chap81 
> set mppe 128 stateless
> 
> I have also confirmed the same behaviour on 8.0
> 
> Any ideas??


How are you setting the IP address for vpn connections (radius?) ?

I'm also using poptop with ppp without any problem, here is my ppp.conf (look at differences on 'set ifaddr'):

default:
 set log Phase Chat LCP IPCP CCP tun command Warning Error
 ident user-ppp VERSION (built COMPILATIONDATE)

pptp:
 set ifaddr 10.10.0.1 10.10.3.100-10.10.3.104 255.255.255.255
 set timeout 0
 enable chap81
 disable deflate pred1
 deny deflate pred1
 enable proxy
 accept dns
 set dns 10.10.0.1
 set nbns 10.10.0.11
 set mtu max 1490
 set mru 1490
 disable echo
 set echoperiod 5
 disable ipv6cp
 set mppe 128 stateless

Some details:

10.10.0.1 is the internal IP on the pptp server;
10.10.3.100-10.10.3.104 is my range of IPs used for vpn purposes (i'm using 10.10.0.0/22 as internal network).

Regards,
Luiz


More information about the freebsd-net mailing list