Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Dec 2008 09:52:25 +0300
From:      "Denis Mysenko" <dustah@gmail.com>
To:        freebsd-net@freebsd.org
Subject:   Re: PPP / Routing table
Message-ID:  <d8b1b50a0812152252i890cfe1ye9b2ccb0c5cf4021@mail.gmail.com>
In-Reply-To: <200812151112.59847.max@love2party.net>
References:  <d8b1b50a0812150117u2b260b02t8c1221ff85ee4e05@mail.gmail.com> <200812151112.59847.max@love2party.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Dec 15, 2008 at 1:12 PM, Max Laier <max@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



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