Andreas Barth <[EMAIL PROTECTED]>
>Jason Thomas ([EMAIL PROTECTED]) [060811 00:10]:
>> Hi, Below is a simple patch to the debian package that will enable
>> kernel mode in pppoe-server.

>Unfortunatly, this patch is not enough - the plugin also needs to be
>addeed to the binary package, and documentation needs to be added (also
>for the users to understand why they should (not) use the plugin). (And
>also the path to pppd needs to be added and/or a build-dependency on
>pppd itself needs to be added.)

I tried again to enable kernel mode for pppoe-server and finally succeeded. The plugin does *not* need to be added to the binary package, it would not even need to be built, the plugin from the ppp package just works nicely (and pppoe already depends on ppp) It must be built however, because of the braindead configure script.

So first we need to add the --enable-plugin option to configure
otherwise the configure script will not add the desired

#define HAVE_LINUX_KERNEL_PPPOE 1

to config.h

Second we need to remove the -ansi from CFLAGS, otherwise compilation of plugin.c (although unnecessary) will fail, because __u64 is not defined
(at least on newer gcc's)

Third we need to remove all path information from PLUGIN_PATH, so PLUGIN_PATH is simply rp-pppoe.so This is becaus PLUGIN_PATH is just pushed as argument to pppd, but pppd already knows how from what path to load its plugin.

Fourth (not included in my patch) a build-dependency on ppp-dev is needed.

I do not understand why a build-dependency on pppd would be needed. Also why should we add documentation? -k is documented and clearly optional.


--

Mit freundlichen Grüßen / with kind regards

Nils Rennebarth, Software Developer

--
Funkwerk IP-Appliances GmbH
Mönchhaldenstraße 28
D-70191 Stuttgart

Tel: +49 711 900300 - 0
Fax: +49 711 900300 - 90

E-Mail: [EMAIL PROTECTED]

Location: GmbH Neu-Ulm, Local Court Memmingen, HRB 13043
Managing Directors: Michael Marsanu, Soenke Weisner

--------------------------------
The information contained in this e-mail has been carefully researched,
but the possibility of it being inapplicable in individual cases cannot
be ruled out. We therefore regret that we cannot accept responsibility
or liability of any kind whatsoever for the correctness of the
information given. Please notify us if you discover that information is
inapplicable.
diff -Naru2 rp-pppoe-3.8/debian/rules rp-pppoe-3.8-new/debian/rules
--- rp-pppoe-3.8/debian/rules	2006-11-27 12:20:03.000000000 +0100
+++ rp-pppoe-3.8-new/debian/rules	2007-07-03 15:53:19.000000000 +0200
@@ -8,5 +8,5 @@
 	dh_testdir
 #	test -f configure || (aclocal; autoconf)
-	test -f src/Makefile || (cd src && PPPD=/usr/sbin/pppd ./configure)
+	test -f src/Makefile || (cd src && PPPD=/usr/sbin/pppd ./configure --enable-plugin)
 	$(MAKE) -C src
 	touch build-stamp
diff -Naru2 rp-pppoe-3.8/src/configure rp-pppoe-3.8-new/src/configure
--- rp-pppoe-3.8/src/configure	2006-04-26 02:42:08.000000000 +0200
+++ rp-pppoe-3.8-new/src/configure	2007-07-03 16:07:09.000000000 +0200
@@ -5694,5 +5694,5 @@
 
 if test "$GCC" = yes; then
-	CFLAGS="$CFLAGS -Wall -Wstrict-prototypes -ansi"
+	CFLAGS="$CFLAGS -Wall -Wstrict-prototypes"
 fi
 
diff -Naru2 rp-pppoe-3.8/src/configure.in rp-pppoe-3.8-new/src/configure.in
--- rp-pppoe-3.8/src/configure.in	2006-04-26 02:42:08.000000000 +0200
+++ rp-pppoe-3.8-new/src/configure.in	2007-07-03 16:06:35.000000000 +0200
@@ -181,5 +181,5 @@
 dnl GCC warning level
 if test "$GCC" = yes; then
-	CFLAGS="$CFLAGS -Wall -Wstrict-prototypes -ansi"
+	CFLAGS="$CFLAGS -Wall -Wstrict-prototypes"
 fi
 
diff -Naru2 rp-pppoe-3.8/src/Makefile.in rp-pppoe-3.8-new/src/Makefile.in
--- rp-pppoe-3.8/src/Makefile.in	2006-04-26 02:42:08.000000000 +0200
+++ rp-pppoe-3.8-new/src/Makefile.in	2007-07-03 16:17:57.000000000 +0200
@@ -50,5 +50,5 @@
 # Kernel-mode plugin gets installed here.
 PLUGIN_DIR=/etc/ppp/plugins
-PLUGIN_PATH=$(PLUGIN_DIR)/rp-pppoe.so
+PLUGIN_PATH=rp-pppoe.so
 
 # Configuration file paths

Reply via email to