From 729470b3824710d87b974a6f2a2aa7e836ef4b8a Mon Sep 17 00:00:00 2001 From: tron Date: Sun, 18 Mar 2001 18:55:28 +0000 Subject: Update "rp-pppoe" package to version 2.8. Changes since version 2.6: - Added init scripts for TurboLinux, courtesy of Yasuhiro Sumi. - Made relay.c check packet lengths rigorously; made it throw out Ethernet frame padding on discovery packets. - Completely restructured source file tree. - Much internal restructuring to eliminate a bunch of global variables. - adsl-connect now executes /etc/ppp/adsl-lost whenever connection is dropped or cannot be established. - Split pppoe.c into pppoe.c and discovery.c. - Added relay agent (pppoe-relay). Development of the relay agent was funded by IBM Corporation. - Made adsl-connect script use the "-U" (host-unique) option to better support multiple PPPoE links. - Added support for kernel-mode PPPoE (EXPERIMENTAL, UNSUPPORTED!) - Added "-o" option to PPPoE server; encoded server PID in pppoe-server cookie. Furthermore a startup script for NetBSD 1.5 and newer was added. --- net/rp-pppoe/patches/patch-aa | 123 ++++++++++++++++++++++++++++++++++++------ net/rp-pppoe/patches/patch-ab | 6 +-- net/rp-pppoe/patches/patch-ac | 15 ++++++ net/rp-pppoe/patches/patch-ad | 52 ++++++++++++++++++ 4 files changed, 178 insertions(+), 18 deletions(-) create mode 100644 net/rp-pppoe/patches/patch-ac create mode 100644 net/rp-pppoe/patches/patch-ad (limited to 'net/rp-pppoe/patches') diff --git a/net/rp-pppoe/patches/patch-aa b/net/rp-pppoe/patches/patch-aa index 33d66d424df..49280111c9f 100644 --- a/net/rp-pppoe/patches/patch-aa +++ b/net/rp-pppoe/patches/patch-aa @@ -1,7 +1,7 @@ -$NetBSD: patch-aa,v 1.4 2001/01/30 20:33:25 tron Exp $ +$NetBSD: patch-aa,v 1.5 2001/03/18 18:55:29 tron Exp $ ---- Makefile.in.orig Mon Jan 8 15:58:35 2001 -+++ Makefile.in Tue Jan 30 21:26:42 2001 +--- Makefile.in.orig Mon Feb 5 17:34:49 2001 ++++ Makefile.in Sun Mar 18 19:40:17 2001 @@ -20,7 +20,7 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ @@ -11,30 +11,123 @@ $NetBSD: patch-aa,v 1.4 2001/01/30 20:33:25 tron Exp $ install=@INSTALL@ install_dir=@INSTALL@ -d sbindir=@sbindir@ -@@ -101,16 +101,16 @@ - $(install) -m 644 pppoe-sniff.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 +@@ -49,7 +49,7 @@ + + CFLAGS= @CFLAGS@ $(DEFINES) $(PATHS) + +-all: pppoe pppoe-server pppoe-sniff $(LINUX_KERNELMODE_PLUGIN) $(PPPOE_RELAY) ++all: pppoe pppoe-server $(LINUX_KERNELMODE_PLUGIN) $(PPPOE_RELAY) + @echo "" + @echo "Type 'make install' as root to install the software." + +@@ -117,12 +117,12 @@ + plugin/common.o: common.c + @CC@ $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o plugin/common.o -fPIC common.c + +-install: pppoe pppoe-server pppoe-sniff ++install: pppoe pppoe-server + -mkdir -p $(RPM_INSTALL_ROOT)$(sbindir) + $(install) -m 755 -s pppoe $(RPM_INSTALL_ROOT)$(sbindir) + $(install) -m 755 -s pppoe-server $(RPM_INSTALL_ROOT)$(sbindir) + if test -x pppoe-relay ; then $(install) -m 755 -s pppoe-relay $(RPM_INSTALL_ROOT)$(sbindir); fi +- $(install) -m 755 -s pppoe-sniff $(RPM_INSTALL_ROOT)$(sbindir) ++# $(install) -m 755 -s pppoe-sniff $(RPM_INSTALL_ROOT)$(sbindir) + $(install) -m 755 ../scripts/adsl-connect $(RPM_INSTALL_ROOT)$(sbindir) + $(install) -m 755 ../scripts/adsl-start $(RPM_INSTALL_ROOT)$(sbindir) + $(install) -m 755 ../scripts/adsl-status $(RPM_INSTALL_ROOT)$(sbindir) +@@ -130,53 +130,53 @@ + $(install) -m 755 ../scripts/adsl-setup $(RPM_INSTALL_ROOT)$(sbindir) + -mkdir -p $(RPM_INSTALL_ROOT)$(docdir) + $(install) -m 644 ../doc/CHANGES $(RPM_INSTALL_ROOT)$(docdir) +- $(install) -m 644 ../doc/KERNEL-MODE-PPPOE $(RPM_INSTALL_ROOT)$(docdir) ++# $(install) -m 644 ../doc/KERNEL-MODE-PPPOE $(RPM_INSTALL_ROOT)$(docdir) + $(install) -m 644 ../doc/HOW-TO-CONNECT $(RPM_INSTALL_ROOT)$(docdir) + $(install) -m 644 ../doc/LICENSE $(RPM_INSTALL_ROOT)$(docdir) + $(install) -m 644 ../README $(RPM_INSTALL_ROOT)$(docdir) + $(install) -m 644 ../configs/pap-secrets $(RPM_INSTALL_ROOT)$(docdir) + -mkdir -p $(RPM_INSTALL_ROOT)$(mandir)/man8 + $(install) -m 644 ../man/pppoe.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 +- $(install) -m 644 ../man/pppoe-relay.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 ++# $(install) -m 644 ../man/pppoe-relay.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 + $(install) -m 644 ../man/adsl-start.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 + $(install) -m 644 ../man/adsl-stop.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 + $(install) -m 644 ../man/adsl-status.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 + $(install) -m 644 ../man/adsl-connect.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 + $(install) -m 644 ../man/adsl-setup.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 + $(install) -m 644 ../man/pppoe-server.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 +- $(install) -m 644 ../man/pppoe-sniff.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 ++# $(install) -m 644 ../man/pppoe-sniff.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 -mkdir -p $(RPM_INSTALL_ROOT)$(mandir)/man5 - $(install) -m 644 pppoe.conf.5 $(RPM_INSTALL_ROOT)$(mandir)/man5 + $(install) -m 644 ../man/pppoe.conf.5 $(RPM_INSTALL_ROOT)$(mandir)/man5 - -mkdir -p $(RPM_INSTALL_ROOT)/etc/ppp +- -mkdir -p $(RPM_INSTALL_ROOT)$(PLUGIN_DIR) +- -echo "# Directory created by rp-pppoe for kernel-mode plugin" > $(RPM_INSTALL_ROOT)$(PLUGIN_DIR)/README +- if test -r rp-pppoe.so; then $(install) -m 755 rp-pppoe.so $(RPM_INSTALL_ROOT)$(PLUGIN_DIR); fi - @for i in pppoe.conf firewall-standalone firewall-masq ; do \ - if [ ! -f $(RPM_INSTALL_ROOT)/etc/ppp/$$i ] ; then \ -- $(install) -m 644 $$i $(RPM_INSTALL_ROOT)/etc/ppp ; \ +- $(install) -m 644 ../configs/$$i $(RPM_INSTALL_ROOT)/etc/ppp ; \ - else \ - echo "NOT overwriting existing $(RPM_INSTALL_ROOT)/etc/ppp/$$i" ;\ -- $(install) -m 644 $$i $(RPM_INSTALL_ROOT)/etc/ppp/$$i-$(VERSION) ;\ +- $(install) -m 644 ../configs/$$i $(RPM_INSTALL_ROOT)/etc/ppp/$$i-$(VERSION) ;\ - fi ;\ - done -- $(install) -m 644 pppoe-server-options $(RPM_INSTALL_ROOT)$(PPPOESERVER_PPPD_OPTIONS) +- $(install) -m 644 ../configs/pppoe-server-options $(RPM_INSTALL_ROOT)$(PPPOESERVER_PPPD_OPTIONS) +- @if [ -f /etc/redhat-release ] ; then \ +- echo "Looks like a Red Hat system; installing $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl" ; \ +- mkdir -p $(RPM_INSTALL_ROOT)/etc/rc.d/init.d ;\ +- $(install) -m 755 ../scripts/adsl-init $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl ; \ +- fi +- @if [ -f /etc/turbolinux-release ] ; then \ +- echo "Looks like a TurboLinux system; installing $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl" ; \ +- mkdir -p $(RPM_INSTALL_ROOT)/etc/rc.d/init.d ;\ +- $(install) -m 755 adsl-init-turbolinux $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl ; \ +- fi +- @if [ -f /etc/SuSE-release ] ; then \ +- echo "Looks like a SuSE Linux system; installing $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl" ; \ +- mkdir -p $(RPM_INSTALL_ROOT)/etc/rc.d/init.d ;\ +- $(install) -m 755 ../scripts/adsl-init-suse $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl ; \ +- fi +- @echo "" +- @echo "Type 'adsl-setup' to configure the software." +# -mkdir -p $(RPM_INSTALL_ROOT)/etc/ppp ++# -mkdir -p $(RPM_INSTALL_ROOT)$(PLUGIN_DIR) ++# -echo "# Directory created by rp-pppoe for kernel-mode plugin" > $(RPM_INSTALL_ROOT)$(PLUGIN_DIR)/README ++# if test -r rp-pppoe.so; then $(install) -m 755 rp-pppoe.so $(RPM_INSTALL_ROOT)$(PLUGIN_DIR); fi +# @for i in pppoe.conf firewall-standalone firewall-masq ; do \ +# if [ ! -f $(RPM_INSTALL_ROOT)/etc/ppp/$$i ] ; then \ -+# $(install) -m 644 $$i $(RPM_INSTALL_ROOT)/etc/ppp ; \ ++# $(install) -m 644 ../configs/$$i $(RPM_INSTALL_ROOT)/etc/ppp ; \ +# else \ +# echo "NOT overwriting existing $(RPM_INSTALL_ROOT)/etc/ppp/$$i" ;\ -+# $(install) -m 644 $$i $(RPM_INSTALL_ROOT)/etc/ppp/$$i-$(VERSION) ;\ ++# $(install) -m 644 ../configs/$$i $(RPM_INSTALL_ROOT)/etc/ppp/$$i-$(VERSION) ;\ +# fi ;\ +# done -+# $(install) -m 644 pppoe-server-options $(RPM_INSTALL_ROOT)$(PPPOESERVER_PPPD_OPTIONS) - @if [ -f /etc/redhat-release ] ; then \ - echo "Looks like a Red Hat system; installing $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl" ; \ - mkdir -p $(RPM_INSTALL_ROOT)/etc/rc.d/init.d ;\ ++# $(install) -m 644 ../configs/pppoe-server-options $(RPM_INSTALL_ROOT)$(PPPOESERVER_PPPD_OPTIONS) ++# @if [ -f /etc/redhat-release ] ; then \ ++# echo "Looks like a Red Hat system; installing $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl" ; \ ++# mkdir -p $(RPM_INSTALL_ROOT)/etc/rc.d/init.d ;\ ++# $(install) -m 755 ../scripts/adsl-init $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl ; \ ++# fi ++# @if [ -f /etc/turbolinux-release ] ; then \ ++# echo "Looks like a TurboLinux system; installing $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl" ; \ ++# mkdir -p $(RPM_INSTALL_ROOT)/etc/rc.d/init.d ;\ ++# $(install) -m 755 adsl-init-turbolinux $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl ; \ ++# fi ++# @if [ -f /etc/SuSE-release ] ; then \ ++# echo "Looks like a SuSE Linux system; installing $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl" ; \ ++# mkdir -p $(RPM_INSTALL_ROOT)/etc/rc.d/init.d ;\ ++# $(install) -m 755 ../scripts/adsl-init-suse $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl ; \ ++# fi ++# @echo "" ++# @echo "Type 'adsl-setup' to configure the software." + + distro: + cd ..; \ +@@ -190,7 +190,7 @@ + cp configs/$$i rp-pppoe-$(VERSION)/configs || exit 1; \ + done ; \ + mkdir rp-pppoe-$(VERSION)/doc || exit 1; \ +- for i in CHANGES KERNEL-MODE-PPPOE HOW-TO-CONNECT LICENSE PROBLEMS ; do \ ++ for i in CHANGES HOW-TO-CONNECT LICENSE PROBLEMS ; do \ + cp doc/$$i rp-pppoe-$(VERSION)/doc || exit 1; \ + done; \ + mkdir rp-pppoe-$(VERSION)/man || exit 1; \ diff --git a/net/rp-pppoe/patches/patch-ab b/net/rp-pppoe/patches/patch-ab index ae264215634..65f5d22b6a8 100644 --- a/net/rp-pppoe/patches/patch-ab +++ b/net/rp-pppoe/patches/patch-ab @@ -1,7 +1,7 @@ -$NetBSD: patch-ab,v 1.3 2001/02/19 21:26:14 tron Exp $ +$NetBSD: patch-ab,v 1.4 2001/03/18 18:55:29 tron Exp $ ---- adsl-setup.in.orig Mon Jan 8 15:58:35 2001 -+++ adsl-setup.in Mon Feb 19 22:23:47 2001 +--- ../scripts/adsl-setup.in.orig Mon Jan 8 15:58:35 2001 ++++ ../scripts/adsl-setup.in Mon Feb 19 22:23:47 2001 @@ -304,6 +304,7 @@ if [ "$DNS2" != "" ] ; then $ECHO "nameserver $DNS2" >> /etc/resolv.conf diff --git a/net/rp-pppoe/patches/patch-ac b/net/rp-pppoe/patches/patch-ac new file mode 100644 index 00000000000..53cb2ad3f06 --- /dev/null +++ b/net/rp-pppoe/patches/patch-ac @@ -0,0 +1,15 @@ +$NetBSD: patch-ac,v 1.3 2001/03/18 18:55:29 tron Exp $ + +--- pppoe.h.orig Mon Feb 5 17:34:49 2001 ++++ pppoe.h Sun Mar 18 19:11:33 2001 +@@ -72,7 +72,9 @@ + #ifdef USE_BPF + extern int bpfSize; + struct PPPoEPacketStruct; +-void sessionDiscoveryPacket(struct PPPoEPacketStruct *packet); ++struct PPPoEConnectionStruct; ++void sessionDiscoveryPacket(struct PPPoEConnectionStruct *conn, ++ struct PPPoEPacketStruct *packet); + #define BPF_BUFFER_IS_EMPTY (bpfSize <= 0) + #define BPF_BUFFER_HAS_DATA (bpfSize > 0) + #define ethhdr ether_header diff --git a/net/rp-pppoe/patches/patch-ad b/net/rp-pppoe/patches/patch-ad new file mode 100644 index 00000000000..b7cb567bb79 --- /dev/null +++ b/net/rp-pppoe/patches/patch-ad @@ -0,0 +1,52 @@ +$NetBSD: patch-ad,v 1.1 2001/03/18 18:55:29 tron Exp $ + +--- pppoe.c.orig Mon Feb 5 17:34:49 2001 ++++ pppoe.c Sun Mar 18 19:14:55 2001 +@@ -109,7 +109,7 @@ + * packet before passing it here. + ***********************************************************************/ + void +-sessionDiscoveryPacket(PPPoEPacket *packet) ++sessionDiscoveryPacket(PPPoEConnection *conn, PPPoEPacket *packet) + { + /* Sanity check */ + if (packet->code != CODE_PADT) { +@@ -117,7 +117,7 @@ + } + + /* It's a PADT, all right. Is it for us? */ +- if (packet->session != Session) { ++ if (packet->session != conn->session) { + /* Nope, ignore it */ + return; + } +@@ -222,9 +222,9 @@ + /* check for buffered session data */ + while (BPF_BUFFER_HAS_DATA) { + if (conn->synchronous) { +- syncReadFromEth(conn->sessionSocket, optClampMSS); ++ syncReadFromEth(conn, conn->sessionSocket, optClampMSS); + } else { +- asyncReadFromEth(conn->sessionSocket, optClampMSS); ++ asyncReadFromEth(conn, conn->sessionSocket, optClampMSS); + } + } + #endif +@@ -642,7 +642,7 @@ + /* Make sure this is a session packet before processing further */ + type = etherType(&packet); + if (type == Eth_PPPOE_Discovery) { +- sessionDiscoveryPacket(&packet); ++ sessionDiscoveryPacket(conn, &packet); + } else if (type != Eth_PPPOE_Session) { + return; + } +@@ -767,7 +767,7 @@ + /* Make sure this is a session packet before processing further */ + type = etherType(&packet); + if (type == Eth_PPPOE_Discovery) { +- sessionDiscoveryPacket(&packet); ++ sessionDiscoveryPacket(conn, &packet); + } else if (type != Eth_PPPOE_Session) { + return; + } -- cgit v1.2.3