PPP and Route Delete

Li, Qing qing.li at bluecoat.com
Tue Jan 11 15:54:00 UTC 2011


The self-pointing route 10.0.5.1 should have multiple references set on
it, and that route won't be deleted from the routing table until the 
last reference is removed.
 
You can verify that by checking the "netstat" output, the "Ref" column
after tun1 has been created.
 
The above has been verified with both mpd and other tests.
 
-- Qing

________________________________

From: owner-freebsd-net at freebsd.org on behalf of Melissa Jenkins
Sent: Tue 1/11/2011 3:34 AM
To: freebsd-net at freebsd.org
Subject: Re: PPP and Route Delete



> 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.

Just been working my way through the PPP code - which doesn't actually appear to have changed.

However, the netinet/in.c does have some comments in the SVN history about deleting the loopback address, this appears to have been merged in as part of the 8 release cycle (r197231 perhaps) (though I'm not an expert at SVN etc)

What should happen when there are multiple interfaces with the same address.  When I have two tunnels configured they show up as (eg)

tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1398
        options=80000<LINKSTATE>
        inet 10.0.5.1 --> 10.0.0.31 netmask 0xffffffff
        Opened by PID 12616

tun1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1398
        options=80000<LINKSTATE>
        inet 10.0.5.1 --> 10.0.0.32 netmask 0xffffffff
        Opened by PID 12630

If the loop back address is 10.0.5.1 and closing one of them deletes the loopback what should happen?  Should it delete all routes that refer to 10.0.5.1?

Mel


_______________________________________________
freebsd-net at freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"




More information about the freebsd-net mailing list