Re: First release of kernel L2TP support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Well, L2TP is mostly a symmetric protocol, both ends need to have some kind
of server running to track the status of connections.

This module *only* does encapsulation/decapsulation so that network traffic
(ie the bulk) can pass through the networking stack without passing through
userspace. You still need a userspace daemon to handle the control packets
and session setup.

In a sense it's the same setup as PPP, a userspace daemon handling the
negotiation and the kernel driver transporting the traffic.

The appropriate modifications for the l2tpd have not been made yet, I'm
working on get pppd to talk first.

Hope this makes it clearer.

On Mon, Nov 17, 2003 at 05:39:05PM -0800, shell wrote:
> Hi,Martijn,
> 
>   After read your README I want to make sure whether this 
> module can work as L2TP server instead of userland's l2tpd 
> application.If so How do you test server function ? Do you 
> use win2k l2tp client or others ? 
>   
>   If there is some test diagrams in readme,that will be 
> perfect for newbies to your module or I am in double with 
> whether my test environment is wrong.
> 
> regards
> shell
> 
> On Tue, 18 Nov 2003 00:51:36 +1100
>  Martijn van Oosterhout <kleptog@svana.org> wrote:
> >I figured I'd get around to it, so now I have.
> >
> >Firstly, note that compiling your module with gcc 3.3.2 
> >and your kernel with
> >2.95 leads to many strange and wonderful effects.
> >
> >The basic structure is the server holding one UDP socket 
> >and each session is
> >represented by a PPPoX socket which is connect()ed to the 
> >UDP socket. This
> >has been tested and data has flowed back and forth.
> >
> >Note that as long as the socket hasn't been bound to a 
> >PPP device, you can
> >just read/write as a normal socket, so you don't even 
> >have to run PPP over
> >it if you don't want. Also, the code is not really 
> >specific to UDP either.
> >
> >Basically, I need help with a few small things:
> >
> >1. While this module provides socket setup/shutdown, 
> >encapsulation and
> >decapsulation, what other features are necessary for it 
> >to be useful?
> >
> >2. Locking. I've put in all the obvious locking that I 
> >could see other
> >modules doing but I really have no idea if it's enough.
> >
> >3. Packet transfer. Currently the module hooks into the 
> >UDP sockets
> >data_ready() hook and then scans the received packet list 
> >for the skb to
> >process. This is tedious at best and error prone/race 
> >condition at worst.
> >Unfortunatly I couldn't get any of the other hooks to 
> >work.
> >
> >UDP has some code in there to handle encapsulations but 
> >it's impossible
> >for a module to hook into. A small tweak to 
> >udp_encap_rcv() to call a
> >function pointer would be enough to simplify the transfer 
> >process.
> >
> >Note: while data has been tranferred back and forth 
> >between the session
> >sockets, I have not yet got PPP to use them because pppd 
> >requires the FD to
> >be a character device. My test system does not have a new 
> >pppd yet but I've
> >written an (lightly tested) pppd plugin whose sole 
> >purpose in life is to
> >tell pppd to use the PPPoX socket directly.
> >
> >There are a bunch of test programs in the tests/ subdir 
> >if you want to see
> >it in action. Currently all tested under UML and the 
> >module unloads properly
> >afterwards.
> >
> >A file in made in /proc to track all current sessions. It 
> >looks something
> >like:
> >==========================
> >sock *  :l_sock *:userdata   Address
> >a1011840:a0378600:a0378600   00000000:1702 Y MAGIC OK
> > sock *  :session*:userdata   Address :Port    SAddrT:S 
> >-> DAddrT:S    S
> > a1011c00:a037ea20:a037ea20   7F000001:1701    0003/0004 
> >-> 0001/0002   1 Y MAGIC OK
> >a1011480:a0378400:a0378400   00000000:1701 Y MAGIC OK
> > sock *  :session*:userdata   Address :Port    SAddrT:S 
> >-> DAddrT:S    S
> > a10110c0:a037e9e0:a037e9e0   7F000001:1702    0001/0002 
> >-> 0003/0004   1 Y MAGIC OK
> >==========================
> >It needs a bit of polish and there's still a lot of debug 
> >code in the in
> >general, but it does work.
> >
> >The only changed required in the kernel in some small 
> >bits added to
> >if_pppox.h (included). The rest is entirely self 
> >contained. See README for
> >more details.
> >
> >If anyone would like to try it out, the code is at:
> >http://svana.org/kleptog/kl2tp/kl2tp-0.1.tar.gz
> >
> >Have a nice day. I'll be back to answer questions in the 
> >morning.
> >-- 
> >Martijn van Oosterhout   <kleptog@svana.org> 
> > http://svana.org/kleptog/
> >>"All that is needed for the forces of evil to triumph is 
> >>for enough good
> >>men to do nothing." - Edmond Burke
> >>"The penalty good people pay for not being interested in 
> >>politics is to be
> >>governed by people worse than themselves." - Plato
> 

-- 
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> "All that is needed for the forces of evil to triumph is for enough good
> men to do nothing." - Edmond Burke
> "The penalty good people pay for not being interested in politics is to be
> governed by people worse than themselves." - Plato

Attachment: pgp00120.pgp
Description: PGP signature


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux