head 1.4; access; symbols pkgsrc-2013Q2:1.4.0.30 pkgsrc-2013Q2-base:1.4 pkgsrc-2012Q4:1.4.0.28 pkgsrc-2012Q4-base:1.4 pkgsrc-2011Q4:1.4.0.26 pkgsrc-2011Q4-base:1.4 pkgsrc-2011Q2:1.4.0.24 pkgsrc-2011Q2-base:1.4 pkgsrc-2009Q4:1.4.0.22 pkgsrc-2009Q4-base:1.4 pkgsrc-2008Q4:1.4.0.20 pkgsrc-2008Q4-base:1.4 pkgsrc-2008Q3:1.4.0.18 pkgsrc-2008Q3-base:1.4 cube-native-xorg:1.4.0.16 cube-native-xorg-base:1.4 pkgsrc-2008Q2:1.4.0.14 pkgsrc-2008Q2-base:1.4 pkgsrc-2008Q1:1.4.0.12 pkgsrc-2008Q1-base:1.4 pkgsrc-2007Q4:1.4.0.10 pkgsrc-2007Q4-base:1.4 pkgsrc-2007Q3:1.4.0.8 pkgsrc-2007Q3-base:1.4 pkgsrc-2007Q2:1.4.0.6 pkgsrc-2007Q2-base:1.4 pkgsrc-2007Q1:1.4.0.4 pkgsrc-2007Q1-base:1.4 pkgsrc-2006Q4:1.4.0.2 pkgsrc-2006Q4-base:1.4 pkgsrc-2006Q3:1.3.0.8 pkgsrc-2006Q3-base:1.3 pkgsrc-2006Q2:1.3.0.6 pkgsrc-2006Q2-base:1.3 pkgsrc-2006Q1:1.3.0.4 pkgsrc-2006Q1-base:1.3 pkgsrc-2005Q4:1.3.0.2 pkgsrc-2005Q4-base:1.3 pkgsrc-2005Q3:1.2.0.24 pkgsrc-2005Q3-base:1.2 pkgsrc-2005Q2:1.2.0.22 pkgsrc-2005Q2-base:1.2 pkgsrc-2005Q1:1.2.0.20 pkgsrc-2005Q1-base:1.2 pkgsrc-2004Q4:1.2.0.18 pkgsrc-2004Q4-base:1.2 pkgsrc-2004Q3:1.2.0.16 pkgsrc-2004Q3-base:1.2 pkgsrc-2004Q2:1.2.0.14 pkgsrc-2004Q2-base:1.2 pkgsrc-2004Q1:1.2.0.12 pkgsrc-2004Q1-base:1.2 pkgsrc-2003Q4:1.2.0.10 pkgsrc-2003Q4-base:1.2 netbsd-1-6-1:1.2.0.6 netbsd-1-6-1-base:1.2 netbsd-1-6:1.2.0.8 netbsd-1-6-RELEASE-base:1.2 pkgviews:1.2.0.4 pkgviews-base:1.2 buildlink2:1.2.0.2 buildlink2-base:1.2 netbsd-1-5-PATCH003:1.2 netbsd-1-5-PATCH001:1.1; locks; strict; comment @# @; 1.4 date 2006.11.01.15.17.14; author martin; state dead; branches; next 1.3; 1.3 date 2005.11.03.22.49.41; author rillig; state Exp; branches; next 1.2; 1.2 date 2001.10.07.13.26.38; author tron; state Exp; branches; next 1.1; 1.1 date 2001.03.18.18.55.29; author tron; state Exp; branches; next ; desc @@ 1.4 log @Update rp-pppoe to 3.8: various internal changes, some of them bogus and reverted by patches, some of them were already present in (now removed) patches; plus: - Changed the names of commands from adsl-* to pppoe-* to more logically name the scripts. - Make the userland pppoe daemon run as "nobody" if possible, once session has started. - Make userland pppoe program somewhat safe if it is installed SUID or SGID. Note that I still do *NOT* recommend a SUID/SGID pppoe. - Fix long-standing bug in pppoe-server that passed arguments to pppd in the wrong order. @ text @$NetBSD: patch-ad,v 1.3 2005/11/03 22:49:41 rillig Exp $ --- src/pppoe.c.orig Fri Sep 14 21:18:53 2001 +++ src/pppoe.c Sun Oct 7 14:15:21 2001 @@@@ -113,7 +113,7 @@@@ * packet before passing it here. ***********************************************************************/ void -sessionDiscoveryPacket(PPPoEPacket *packet) +sessionDiscoveryPacket(PPPoEConnection *conn, PPPoEPacket *packet) { /* Sanity check */ if (packet->code != CODE_PADT) { @@@@ -695,7 +695,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; } @@@@ -822,7 +822,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; } @ 1.3 log @Fixed wrong use of WRKSRC. @ text @d1 1 a1 1 $NetBSD: patch-ad,v 1.2 2001/10/07 13:26:38 tron Exp $ @ 1.2 log @Update "rp-pppoe" package to version 3.3. Changes since version 2.8: - Client works on Solaris again. It was broken in 3.2. - Added DEFAULTROUTE=yes|no option to configuration file. - Server parses address pool file better. - Server address pool allows ranges of addresses on a line: a.b.c.d-e - Added "-d" (=debug) and "-P" (=check pool file syntax) options to pppoe-server. - Client now ignores PADT's if they are from the wrong source MAC address or to the wrong destination MAC address. - Minor fixes to Makefile.in for Turbolinux. - Improved KERNEL-MODE-PPPOE instructions - Works with patched pppd 2.4.1 - Many improvements to server: Added "-u" and "-r" options; server can now respond to request on multiple Ethernet interfaces. - SECURITY BUG FIX: Server now ignores PADT's if they are from the wrong source MAC address. You are STRONGLY RECOMMENDED to upgrade to 3.1 if you use pppoe-server in production. - Many small improvements to server. Server now only makes one discovery socket, systemwide, with addition of "-n" option to pppoe. - Fixes for compilation problems on BSD, Solaris and some Linux platforms. - Added "-p" option to pppoe-server to allow you to specify a pool of IP addresses to assign to clients. - Added GUI system (tkpppoe). This work was funded by Iospan Wireless, Inc. The GUI includes a Set-UID wrapper (pppoe-wrapper) which allows ordinary users to control a link (if so authorized.) I believe the wrapper script is secure, but please audit the source code (gui/wrapper.c) if you have any concerns. - Changes to scripts and pppoe.conf. DNS setup is now dynamic (happens each time adsl-connect runs.) - Made relay.c check packet lengths rigorously; made it throw out Ethernet frame padding on session packets as well as discovery packets. @ text @d1 1 a1 1 $NetBSD$ d3 2 a4 2 --- pppoe.c.orig Fri Sep 14 21:18:53 2001 +++ pppoe.c Sun Oct 7 14:15:21 2001 @ 1.1 log @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. @ text @d3 3 a5 3 --- pppoe.c.orig Mon Feb 5 17:34:49 2001 +++ pppoe.c Sun Mar 18 19:14:55 2001 @@@@ -109,7 +109,7 @@@@ d14 1 a14 22 @@@@ -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 @@@@ d23 1 a23 1 @@@@ -767,7 +767,7 @@@@ @