FS#8498 - Enable kernel-mode for rp-pppoe

Attached to Project: Arch Linux
Opened by Damjan Georgievski (damjan) - Saturday, 03 November 2007, 20:13 GMT
Last edited by Isenmann Daniel (ise) - Tuesday, 12 February 2008, 21:14 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To Isenmann Daniel (ise)
Architecture All
Severity Low
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

To enable kernel mode in the rp-pppoe pppoe-server you need to compile it with the --enable-plugin=/ppp-2.4.4 option. but that option needs a small patch (stolen from the Slackware build).

Attached are a patch to the PKGBUILD and the patch for rp-pppoe's ./configure.

This task depends upon

Closed by  Isenmann Daniel (ise)
Tuesday, 12 February 2008, 21:14 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in package 3.8-3 in testing, please test it.
Comment by Tobias Powalowski (tpowa) - Sunday, 04 November 2007, 09:22 GMT
somehow it doens't build anthying here, also this is only for kernel 2.4.x and not 2.6.x
Comment by Isenmann Daniel (ise) - Sunday, 04 November 2007, 13:29 GMT
As tpowa said already, kernel mode is for kernel 2.4.x. I can't find anything in the doc of this package for kernel mode on kernel 2.6.x
Can you provide more information for your references?
Comment by Damjan Georgievski (damjan) - Monday, 05 November 2007, 16:36 GMT
How did you come to the conclusion that it's for 2.4.x kernel only?? That --enable-plugin=/ppp-2.4.4 is the ppp version - not kernel version.

Actually it's not dependent on the kernel version.

@tpowa, why it didn't build it for you??
I've tested the PKGBUILD as it is, on my Arch and it builds ok, and I also tested the resulting binary which worked ok.

You can see the patch and the Slackbuild as it's used in Slackware here: ftp://ftp.slackware.com/pub/slackware/slackware-12.0/source/n/rp-pppoe/
Comment by Tobias Powalowski (tpowa) - Monday, 05 November 2007, 17:22 GMT
just read the documentation on ppp tarball,
there is no mention of it and also the configure doesn't contain any info on it.
There are no extra files added to the package etc.
so how should we see that it has an effect.
gentoo ebuild does also download ppp source to ensure the compilation, you tell the configure to use a directory that does not exist.
that is just my observation.
Comment by Isenmann Daniel (ise) - Monday, 05 November 2007, 17:41 GMT
Same for me. It builds with your patches, but there are no extra files added to the package. I tried to download the ppp source and extract it there for configure --enable-plugin=<dir/to/ppp-src/>. But the same, no extra files in package.

In the documentation (rp-pppoe-3.8/doc/KERNEL-MODE-PPPOE) of the package it says: "RP-PPPoE now supports kernel-mode PPPoE on Linux kernels 2.4.x." and "Make sure you are running kernel 2.4.x on the machine you will build rp-pppoe on." And that's all. No kernel 2.6.x is mentioned.
Comment by Damjan Georgievski (damjan) - Monday, 05 November 2007, 18:05 GMT
there is one more file added in the package I built, it's /etc/ppp/plugins/rp-pppoe.so .. which is not that important by itself.

The thing that the option does is to enable "pppoe-server -k" option. BTW pppoe-server without -k does not even work.
Comment by Damjan Georgievski (damjan) - Monday, 05 November 2007, 18:07 GMT
@ise.
that comment is obviosly added in the kernel 2.4 time and has not been updated to reflect the existence of 2.6.
Comment by Damjan Georgievski (damjan) - Monday, 05 November 2007, 18:12 GMT
Ok, this is what happens.
The directory in --enable-plugin= is not important since we have the header files of ppp in /usr/include/pppd/ by the pppd package.

The other things it adds is "#define HAVE_LINUX_KERNEL_PPPOE 1" in config.h which is then checked in pppoe-server.c
Comment by Roman Kyrylych (Romashka) - Saturday, 09 February 2008, 19:40 GMT
any more progress?
Comment by Isenmann Daniel (ise) - Sunday, 10 February 2008, 11:30 GMT
I tried it again, but I can't get it to work. Tried the instructions above from Damjan, but no success. It compiles with his instructions, but the -k option for pppoe-server doesn't appear and complains about an invalid option. I believe, that this options still just works for kernel 2.4.X, because even the configure script prints: "checking for Linux 2.4.X kernel-mode PPPoE support... no" and there appears no line for kernel 2.6.x

@Damjan: Have you compiled it successfully and it works with the -k option? If yes, please send me the compiled package.
Comment by Roman Kyrylych (Romashka) - Sunday, 10 February 2008, 11:33 GMT
maybe a Makefile generated by ./configure on Damjan's machine will be helpful as well.
Comment by Damjan Georgievski (damjan) - Monday, 11 February 2008, 16:59 GMT
I've tested again, and this time it didn't work.
I see that the test in ./configure now fails with:
configure:5622: checking for Linux 2.4.X kernel-mode PPPoE support
configure:5657: gcc -o conftest -g -O2 conftest.c >&5
In file included from /usr/include/linux/if_pppox.h:23,
from conftest.c:58:
/usr/include/linux/if_pppol2tp.h:30: error: field 'addr' has incomplete type

This is either a gcc or a kernel-headers (I have 2.6.23.1-2) problem. I'll investigate further how to overcome this.
Comment by Damjan Georgievski (damjan) - Monday, 11 February 2008, 18:33 GMT
Ok, I've created a working patch... the problem seems to be with the kernel-headers (or rp-pppoe's use of them):
configure | 4 +++-
plugin.c | 1 -
2 files changed, 3 insertions(+), 2 deletions(-)

The patch is simple, adds #include <linux/in.h> in 2 tests in ./configure, removes -ansi from the CFLAGS and removes #include <linux/if_ppp.h> from plugin.c, obviously not needed :).

The built package is locate here, for reference:
http://damjan.softver.org.mk/rp-pppoe-3.8-3-i686.pkg.tar.gz (this will be removed in future).

Comment by Damjan Georgievski (damjan) - Tuesday, 12 February 2008, 13:23 GMT
BTW, because of #8757 user-space mode of pppoe-server also doesn't work.

Loading...