summaryrefslogtreecommitdiff
path: root/net-dialup/rp-pppoe/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-12-24 14:11:38 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-12-24 14:11:38 +0000
commitde49812990871e1705b64051c35161d5e6400269 (patch)
tree5e1e8fcb0ff4579dbd22a1bfee28a6b97dc8aaeb /net-dialup/rp-pppoe/files
parent536c3711867ec947c1738f2c4b96f22e4863322d (diff)
gentoo resync : 24.12.2018
Diffstat (limited to 'net-dialup/rp-pppoe/files')
-rw-r--r--net-dialup/rp-pppoe/files/pppoe-server.confd10
-rw-r--r--net-dialup/rp-pppoe/files/pppoe-server.initd9
-rw-r--r--net-dialup/rp-pppoe/files/rp-pppoe-3.10-session-offset.patch21
-rw-r--r--net-dialup/rp-pppoe/files/rp-pppoe-3.13-autotools.patch110
-rw-r--r--net-dialup/rp-pppoe/files/rp-pppoe-3.13-linux-headers.patch25
5 files changed, 154 insertions, 21 deletions
diff --git a/net-dialup/rp-pppoe/files/pppoe-server.confd b/net-dialup/rp-pppoe/files/pppoe-server.confd
new file mode 100644
index 000000000000..bb5b2e9088d7
--- /dev/null
+++ b/net-dialup/rp-pppoe/files/pppoe-server.confd
@@ -0,0 +1,10 @@
+#Multiple interfaces allowed. Example: PPPOE_INTERFACE="vlan10 -I vlan11 -I vlan12" and so on.
+#Multiple interfaces allowed. Example: PPPOE_INTERFACE="vlan10 -I vlan11 -I vlan12" and so on.
+
+#PPPOE_INTERFACE=<interface name>
+#AC_NAME=<AC Name>
+#SERVICE_NAME=<Service Name>
+#MAX_SESSIONS=<Max PPPoE Sessions>
+#MAX_SESESSION_PER_MAC=<Max PPPoE Sessions per MAC>
+#LOCAL_IP=<PPP Local IP Addr>
+#OTHER_OPTIONS="-p /etc/ppp/ip-pools"
diff --git a/net-dialup/rp-pppoe/files/pppoe-server.initd b/net-dialup/rp-pppoe/files/pppoe-server.initd
new file mode 100644
index 000000000000..39caee9d761b
--- /dev/null
+++ b/net-dialup/rp-pppoe/files/pppoe-server.initd
@@ -0,0 +1,9 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+description="rp-pppoe server"
+pidfile="/run/pppoe-server.pid"
+command="/usr/sbin/pppoe-server"
+command_args="-I ${PPPOE_INTERFACE:-eth0} -C ${AC_NAME:-$(hostname)} -S ${SERVICE_NAME:-default} -N ${MAX_SESSIONS:-64} -x ${MAX_SESESSION_PER_MAC:-1} -L ${LOCAL_IP:-10.0.0.1.} -k -F ${OTHER_OPTIONS}"
+command_background="true"
diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.10-session-offset.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-session-offset.patch
deleted file mode 100644
index 303ecfa9e4b7..000000000000
--- a/net-dialup/rp-pppoe/files/rp-pppoe-3.10-session-offset.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -Nru rp-pppoe-3.10.orig/src/pppoe-server.c rp-pppoe-3.10/src/pppoe-server.c
---- rp-pppoe-3.10.orig/src/pppoe-server.c 2008-06-30 16:00:43.000000000 +0200
-+++ rp-pppoe-3.10/src/pppoe-server.c 2008-06-30 22:35:11.000000000 +0200
-@@ -1751,7 +1751,7 @@
- }
- if (PassUnitOptionToPPPD) {
- argv[c++] = "unit";
-- sprintf(buffer, "%u", (unsigned int) (ntohs(session->sess) - 1 - SessOffset));
-+ sprintf(buffer, "%u", (unsigned int) (ntohs(session->sess) - 1));
- argv[c++] = buffer;
- }
- argv[c++] = NULL;
-@@ -1834,7 +1834,7 @@
- argv[c++] = "default-asyncmap";
- if (PassUnitOptionToPPPD) {
- argv[c++] = "unit";
-- sprintf(buffer, "%u", (unsigned int) (ntohs(session->sess) - 1 - SessOffset));
-+ sprintf(buffer, "%u", (unsigned int) (ntohs(session->sess) - 1));
- argv[c++] = buffer;
- }
- argv[c++] = NULL;
diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.13-autotools.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.13-autotools.patch
new file mode 100644
index 000000000000..d098de8cdbc3
--- /dev/null
+++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.13-autotools.patch
@@ -0,0 +1,110 @@
+--- rp-pppoe-3.13/gui/Makefile.in
++++ rp-pppoe-3.13/gui/Makefile.in
+@@ -46,7 +46,7 @@
+ -mkdir -p $(DESTDIR)$(sbindir)
+ -mkdir -p $(DESTDIR)$(bindir)
+ -mkdir -p $(DESTDIR)/etc/ppp/rp-pppoe-gui
+- $(install) -m 4755 -s pppoe-wrapper $(DESTDIR)$(sbindir)
++ $(install) -m 4755 pppoe-wrapper $(DESTDIR)$(sbindir)
+ $(install) -m 755 tkpppoe $(DESTDIR)$(bindir)
+ -mkdir -p $(DESTDIR)$(mandir)/man1
+ $(install) -m 644 pppoe-wrapper.1 $(DESTDIR)$(mandir)/man1
+--- rp-pppoe-3.13/src/configure.in
++++ rp-pppoe-3.13/src/configure.in
+@@ -45,7 +45,7 @@
+ AC_MSG_RESULT($ac_cv_struct_sockaddr_ll)
+
+ if test "$ac_cv_struct_sockaddr_ll" = yes ; then
+-AC_DEFINE(HAVE_STRUCT_SOCKADDR_LL)
++AC_DEFINE(HAVE_STRUCT_SOCKADDR_LL, 1, [Define if you have struct sockaddr_ll])
+ fi
+
+ dnl Check for N_HDLC line discipline
+@@ -58,7 +58,7 @@
+ ac_cv_n_hdlc=no)
+ AC_MSG_RESULT($ac_cv_n_hdlc)
+ if test "$ac_cv_n_hdlc" = yes ; then
+-AC_DEFINE(HAVE_N_HDLC)
++AC_DEFINE(HAVE_N_HDLC, 1, [Define if you have the N_HDLC line discipline in linux/termios.h])
+ fi
+
+ AC_ARG_ENABLE(plugin, [ --enable-plugin=pppd_src_path build pppd plugin], ac_cv_pluginpath=$enableval, ac_cv_pluginpath=no)
+@@ -106,7 +106,7 @@
+ if test "$ac_cv_header_linux_if_pppox_h" = yes ; then
+ if test "$ac_cv_pluginpath" != no ; then
+ LINUX_KERNELMODE_PLUGIN=rp-pppoe.so
+- AC_DEFINE(HAVE_LINUX_KERNEL_PPPOE)
++ AC_DEFINE(HAVE_LINUX_KERNEL_PPPOE, 1, [Define if you have kernel-mode PPPoE in Linux file])
+ PPPD_INCDIR=$ac_cv_pluginpath
+ fi
+ fi
+@@ -116,7 +116,7 @@
+ fi
+
+ if test "$ac_cv_debugging" = "yes" ; then
+- AC_DEFINE(DEBUGGING_ENABLED)
++ AC_DEFINE(DEBUGGING_ENABLED, 1, [Define to include debugging code])
+ fi
+
+ AC_SUBST(LINUX_KERNELMODE_PLUGIN)
+@@ -156,15 +156,15 @@
+ AC_MSG_CHECKING(for Linux 2.4.X kernel-mode PPPoE support)
+ AC_CACHE_VAL(ac_cv_linux_kernel_pppoe,[
+ if test "`uname -s`" = "Linux" ; then
+-if test $cross_compiling = "no"; then
++dnl if test $cross_compiling = "no"; then
+
+ dnl Do a bunch of modprobes. Can't hurt; might help.
+-modprobe ppp_generic > /dev/null 2>&1
+-modprobe ppp_async > /dev/null 2>&1
+-modprobe n_hdlc > /dev/null 2>&1
+-modprobe ppp_synctty > /dev/null 2>&1
+-modprobe pppoe > /dev/null 2>&1
+-fi
++dnl modprobe ppp_generic > /dev/null 2>&1
++dnl modprobe ppp_async > /dev/null 2>&1
++dnl modprobe n_hdlc > /dev/null 2>&1
++dnl modprobe ppp_synctty > /dev/null 2>&1
++dnl modprobe pppoe > /dev/null 2>&1
++dnl fi
+ AC_TRY_RUN([#include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <linux/if_pppox.h>
+@@ -204,7 +204,7 @@
+ dnl Figure out pppd version. 2.3.7 to 2.3.9 -- issue warning. Less than
+ dnl 2.3.7 -- stop
+
+-PPPD_VERSION=`$PPPD --version 2>&1 | awk ' /version/ {print $NF}'`
++PPPD_VERSION=$PPPD_VER
+
+ case "$PPPD_VERSION" in
+ 1.*|2.0.*|2.1.*|2.2.*|2.3.0|2.3.1|2.3.2|2.3.3|2.3.4|2.3.5|2.3.6)
+@@ -260,7 +260,7 @@
+
+ if test "$rpppoe_cv_pack_bitfields" = "rev" ; then
+ AC_MSG_RESULT(reversed)
+- AC_DEFINE(PACK_BITFIELDS_REVERSED)
++ AC_DEFINE(PACK_BITFIELDS_REVERSED, 1, [Define if bitfields are packed in reverse order])
+ else
+ AC_MSG_RESULT(normal)
+ fi
+--- rp-pppoe-3.13/src/plugin.c
++++ rp-pppoe-3.13/src/plugin.c
+@@ -24,7 +24,6 @@
+ *
+ ***********************************************************************/
+
+-#define _GNU_SOURCE 1
+ #include "pppoe.h"
+
+ #include "pppd/pppd.h"
+--- rp-pppoe-3.13/src/relay.c
++++ rp-pppoe-3.13/src/relay.c
+@@ -14,7 +14,6 @@
+ * $Id$
+ *
+ ***********************************************************************/
+-#define _GNU_SOURCE 1 /* For SA_RESTART */
+ #include "config.h"
+
+ #include <sys/socket.h>
diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.13-linux-headers.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.13-linux-headers.patch
new file mode 100644
index 000000000000..1ee989dce872
--- /dev/null
+++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.13-linux-headers.patch
@@ -0,0 +1,25 @@
+the linux headers have started adding shims to not define types or structs
+when C lib headers are active, but in order to work, the C lib headers have
+to be included before the linux headers.
+
+move the netinet/in.h include up above the linux/ includes.
+
+Mike Frysinger <vapier@gentoo.org>
+
+--- rp-pppoe-3.13/src/pppoe.h
++++ rp-pppoe-3.13/src/pppoe.h
+@@ -120,12 +120,12 @@
+ #error Could not find a 32-bit integer type
+ #endif
+
++#include <netinet/in.h>
++
+ #ifdef HAVE_LINUX_IF_ETHER_H
+ #include <linux/if_ether.h>
+ #endif
+
+-#include <netinet/in.h>
+-
+ #ifdef HAVE_NETINET_IF_ETHER_H
+ #include <sys/types.h>
+