Closed GoogleCodeExporter closed 9 years ago
Here is a dirty hack...
I enabled JFFS
Used sed/hex editor to replace all instances of /tmp/ppp with /tmp/vpn in a
copy of the /usr/sbin/pppd binary.
Place a copy of this modified binary which will now look in /tmp/vpn hard coded
into the folder /jffs/
On the routers init script, I have the following proof of concept:
sleep 60
mkdir /tmp/vpn
cp /tmp/ppp/* /tmp/vpn/
echo "ppp /jffs/pppd" >> pptpd.conf
killall pptpd
sleep 5
pptpd -c /tmp/pptpd/pptpd.conf -o /tmp/pptpd/options.pptpd -C 6
I can't seem edit the logic of the Firmware to more cleanly use this hack. So
either you go this dual binary route, or you have to change the behavior of
some logic etc.
This trick works, so it proves where the failure point is, same as it does with
the prior linked URL.
Let me know how I can help, or further test this, as I use PPPoE etc. I know
several users who can assist. Feel free to contact me.
Original comment by gregwjac...@gmail.com
on 8 Apr 2012 at 4:04
Copy of Patched Binary ;)
Tried using sed, it was messy. I just used Hex Fiend.app on the 'ol Mac and did
an ASCII search replace on /tmp/ppp with /tmp/vpn
Original comment by gregwjac...@gmail.com
on 8 Apr 2012 at 4:06
Attachments:
Here you can see the system with an active connection up and its behavior...
5429 root 516 S pptpd -c /tmp/pptpd/pptpd.conf -o /tmp/pptpd/options.pptpd -C
5430 root 524 S /usr/sbin/bcrelay -i br0 -o ppp[4-9].* -n
5431 root 524 S /usr/sbin/bcrelay -i ppp[4-9].* -o br0 -n
5433 root 632 S pptpd [my.ip.here.blanked:BB76 - 0000]
5434 root 1040 S /jffs/pppd local file /tmp/pptpd/options.pptpd 115200 192.168.1.1:192.168.1.201 ipparam my.ip.here.blanked
Any cleaner way I can at least tie in the workaround script?
Original comment by gregwjac...@gmail.com
on 8 Apr 2012 at 4:08
doh, made a mistake above with my copy paste init script...
sleep 60
mkdir /tmp/vpn
cp /tmp/ppp/* /tmp/vpn/
echo "ppp /jffs/pppd" >> /tmp/pptpd/pptpd.conf
killall pptpd
sleep 5
pptpd -c /tmp/pptpd/pptpd.conf -o /tmp/pptpd/options.pptpd -C 6
Original comment by gregwjac...@gmail.com
on 8 Apr 2012 at 4:10
Made some mistakes here ;)
logger PPTPd Quick Fix - Sleeping 60 seconds...
sleep 60
logger PPTPd Quick Fix - Patching pptpd configuration
echo "ppp /jffs/pppd" >> /tmp/pptpd/pptpd.conf
logger PPTPd Quick Fix - Copying pptpd to vpn conf dir
mkdir /tmp/vpn
cp /tmp/pptp/* /tmp/vpn/
logger PPTPd Quick Fix - stopping prior pptpd binaries
killall pptpd
killall bcrelay
sleep 5
logger PPTPd Quick Fix - starting pptpd with new configuration applied!
pptpd -c /tmp/pptpd/pptpd.conf -o /tmp/pptpd/options.pptpd -C 6 &
Bonus points, someone could alternatively just use sed, do inline patching of
the binary and copy and run it from /tmp/vpn/ and refer to it there... no need
to use JFFS etc.
perhaps this just after the mkdir above?
cp /usr/sbin/pppd /tmp/vpn/pppd
sed -i -e 's#/tmp/ppp/#/tmp/vpn/#' /tmp/vpn/pppd
Now if I could just get iOS5.0 to just do the $*@&* DNS lookups with a private
DNS host IP address GRRRRRRRRR
Original comment by gregwjac...@gmail.com
on 8 Apr 2012 at 5:05
This seems possibly 'restricted' to ND/K24 builds, since RT/K26 builds have
merged/included this commit (from Jean-Yves Avenard, branch tomato-RT-jyavenard
via branch Toastman-RT):
http://repo.or.cz/w/tomato.git/commit/82d98a546c763224b4b2b3da72ea4d29a2af9479
Original comment by augu...@bott.com.br
on 9 Apr 2012 at 6:28
Original comment by augu...@bott.com.br
on 9 Apr 2012 at 6:29
Fixed.
Original comment by augu...@bott.com.br
on 15 Jun 2012 at 7:04
Original issue reported on code.google.com by
gregwjac...@gmail.com
on 8 Apr 2012 at 2:54