PPP / Routing table

Denis Mysenko dustah at gmail.com
Mon Dec 15 22:52:28 PST 2008


On Mon, Dec 15, 2008 at 1:12 PM, Max Laier <max at love2party.net> wrote:

>
> It is also unclear to me why you'd see RTF_GATEWAY on ptp routes.  It might
> help to ktrace poptop to see what kind of ioctl it is issuing.
>
>
Actually, as far as I understand (and according to kdump as well) - Poptop
has nothing to do with
interfaces or VPN itself - Poptop simply connects userland ppp with
connected users, the rest is the task of ppp. So either this is
a problem of ppp or OS/kernel.

So I did ktrace on ppp, ppp reads ppp.secret file to get necessary IP
address and issues the following call:
     CALL  ioctl(0x1,SIOCAIFADDR, 0xbfbfdaac)
And also these two calls:
     CALL  __sysctl(0xbfbfda50,0x6,0,0xbfbfda78,0,0)
     CALL  __sysctl(0xbfbfda50,0x6,0x8127800,0xbfbfda78,0,0)

At the end of the link establishment process, ppp also issues these two
calls:
     CALL  ioctl(0x1,SIOCGIFFLAGS,0xbfbfdf8c)
     CALL  ioctl(0x1,SIOCSIFFLAGS,0xbfbfdf8c)

I compared two ktrace log files - from successful and from unsuccessful VPN
connections and these ioctl() calls are equal.

I ran through sources of ppp, these calls are issued by ipip.c and iface.c -
initially to set up interface and then to change it's flags. Interface is
chosen correctly for these calls.

Another interesting thing, probably related to the last two calls, is when
the second client connects to the Poptop server,
initial routing table of FreeBSD contains a good entry with correct tunnel
interface and UH flags, then entry flags are updated to UGH, then entry
interface is updated to incorrect tunnel of the previous client.

Just a note - ppp.log contains correct tunnel interfaces for all clients, as
well as correct IP addresses in IPCP part.

-- 
Sincerely,
-- 
Denis Mysenko, CCNA, MCP, MCSA
Technologies of the Smart City Ltd
Phone: +7 903 913-2651
ICQ: 555955


More information about the freebsd-net mailing list