[Openswan dev] [Xl2tpd] Contributing to xl2tpd

Paul Wouters paul at xelerance.com
Wed May 4 13:15:33 EDT 2011


On Sun, 1 May 2011, Neil Ramsay wrote:

> I am interested contributing some development to xl2tpd.

Excellent :)

> My major goal is to make xl2tpd work with IPv6.

Good! You might be interested to peak at two ipv6 hacks of xl2tpd. Neither
one can be used, but it might be helpful to look at

http://code.google.com/p/xavl2tp/
http://blog.lifetoy.org/wp-content/uploads/2009/09/xl2tpd-ipv6.diff

One replaces ipv4, the other badly copy&pastes it.

> After exploring the code and some tinkering I would like to work on a
> few things:
> 
>     * typedef certain data, such as IP addresses (currently unsigned int)

It actually recently changed to struct in_addr, which might not be the best
choice. Perhaps a union?

>     * Replace deprecated functions with their newer POSIX equivalent,
>       such as bzero to memset

Sure!

>     * Check for memory leaks - I saw a few as I navigated around.

Ideally, we'd use the same memory leak detection as in openswan, using the
LEAK_DETECTIVE functions.

> I have not developed for open source projects before, so need some
> advice on how your project operates.

You should base your patches on the git repository.
See http://git.openswan.org/cgi-bin/gitweb.cgi?p=xl2tpd.git/.git;a=summary

To clone it, use:

git clone http://git.openswan.org/xl2tpd.git/.git xl2tpd.git

> Do you have coding style, commenting, and naming conventions?

For xl2tpd we don't, as we inherited the code as-is from l2tpd.

> What is the best path for patches?

Either publishing your own git tree for one of us to pull from, or
mailing git diff/commits to the mailinglist or bugtracker at

http://bugs.openswan.org/projects/xl2tpd/

If you work on different things at once and publish a git repo, please
use different topic branches, eg #posix and #memleak and #ipv6. That
will make it easier for us to merge things in.

Note that one feature I'd like to see as well is to have the xl2tpd
IP POOL code work with ipv6, so we can assign IPv6 addresses with
pppd over an IPv4 based IPsec tunnel.

Paul


More information about the Dev mailing list