Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Mar 2009 15:14:02 -0600
From:      Brett Glass <brett@lariat.net>
To:        net@freebsd.org
Subject:   Re: Problems with inward PPTP tunnel
Message-ID:  <200903222114.PAA17884@lariat.net>

next in thread | raw e-mail | index | archive | help
Just a quick followup: I've finally figured out a workaround. A 
hack, to be sure, but a workaround nonetheless.

I've created a shell script called /etc/ppp/pppfix, which looks like this:

#!/bin/sh
# Fix up PPP routes
sleep 1;
logger -i -t ppp Fixing route: route change -host $1 $2 -ifp $3
route change -host $1 $2 -ifp $3

I invoke this from the relevant section of /etc/ppp.linkup with the line

!bg /etc/ppp/pppfix HISADDR MYADDR INTERFACE

Note that the "sleep" may not be absolutely necessary, but it seems 
like a good idea just in case there's a race condition.

I also added the following lines in the relevant section of ppp.linkdown:

iface clear
delete! HISADDR
delete! ALL
shell arp -d HISADDR
quit all

I found that if I did not do this, the modified route persisted 
after the connection terminated. The "arp -d HISADDR" should only 
be used if proxy arp is being done, and may not be strictly 
necessary; I wanted to make sure I tore down any residual proxy arp entry.

Of course, all of this is an awful hack and the relevant code in 
userland PPP still needs to be looked at.

--Brett Glass







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903222114.PAA17884>