Index: npl/internetserver/poptop_ppp/patches/mppe_lower_mtu.diff
===================================================================
--- npl/internetserver/poptop_ppp/patches/mppe_lower_mtu.diff	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
+++ npl/internetserver/poptop_ppp/patches/mppe_lower_mtu.diff	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
@@ -0,0 +1,71 @@
+--- ppp-2.4.3/pppd/ccp.c	2004-11-13 02:28:15.000000000 +0000
++++ ppp-2.4.3/pppd/ccp.c	2004-11-22 16:36:21.654092711 +0000
+@@ -67,6 +67,7 @@
+  */
+ #ifdef MPPE
+ bool refuse_mppe_stateful = 1;		/* Allow stateful mode? */
++bool mppe_lower_mtu = 1; /* Set to 0 to disable dropping the MTU by 4 */
+ #endif
+ 
+ static option_t ccp_option_list[] = {
+@@ -156,6 +157,15 @@
+       "allow MPPE stateful mode", OPT_PRIO },
+     { "nomppe-stateful", o_bool, &refuse_mppe_stateful,
+       "disallow MPPE stateful mode", OPT_PRIO | 1 },
++    
++    /* Option to avoid lowering our MTU by 4 (as should be done) to avoid
++     * breakage with devices that don't handle PMTUD
++     */
++    { "mppe-lower-mtu", o_bool, &mppe_lower_mtu,
++      "lower the MTU by 4 bytes for MPPE connections", OPT_PRIO | 1 },
++    { "nomppe-lower-mtu", o_bool, &mppe_lower_mtu,
++      "don't lower the MTU by 4 bytes for MPPE connections", OPT_PRIO },
++
+ #endif /* MPPE */
+ 
+     { NULL }
+@@ -1185,9 +1195,16 @@
+ 		     * allocate MPPE_PAD extra bytes in xmit buffers.
+ 		     */
+ 		    mtu = netif_get_mtu(f->unit);
+-		    if (mtu)
+-			netif_set_mtu(f->unit, mtu - MPPE_PAD);
+-		    else
++		    if (mtu) {
++			/* Dropping the MTU seems to break Path MTU discovery
++			 * particularly where load-balancers are involved.
++			 * Not dropping the MTU may mean the occasional packet
++			 * goes unencrypted due to them being 4 bytes larger
++			 * and CCP thinking it's not worth encrypting.
++			 */
++			if (mppe_lower_mtu)
++			    netif_set_mtu(f->unit, mtu - MPPE_PAD);
++		    } else
+ 			newret = CONFREJ;
+ 		}
+ 
+--- ppp-2.4.3/pppd/pppd.8	2004-11-22 16:36:21.663090491 +0000
++++ ppp-2.4.3/pppd/pppd.8	2004-11-22 16:43:15.169028425 +0000
+@@ -622,6 +622,10 @@
+ Enables the use of PPP multilink; this is an alias for the `multilink'
+ option.  This option is currently only available under Linux.
+ .TP
++.B mppe\-lower\-mtu
++Lowers the MTU by 4 bytes for MPPE connections. This is the correct
++behaviour but breaks accessing some sites. This is the default.
++.TP
+ .B mppe\-stateful
+ Allow MPPE to use stateful mode.  Stateless mode is still attempted first.
+ The default is to disallow stateful mode.  
+@@ -766,6 +770,11 @@
+ .B nomppe\-128
+ Disable 128-bit encryption with MPPE.
+ .TP
++.TP
++.B nomppe\-lower\-mtu
++Disables lowering the MTU by 4 bytes for MPPE connections. This is sometimes
++required to access servers behind load balancing devices that break Path
++MTU Discovery.
+ .B nomppe\-stateful
+ Disable MPPE stateful mode.  This is the default.
+ .TP
Index: npl/internetserver/poptop_ppp/patches/ppp-2.3.6-sample.patch
===================================================================
--- npl/internetserver/poptop_ppp/patches/ppp-2.3.6-sample.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
+++ npl/internetserver/poptop_ppp/patches/ppp-2.3.6-sample.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
@@ -0,0 +1,295 @@
+--- ppp-2.3.3/sample/auth-down.sample	Tue Jan  6 17:53:27 1998
++++ ppp-2.3.3/sample/auth-down	Tue Jan  6 17:53:27 1998
+@@ -0,0 +1,17 @@
++#!/bin/sh
++#
++# A program or script which is executed after the remote system
++# successfully authenticates itself. It is executed with the parameters
++# <interface-name> <peer-name> <user-name> <tty-device> <speed>
++#
++
++#
++# The environment is cleared before executing this script
++# so the path must be reset
++#
++PATH=/usr/sbin:/sbin:/usr/bin:/bin
++export PATH
++
++echo auth-down `date +'%y/%m/%d %T'` $* >> /var/log/pppstats
++
++# last line
+--- ppp-2.3.3/sample/auth-up.sample	Tue Jan  6 17:53:27 1998
++++ ppp-2.3.3/sample/auth-up	Tue Jan  6 17:53:27 1998
+@@ -0,0 +1,17 @@
++#!/bin/sh
++#
++# A program or script which is executed after the remote system
++# successfully authenticates itself. It is executed with the parameters
++# <interface-name> <peer-name> <user-name> <tty-device> <speed>
++#
++
++#
++# The environment is cleared before executing this script
++# so the path must be reset
++#
++PATH=/usr/sbin:/sbin:/usr/bin:/bin
++export PATH
++
++echo auth-up `date +'%y/%m/%d %T'` $* >> /var/log/pppstats
++
++# last line
+--- ppp-2.3.3/sample/ip-down.sample	Tue Jan  6 17:53:27 1998
++++ ppp-2.3.3/sample/ip-down	Tue Jan  6 17:53:27 1998
+@@ -0,0 +1,22 @@
++#!/bin/sh
++#
++# This script is run by the pppd _after_ the link is brought down.
++# It should be used to delete routes, unset IP addresses etc.
++#
++# This script is called with the following arguments:
++#    Arg  Name               Example
++#    $1   Interface name     ppp0
++#    $2   The tty            ttyS1
++#    $3   The link speed     38400
++#    $4   Local IP number    12.34.56.78
++#    $5   Peer  IP number    12.34.56.99
++#
++
++#
++# The  environment is cleared before executing this script
++# so the path must be reset
++#
++PATH=/usr/sbin:/sbin:/usr/bin:/bin
++export PATH
++
++# last line
+--- ppp-2.3.3/sample/ip-up.sample	Tue Jan  6 17:53:27 1998
++++ ppp-2.3.3/sample/ip-up	Tue Jan  6 17:53:27 1998
+@@ -0,0 +1,23 @@
++#!/bin/sh
++#
++# This script is run by the pppd after the link is established.
++# It should be used to add routes, set IP address, run the mailq 
++# etc.
++#
++# This script is called with the following arguments:
++#    Arg  Name               Example
++#    $1   Interface name     ppp0
++#    $2   The tty            ttyS1
++#    $3   The link speed     38400
++#    $4   Local IP number    12.34.56.78
++#    $5   Peer  IP number    12.34.56.99
++#
++
++#
++# The  environment is cleared before executing this script
++# so the path must be reset
++#
++PATH=/usr/sbin:/sbin:/usr/bin:/bin
++export PATH
++
++# last line
+--- ppp-2.3.3/sample/options.sample	Tue Jan  6 17:53:27 1998
++++ ppp-2.3.3/sample/options	Tue Jan  6 17:53:27 1998
+@@ -0,0 +1,153 @@
++# /etc/ppp/options
++
++# The name of this server. Often, the FQDN is used here.
++#name <host>
++
++# Enforce the use of the hostname as the name of the local system for
++# authentication purposes (overrides the name option).
++usehostname
++
++# If no local IP address is given, pppd will use the first IP address
++# that belongs to the local hostname. If "noipdefault" is given, this
++# is disabled and the peer will have to supply an IP address.
++noipdefault
++
++# With this option, pppd will accept the peer's idea of our local IP
++# address, even if the local IP address was specified in an option.
++#ipcp-accept-local
++
++# With this option, pppd will accept the peer's idea of its (remote) IP
++# address, even if the remote IP address was specified in an option.
++#ipcp-accept-remote
++
++# Specify which DNS Servers the incoming Win95 or WinNT Connection should use
++# Two Servers can be remotely configured
++#ms-dns 192.168.1.1
++#ms-dns 192.168.1.2
++
++# Specify which WINS Servers the incoming connection Win95 or WinNT should use
++#wins-addr 192.168.1.50
++#wins-addr 192.168.1.51
++
++# enable this on a server that already has a permanent default route
++#nodefaultroute
++
++# Run the executable or shell command specified after pppd has terminated
++# the link.  This script could, for example, issue commands to the modem
++# to cause it to hang up if hardware modem control signals were not
++# available.
++# If mgetty is running, it will reset the modem anyway. So there is no need
++# to do it here.
++#disconnect "chat -- \d+++\d\c OK ath0 OK"
++
++# Increase debugging level (same as -d). The debug output is written
++# to syslog LOG_LOCAL2.
++debug
++
++# Enable debugging code in the kernel-level PPP driver.  The argument n
++# is a number which is the sum of the following values: 1 to enable
++# general debug messages, 2 to request that the contents of received
++# packets be printed, and 4 to request that the contents of transmitted
++# packets be printed.
++#kdebug n
++
++# Require the peer to authenticate itself before allowing network
++# packets to be sent or received.
++# Please do not disable this setting. It is expected to be standard in
++# future releases of pppd. Use the call option (see manpage) to disable
++# authentication for specific peers.
++#auth
++
++# authentication can either be pap or chap. As most people only want to
++# use pap, you can also disable chap:
++#require-pap
++#refuse-chap
++
++# Use hardware flow control (i.e. RTS/CTS) to control the flow of data
++# on the serial port.
++crtscts
++
++# Specifies that pppd should use a UUCP-style lock on the serial device
++# to ensure exclusive access to the device.
++lock
++
++# Use the modem control lines.
++modem
++
++# async character map -- 32-bit hex; each bit is a character
++# that needs to be escaped for pppd to receive it.  0x00000001
++# represents '\x01', and 0x80000000 represents '\x1f'.
++# To allow pppd to work over a rlogin/telnet connection, ou should escape
++# XON (^Q), XOFF  (^S) and ^]: (The peer should use "escape ff".)
++#asyncmap  200a0000
++asyncmap 0
++
++# Specifies that certain characters should be escaped on transmission
++# (regardless of whether the peer requests them to be escaped with its
++# async control character map).  The characters to be escaped are
++# specified as a list of hex numbers separated by commas.  Note that
++# almost any character can be specified for the escape option, unlike
++# the asyncmap option which only allows control characters to be
++# specified.  The characters which may not be escaped are those with hex
++# values 0x20 - 0x3f or 0x5e.
++#escape 11,13,ff
++
++# Set the MRU [Maximum Receive Unit] value to <n> for negotiation.  pppd
++# will ask the peer to send packets of no more than <n> bytes. The
++# minimum MRU value is 128.  The default MRU value is 1500.  A value of
++# 296 is recommended for slow links (40 bytes for TCP/IP header + 256
++# bytes of data).
++#mru 542
++
++# Set the MTU [Maximum Transmit Unit] value to <n>. Unless the peer
++# requests a smaller value via MRU negotiation, pppd will request that
++# the kernel networking code send data packets of no more than n bytes
++# through the PPP network interface.
++#mtu <n>
++
++# Set the interface netmask to <n>, a 32 bit netmask in "decimal dot"
++# notation (e.g. 255.255.255.0).
++#netmask 255.255.255.0
++
++# Don't fork to become a background process (otherwise pppd will do so
++# if a serial device is specified).
++nodetach
++
++# Set the assumed name of the remote system for authentication purposes
++# to <n>.
++#remotename <n>
++
++# Add an entry to this system's ARP [Address Resolution Protocol]
++# table with the IP address of the peer and the Ethernet address of this
++# system. {proxyarp,noproxyarp}
++proxyarp
++
++# Use the system password database for authenticating the peer using
++# PAP. Note: mgetty already provides this option. If this is specified
++# then dialin from users using a script under Linux to fire up ppp wont work.
++#login
++
++# If this option is given, pppd will send an LCP echo-request frame to
++# the peer every n seconds. Under Linux, the echo-request is sent when
++# no packets have been received from the peer for n seconds. Normally
++# the peer should respond to the echo-request by sending an echo-reply.
++# This option can be used with the lcp-echo-failure option to detect
++# that the peer is no longer connected.
++lcp-echo-interval 30
++
++# If this option is given, pppd will presume the peer to be dead if n
++# LCP echo-requests are sent without receiving a valid LCP echo-reply.
++# If this happens, pppd will terminate the connection.  Use of this
++# option requires a non-zero value for the lcp-echo-interval parameter.
++# This option can be used to enable pppd to terminate after the physical
++# connection has been broken (e.g., the modem has hung up) in
++# situations where no hardware modem control lines are available.
++lcp-echo-failure 4
++
++# Specifies that pppd should disconnect if the link is idle for n seconds.
++idle 600
++
++# Disable the IPXCP and IPX protocols.
++noipx
++
++# ---<End of File>---
+--- ppp-2.3.3/sample/options.ttyXX.sample	Tue Jan  6 17:53:27 1998
++++ ppp-2.3.3/sample/options.ttyXX	Tue Jan  6 17:53:27 1998
+@@ -0,0 +1,14 @@
++# If you need to set up multiple serial lines then copy this file to
++# options.<ttyname> for each tty with a modem on it.
++#
++# The options.tty file will assign an IP address to each PPP connection
++# as it comes up. They must all be distinct!
++#
++# Example:
++# options.ttyS1		for com2 under DOS.
++#
++# Edit the following line so that the first IP address
++# mentioned is the ip address of the serial port while the second
++# is the IP address of your host
++#
++hostname-s1:hostname
+--- ppp-2.3.3/sample/pap-secrets.sample	Tue Jan  6 17:53:27 1998
++++ ppp-2.3.3/sample/pap-secrets	Tue Jan  6 17:53:27 1998
+@@ -0,0 +1,28 @@
++# Secrets for authentication using PAP
++# client	server	secret			IP addresses
++
++# OUTBOUND CONNECTIONS
++# Here you should add your userid password to connect to your providers via
++# pap. The * means that the password is to be used for ANY host you connect
++# to. Thus you do not have to worry about the foreign machine name. Just
++# replace password with your password.
++# If you have different providers with different passwords then you better
++# remove the following line.
++#hostname	*	password
++
++# INBOUND CONNECTIONS
++#client		hostname	<password>	192.168.1.1
++
++# If you add "auth login -chap +pap" to /etc/mgetty+sendfax/login.config,
++# all users in /etc/passwd can use their password for pap-authentication.
++#
++# Every regular user can use PPP and has to use passwords from /etc/passwd
++#*	hostname	""
++# UserIDs that cannot use PPP at all. Check your /etc/passwd and add any
++# other accounts that should not be able to use pppd! Replace hostname
++# with your local hostname.
++#guest		hostname	"*"	-
++#master		hostname	"*"	-
++#root		hostname	"*"	-
++#support	hostname	"*"	-
++#stats		hostname	"*"	-
Index: npl/internetserver/poptop_ppp/patches/ppp-2.4.1-varargs.patch
===================================================================
--- npl/internetserver/poptop_ppp/patches/ppp-2.4.1-varargs.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
+++ npl/internetserver/poptop_ppp/patches/ppp-2.4.1-varargs.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
@@ -0,0 +1,11 @@
+--- ppp-2.4.1/pppd/utils.c	Thu Jun  6 16:22:58 2002
++++ ppp-2.4.1/pppd/utils.c	Thu Jun  6 16:22:00 2002
+@@ -254,7 +254,7 @@
+ 	    break;
+ 	case 'r':
+ 	    f = va_arg(args, char *);
+-#ifndef __powerpc__
++#if !defined(__powerpc__) && !defined(__s390__) && !defined(__s390x__) && !defined(__x86_64__)
+ 	    n = vslprintf(buf, buflen + 1, f, va_arg(args, va_list));
+ #else
+ 	    /* On the powerpc, a va_list is an array of 1 structure */
Index: npl/internetserver/poptop_ppp/patches/ppp-2.4.2-argv.patch
===================================================================
--- npl/internetserver/poptop_ppp/patches/ppp-2.4.2-argv.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
+++ npl/internetserver/poptop_ppp/patches/ppp-2.4.2-argv.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
@@ -0,0 +1,11 @@
+--- ppp-2.4.2/pppd/plugins/passprompt.c.argv	2004-09-16 12:06:19.773788846 +0200
++++ ppp-2.4.2/pppd/plugins/passprompt.c	2004-09-16 12:06:24.203178380 +0200
+@@ -50,7 +50,7 @@
+     }
+     if (!kid) {
+ 	/* we are the child, exec the program */
+-	char *argv[4], fdstr[32];
++	char *argv[5], fdstr[32];
+ 	sys_close();
+ 	closelog();
+ 	close(p[0]);
Index: npl/internetserver/poptop_ppp/patches/ppp-2.4.2-change_resolv_conf.patch
===================================================================
--- npl/internetserver/poptop_ppp/patches/ppp-2.4.2-change_resolv_conf.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
+++ npl/internetserver/poptop_ppp/patches/ppp-2.4.2-change_resolv_conf.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
@@ -0,0 +1,49 @@
+--- ppp-2.4.2/scripts/ip-down.local.add.change_resolv_conf	1999-02-27 05:32:42.000000000 +0100
++++ ppp-2.4.2/scripts/ip-down.local.add	2004-09-14 14:36:20.058008752 +0200
+@@ -9,12 +9,13 @@
+ #
+ # Nick Walker (nickwalker@email.com)
+ #
++. /etc/sysconfig/network-scripts/network-functions
+ 
+-if [ -n "$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
+-	if [ -f /etc/ppp/resolv.prev ]; then
+-		cp -f /etc/ppp/resolv.prev /etc/resolv.conf
++if [ -n "$USEPEERDNS" -a -f /var/run/ppp/resolv.conf ]; then
++	if [ -f /var/run/ppp/resolv.prev ]; then
++		change_resolv_conf /var/run/ppp/resolv.prev
+ 	else
+-		rm -f /etc/resolv.conf
++		change_resolv_conf
+ 	fi
+ fi
+ 
+--- ppp-2.4.2/scripts/ip-up.local.add.change_resolv_conf	1999-11-15 04:28:10.000000000 +0100
++++ ppp-2.4.2/scripts/ip-up.local.add	2004-09-14 14:37:39.129061828 +0200
+@@ -9,16 +9,19 @@
+ #
+ # Nick Walker (nickwalker@email.com)
+ #
++. /etc/sysconfig/network-scripts/network-functions
+ 
+-if [ -n "$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
+-	rm -f /etc/ppp/resolv.prev
++if [ -n "$USEPEERDNS" -a -f /var/run/ppp/resolv.conf ]; then
++	rm -f /var/run/ppp/resolv.prev
+ 	if [ -f /etc/resolv.conf ]; then
+-		cp /etc/resolv.conf /etc/ppp/resolv.prev
+-		grep domain /etc/ppp/resolv.prev > /etc/resolv.conf
+-		grep search /etc/ppp/resolv.prev >> /etc/resolv.conf
+-		cat /etc/ppp/resolv.conf >> /etc/resolv.conf
++		cp /etc/resolv.conf /var/run/ppp/resolv.prev
++		rscf=/var/run/ppp/resolv.new
++		grep domain /var/run/ppp/resolv.prev > $rscf
++		grep search /var/run/ppp/resolv.prev >> $rscf
++		change_resolv_conf $rscf
++		rm -f $rscf
+ 	else
+-		cp /etc/ppp/resolv.conf /etc
++		change_resolv_conf /var/run/ppp/resolv.conf
+ 	fi
+ fi
+ 
Index: npl/internetserver/poptop_ppp/patches/ppp-2.4.2-ifname.diff
===================================================================
--- npl/internetserver/poptop_ppp/patches/ppp-2.4.2-ifname.diff	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
+++ npl/internetserver/poptop_ppp/patches/ppp-2.4.2-ifname.diff	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
@@ -0,0 +1,126 @@
+--- ./pppd/main.c.orig	2004-07-19 12:35:22.000000000 +0000
++++ ./pppd/main.c	2004-07-19 14:34:38.542120946 +0000
+@@ -98,7 +98,7 @@
+ static const char rcsid[] = RCSID;
+ 
+ /* interface vars */
+-char ifname[32];		/* Interface name */
++char ifname[MAXIFNAMELEN];	/* Interface name */
+ int ifunit;			/* Interface unit number */
+ 
+ struct channel *the_channel;
+@@ -261,13 +261,6 @@
+     NULL
+ };
+ 
+-/*
+- * If PPP_DRV_NAME is not defined, use the default "ppp" as the device name.
+- */
+-#if !defined(PPP_DRV_NAME)
+-#define PPP_DRV_NAME	"ppp"
+-#endif /* !defined(PPP_DRV_NAME) */
+-
+ int
+ main(argc, argv)
+     int argc;
+@@ -777,8 +770,11 @@
+ set_ifunit(iskey)
+     int iskey;
+ {
+-    info("Using interface %s%d", PPP_DRV_NAME, ifunit);
++    if (req_ifname[0] != '\0')
++	slprintf(ifname, sizeof(ifname), req_ifname);
++    else
+     slprintf(ifname, sizeof(ifname), "%s%d", PPP_DRV_NAME, ifunit);
++    info("Using interface %s", ifname);
+     script_setenv("IFNAME", ifname, iskey);
+     if (iskey) {
+ 	create_pidfile(getpid());	/* write pid to file */
+--- ./pppd/options.c.orig	2004-07-19 12:59:21.000000000 +0000
++++ ./pppd/options.c	2004-07-19 14:35:04.253865964 +0000
+@@ -102,6 +102,7 @@
+ bool	tune_kernel;		/* may alter kernel settings */
+ int	connect_delay = 1000;	/* wait this many ms after connect script */
+ int	req_unit = -1;		/* requested interface unit */
++char	req_ifname[MAXIFNAMELEN];	/* requested interface name */
+ bool	multilink = 0;		/* Enable multilink operation */
+ char	*bundle_name = NULL;	/* bundle name for multilink */
+ bool	dump_options;		/* print out option values */
+@@ -259,6 +260,10 @@
+       "PPP interface unit number to use if possible",
+       OPT_PRIO | OPT_LLIMIT, 0, 0 },
+ 
++    { "ifname", o_string, req_ifname,
++      "Set PPP interface name",
++      OPT_PRIO | OPT_PRIV | OPT_STATIC, NULL, MAXIFNAMELEN },
++
+     { "dump", o_bool, &dump_options,
+       "Print out option values after parsing all options", 1 },
+     { "dryrun", o_bool, &dryrun,
+--- ./pppd/pppd.8.orig	2004-07-19 14:39:06.639320497 +0000
++++ ./pppd/pppd.8	2004-07-19 15:00:37.339448432 +0000
+@@ -1020,7 +1020,12 @@
+ .TP
+ .B unit \fInum
+ Sets the ppp unit number (for a ppp0 or ppp1 etc interface name) for outbound
+-connections.
++connections.  If the unit is already in use a dynamically allocated will be
++used.
++.TP
++.B ifname \fIstring
++Set the ppp interface name for outbound connections.  A failure to set the
++name will terminate the pppd.
+ .TP
+ .B updetach
+ With this option, pppd will detach from its controlling terminal once
+--- ./pppd/pppd.h.orig	2004-07-19 12:59:16.000000000 +0000
++++ ./pppd/pppd.h	2004-07-19 15:02:08.792752747 +0000
+@@ -80,6 +80,16 @@
+ #define MAXARGS		1	/* max # args to a command */
+ #define MAXNAMELEN	256	/* max length of hostname or name for auth */
+ #define MAXSECRETLEN	256	/* max length of password or secret */
++#define MAXIFNAMELEN	32	/* max length of interface name; or use IFNAMSIZ, can we
++				   always include net/if.h? */
++
++/*
++ * If PPP_DRV_NAME is not defined, use the default "ppp" as the device name.
++ * Where should PPP_DRV_NAME come from? Do we include it here?
++ */
++#if !defined(PPP_DRV_NAME)
++#define PPP_DRV_NAME	"ppp"
++#endif /* !defined(PPP_DRV_NAME) */
+ 
+ /*
+  * Option descriptor structure.
+@@ -304,6 +314,7 @@
+ extern int	connect_delay;	/* Time to delay after connect script */
+ extern int	max_data_rate;	/* max bytes/sec through charshunt */
+ extern int	req_unit;	/* interface unit number to use */
++extern char	req_ifname[MAXIFNAMELEN];	/* interface name to use */
+ extern bool	multilink;	/* enable multilink operation */
+ extern bool	noendpoint;	/* don't send or accept endpt. discrim. */
+ extern char	*bundle_name;	/* bundle name for multilink */
+--- ./pppd/sys-linux.c.orig	2004-07-19 12:33:29.000000000 +0000
++++ ./pppd/sys-linux.c	2004-07-19 14:37:36.463754450 +0000
+@@ -649,6 +649,21 @@
+ 	}
+ 	if (x < 0)
+ 		error("Couldn't create new ppp unit: %m");
++
++	if (x == 0 && req_ifname[0] != '\0') {
++		struct ifreq ifr;
++		char t[MAXIFNAMELEN];
++		memset(&ifr, 0, sizeof(struct ifreq));
++		slprintf(t, sizeof(t), "%s%d", PPP_DRV_NAME, ifunit);
++		strncpy(ifr.ifr_name, t, IF_NAMESIZE);
++		strncpy(ifr.ifr_newname, req_ifname, IF_NAMESIZE);
++		x = ioctl(sock_fd, SIOCSIFNAME, &ifr);
++		if (x < 0)
++		    error("Couldn't rename interface %s to %s: %m", t, req_ifname);
++		else
++		    info("Renamed interface %s to %s", t, req_ifname);
++	}
++
+ 	return x;
+ }
+ 
Index: npl/internetserver/poptop_ppp/patches/ppp-2.4.2-libutil.patch
===================================================================
--- npl/internetserver/poptop_ppp/patches/ppp-2.4.2-libutil.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
+++ npl/internetserver/poptop_ppp/patches/ppp-2.4.2-libutil.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
@@ -0,0 +1,86 @@
+glibc provides logwtmp in libutil, so we'll use that instead.
+
+--- ppp-2.4.2/pppd/sys-linux.c	2004-03-10 18:26:53.000000000 -0500
++++ ppp-2.4.2/pppd/sys-linux.c	2004-03-10 18:26:40.000000000 -0500
+@@ -2151,81 +2151,6 @@
+ 
+ /********************************************************************
+  *
+- * Update the wtmp file with the appropriate user name and tty device.
+- */
+-
+-void logwtmp (const char *line, const char *name, const char *host)
+-{
+-    struct utmp ut, *utp;
+-    pid_t  mypid = getpid();
+-#if __GLIBC__ < 2
+-    int    wtmp;
+-#endif
+-
+-/*
+- * Update the signon database for users.
+- * Christoph Lameter: Copied from poeigl-1.36 Jan 3, 1996
+- */
+-    utmpname(_PATH_UTMP);
+-    setutent();
+-    while ((utp = getutent()) && (utp->ut_pid != mypid))
+-	/* nothing */;
+-
+-    if (utp)
+-	memcpy(&ut, utp, sizeof(ut));
+-    else
+-	/* some gettys/telnetds don't initialize utmp... */
+-	memset(&ut, 0, sizeof(ut));
+-
+-    if (ut.ut_id[0] == 0)
+-	strncpy(ut.ut_id, line + 3, sizeof(ut.ut_id));
+-
+-    strncpy(ut.ut_user, name, sizeof(ut.ut_user));
+-    strncpy(ut.ut_line, line, sizeof(ut.ut_line));
+-
+-    time(&ut.ut_time);
+-
+-    ut.ut_type = USER_PROCESS;
+-    ut.ut_pid  = mypid;
+-
+-    /* Insert the host name if one is supplied */
+-    if (*host)
+-	strncpy (ut.ut_host, host, sizeof(ut.ut_host));
+-
+-    /* Insert the IP address of the remote system if IP is enabled */
+-    if (ipcp_protent.enabled_flag && ipcp_hisoptions[0].neg_addr)
+-	memcpy(&ut.ut_addr, (char *) &ipcp_hisoptions[0].hisaddr,
+-		 sizeof(ut.ut_addr));
+-
+-    /* CL: Makes sure that the logout works */
+-    if (*host == 0 && *name==0)
+-	ut.ut_host[0]=0;
+-
+-    pututline(&ut);
+-    endutent();
+-/*
+- * Update the wtmp file.
+- */
+-#if __GLIBC__ >= 2
+-    updwtmp(_PATH_WTMP, &ut);
+-#else
+-    wtmp = open(_PATH_WTMP, O_APPEND|O_WRONLY);
+-    if (wtmp >= 0) {
+-	flock(wtmp, LOCK_EX);
+-
+-	if (write (wtmp, (char *)&ut, sizeof(ut)) != sizeof(ut))
+-	    warn("error writing %s: %m", _PATH_WTMP);
+-
+-	flock(wtmp, LOCK_UN);
+-
+-	close (wtmp);
+-    }
+-#endif
+-}
+-
+-
+-/********************************************************************
+- *
+  * sifvjcomp - config tcp header compression
+  */
+ 
Index: npl/internetserver/poptop_ppp/patches/ppp-2.4.2-pcap.patch
===================================================================
--- npl/internetserver/poptop_ppp/patches/ppp-2.4.2-pcap.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
+++ npl/internetserver/poptop_ppp/patches/ppp-2.4.2-pcap.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
@@ -0,0 +1,64 @@
+--- ppp-2.4.2/pppd/options.c.pcap	2004-01-13 05:02:07.000000000 +0100
++++ ppp-2.4.2/pppd/options.c	2004-09-15 11:39:34.832772935 +0200
+@@ -56,7 +56,6 @@
+ #endif
+ #ifdef PPP_FILTER
+ #include <pcap.h>
+-#include <pcap-int.h>	/* XXX: To get struct pcap */
+ #endif
+ 
+ #include "pppd.h"
+@@ -122,7 +121,6 @@
+ #ifdef PPP_FILTER
+ struct	bpf_program pass_filter;/* Filter program for packets to pass */
+ struct	bpf_program active_filter; /* Filter program for link-active pkts */
+-pcap_t  pc;			/* Fake struct pcap so we can compile expr */
+ #endif
+ 
+ char *current_option;		/* the name of the option being parsed */
+@@ -1439,12 +1437,18 @@
+ setpassfilter(argv)
+     char **argv;
+ {
+-    pc.linktype = DLT_PPP;
+-    pc.snapshot = PPP_HDRLEN;
++    pcap_t* pc = pcap_open_dead (DLT_PPP, PPP_HDRLEN);
++    if (!pc) {
++        option_error("error in pass-filter expression: pcap_open_dead failed\n");
++	return 0;
++    }
+  
+-    if (pcap_compile(&pc, &pass_filter, *argv, 1, netmask) == 0)
++    if (pcap_compile(pc, &pass_filter, *argv, 1, netmask) == 0) {
++        pcap_close(pc);
+ 	return 1;
+-    option_error("error in pass-filter expression: %s\n", pcap_geterr(&pc));
++    }
++    option_error("error in pass-filter expression: %s\n", pcap_geterr(pc));
++    pcap_close(pc);
+     return 0;
+ }
+ 
+@@ -1455,12 +1459,18 @@
+ setactivefilter(argv)
+     char **argv;
+ {
+-    pc.linktype = DLT_PPP;
+-    pc.snapshot = PPP_HDRLEN;
++    pcap_t* pc = pcap_open_dead (DLT_PPP, PPP_HDRLEN);
++    if (!pc) {
++        option_error("error in pass-filter expression: pcap_open_dead failed\n");
++	return 0;
++    }
+  
+-    if (pcap_compile(&pc, &active_filter, *argv, 1, netmask) == 0)
++    if (pcap_compile(pc, &active_filter, *argv, 1, netmask) == 0) {
++        pcap_close(pc);
+ 	return 1;
+-    option_error("error in active-filter expression: %s\n", pcap_geterr(&pc));
++    }
++    option_error("error in active-filter expression: %s\n", pcap_geterr(pc));
++    pcap_close(pc);
+     return 0;
+ }
+ #endif
Index: npl/internetserver/poptop_ppp/patches/ppp-2.4.2-pie.patch
===================================================================
--- npl/internetserver/poptop_ppp/patches/ppp-2.4.2-pie.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
+++ npl/internetserver/poptop_ppp/patches/ppp-2.4.2-pie.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
@@ -0,0 +1,22 @@
+--- ppp-2.4.2/pppd/Makefile.linux.pie	2004-05-14 13:46:14.188327258 +0200
++++ ppp-2.4.2/pppd/Makefile.linux	2004-05-14 13:46:16.147058249 +0200
+@@ -206,7 +206,7 @@
+ 	$(INSTALL) -c -m 444 pppd.8 $(MANDIR)/man8
+ 
+ pppd: $(PPPDOBJS)
+-	$(CC) $(CFLAGS) $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS)
++	$(CC) $(CFLAGS) -pie $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS)
+ 
+ srp-entry:	srp-entry.c
+ 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ srp-entry.c $(LIBS)
+--- ppp-2.4.2/chat/Makefile.linux.pie	2004-05-14 13:46:32.699784925 +0200
++++ ppp-2.4.2/chat/Makefile.linux	2004-05-14 13:46:45.071085866 +0200
+@@ -14,7 +14,7 @@
+ all:	chat
+ 
+ chat:	chat.o
+-	$(CC) -o chat chat.o
++	$(CC) -pie -o chat chat.o
+ 
+ chat.o:	chat.c
+ 	$(CC) -c $(CFLAGS) -o chat.o chat.c
Index: npl/internetserver/poptop_ppp/patches/ppp-2.4.2-pppoatm-make.patch
===================================================================
--- npl/internetserver/poptop_ppp/patches/ppp-2.4.2-pppoatm-make.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
+++ npl/internetserver/poptop_ppp/patches/ppp-2.4.2-pppoatm-make.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
@@ -0,0 +1,9 @@
+--- ppp-2.4.2/pppd/plugins/pppoatm/Makefile.linux.make	2004-10-04 11:37:28.331818344 +0100
++++ ppp-2.4.2/pppd/plugins/pppoatm/Makefile.linux	2004-10-04 11:37:54.884781680 +0100
+@@ -1,5 +1,5 @@
+ CC	= gcc
+-COPTS	= -O2 -g
++COPTS	= $(RPM_OPT_FLAGS)
+ CFLAGS	= $(COPTS) -I../.. -I../../../include -fPIC
+ LDFLAGS	= -shared
+ INSTALL	= install -o root
Index: npl/internetserver/poptop_ppp/patches/ppp-2.4.2-pppoatm-mtu.patch
===================================================================
--- npl/internetserver/poptop_ppp/patches/ppp-2.4.2-pppoatm-mtu.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
+++ npl/internetserver/poptop_ppp/patches/ppp-2.4.2-pppoatm-mtu.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
@@ -0,0 +1,28 @@
+--- ppp-2.4.2/pppd/plugins/pppoatm/pppoatm.c.mtu	2004-10-07 13:32:05.660910432 +0100
++++ ppp-2.4.2/pppd/plugins/pppoatm/pppoatm.c	2004-10-07 13:58:20.096559832 +0100
+@@ -175,8 +175,10 @@
+ {
+ 	int sock;
+ 	struct ifreq ifr;
+-	if (mtu > pppoatm_max_mtu)
+-		error("Couldn't increase MTU to %d", mtu);
++	if (pppoatm_max_mtu && mtu > pppoatm_max_mtu) {
++		warn("Couldn't increase MTU to %d. Using %d", mtu, pppoatm_max_mtu);
++		mtu = pppoatm_max_mtu;
++	}
+ 	sock = socket(AF_INET, SOCK_DGRAM, 0);
+ 	if (sock < 0)
+ 		fatal("Couldn't create IP socket: %m");
+@@ -192,8 +194,10 @@
+ 			      int pcomp,
+ 			      int accomp)
+ {
+-	if (mru > pppoatm_max_mru)
+-		error("Couldn't increase MRU to %d", mru);
++	if (pppoatm_max_mru && mru > pppoatm_max_mru) {
++		warn("Couldn't increase MRU to %d. Using %d", mru, pppoatm_max_mru);
++		mru = pppoatm_max_mru;
++	}
+ }
+ 
+ void plugin_init(void)
Index: npl/internetserver/poptop_ppp/patches/ppp-2.4.3-atm_backend.patch
===================================================================
--- npl/internetserver/poptop_ppp/patches/ppp-2.4.3-atm_backend.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
+++ npl/internetserver/poptop_ppp/patches/ppp-2.4.3-atm_backend.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
@@ -0,0 +1,14 @@
+--- ppp-2.4.3/pppd/pppd.h	2004-11-23 12:49:43.000000000 +0000
++++ ppp-2.4.3/pppd/pppd.h	2004-11-23 12:59:54.000000000 +0000
+@@ -217,6 +217,11 @@
+ };
+ 
+ /*
++ * atm_backend_t definition missing from system headers in Fedora Core 2
++ */
++typedef unsigned short atm_backend_t;
++
++/*
+  * Global variables.
+  */
+ 
Index: npl/internetserver/poptop_ppp/patches/ppp-2.4.3-bpf.patch
===================================================================
--- npl/internetserver/poptop_ppp/patches/ppp-2.4.3-bpf.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
+++ npl/internetserver/poptop_ppp/patches/ppp-2.4.3-bpf.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
@@ -0,0 +1,57 @@
+Fix up header file names for old libpcap versions
+
+--- ppp-2.4.3/pppd/demand.c	2004-11-04 10:02:26.000000000 +0000
++++ ppp-2.4.3/pppd/demand.c	2004-11-23 11:42:09.000000000 +0000
+@@ -44,7 +44,7 @@
+ #include <sys/stat.h>
+ #include <sys/socket.h>
+ #ifdef PPP_FILTER
+-#include <pcap-bpf.h>
++#include <net/bpf.h>
+ #endif
+ 
+ #include "pppd.h"
+--- ppp-2.4.3/pppd/sys-linux.c	2004-11-23 11:28:35.000000000 +0000
++++ ppp-2.4.3/pppd/sys-linux.c	2004-11-23 11:42:59.000000000 +0000
+@@ -136,7 +136,7 @@
+ #endif /* IPX_CHANGE */
+ 
+ #ifdef PPP_FILTER
+-#include <pcap-bpf.h>
++#include <net/bpf.h>
+ #include <linux/filter.h>
+ #endif /* PPP_FILTER */
+ 
+--- ppp-2.4.3/pppd/Makefile.linux	2005-02-10 10:28:50.000000000 +0000
++++ ppp-2.4.3/pppd/Makefile.linux	2005-02-10 10:29:46.000000000 +0000
+@@ -172,7 +172,7 @@
+ endif
+ 
+ ifdef FILTER
+-ifneq ($(wildcard /usr/include/pcap-bpf.h),)
++ifneq ($(wildcard /usr/include/net/bpf.h),)
+ LIBS    += -lpcap
+ CFLAGS  += -DPPP_FILTER
+ endif
+--- ppp-2.4.3/pppd/Makefile.linux.lib64	2005-02-10 10:28:55.000000000 +0000
++++ ppp-2.4.3/pppd/Makefile.linux.lib64	2005-02-10 10:29:57.000000000 +0000
+@@ -171,7 +171,7 @@
+ endif
+ 
+ ifdef FILTER
+-ifneq ($(wildcard /usr/include/pcap-bpf.h),)
++ifneq ($(wildcard /usr/include/net/bpf.h),)
+ LIBS    += -lpcap
+ CFLAGS  += -DPPP_FILTER
+ endif
+--- ppp-2.4.3/pppd/Makefile.linux.make	2005-02-10 10:29:04.000000000 +0000
++++ ppp-2.4.3/pppd/Makefile.linux.make	2005-02-10 10:30:10.000000000 +0000
+@@ -171,7 +171,7 @@
+ endif
+ 
+ ifdef FILTER
+-ifneq ($(wildcard /usr/include/pcap-bpf.h),)
++ifneq ($(wildcard /usr/include/net/bpf.h),)
+ LIBS    += -lpcap
+ CFLAGS  += -DPPP_FILTER
+ endif
Index: npl/internetserver/poptop_ppp/patches/ppp-2.4.3-dontwriteetc.patch
===================================================================
--- npl/internetserver/poptop_ppp/patches/ppp-2.4.3-dontwriteetc.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
+++ npl/internetserver/poptop_ppp/patches/ppp-2.4.3-dontwriteetc.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
@@ -0,0 +1,58 @@
+--- ppp-2.4.3/chat/chat.8	2004-11-13 12:22:49.000000000 +0000
++++ ppp-2.4.3/chat/chat.8	2004-11-22 15:07:28.071470928 +0000
+@@ -200,7 +200,7 @@
+ at the terminal via standard error.  If \fBchat\fR is being run by
+ pppd, and pppd is running as a daemon (detached from its controlling
+ terminal), standard error will normally be redirected to the file
+-/etc/ppp/connect\-errors.
++/var/log/ppp/connect\-errors.
+ .LP
+ \fBSAY\fR strings must be enclosed in single or double quotes. If
+ carriage return and line feed are needed in the string to be output,
+--- ppp-2.4.3/linux/Makefile.top	2004-10-31 22:25:16.000000000 +0000
++++ ppp-2.4.3/linux/Makefile.top	2004-11-22 15:11:32.147417077 +0000
+@@ -4,7 +4,9 @@
+ BINDIR = $(DESTDIR)/sbin
+ INCDIR = $(DESTDIR)/include
+ MANDIR = $(DESTDIR)/share/man
+-ETCDIR = @SYSCONF@/ppp
++ETCDIR = $(DESTDIR)@SYSCONF@/ppp
++RUNDIR = $(DESTDIR)/../var/run/ppp
++LOGDIR = $(DESTDIR)/../var/log/ppp
+ 
+ # uid 0 = root
+ INSTALL= install
+@@ -16,7 +18,7 @@
+ 	cd pppstats; $(MAKE) $(MFLAGS) all
+ 	cd pppdump; $(MAKE) $(MFLAGS) all
+ 
+-install: $(BINDIR) $(MANDIR)/man8 install-progs install-devel
++install: $(BINDIR) $(RUNDIR) $(LOGDIR) $(MANDIR)/man8 install-progs install-devel
+ 
+ install-progs:
+ 	cd chat; $(MAKE) $(MFLAGS) install
+@@ -44,6 +46,10 @@
+ 	$(INSTALL) -d -m 755 $@
+ $(ETCDIR):
+ 	$(INSTALL) -d -m 755 $@
++$(RUNDIR):
++	$(INSTALL) -d -m 755 $@
++$(LOGDIR):
++	$(INSTALL) -d -m 755 $@
+ 
+ clean:
+ 	rm -f `find . -name '*.[oas]' -print`
+--- ppp-2.4.3/pppd/pathnames.h	2004-11-13 12:02:22.000000000 +0000
++++ ppp-2.4.3/pppd/pathnames.h	2004-11-22 15:12:54.812072782 +0000
+@@ -27,9 +27,9 @@
+ #define _PATH_AUTHUP	 _ROOT_PATH "/etc/ppp/auth-up"
+ #define _PATH_AUTHDOWN	 _ROOT_PATH "/etc/ppp/auth-down"
+ #define _PATH_TTYOPT	 _ROOT_PATH "/etc/ppp/options."
+-#define _PATH_CONNERRS	 _ROOT_PATH "/etc/ppp/connect-errors"
++#define _PATH_CONNERRS	 _ROOT_PATH "/var/log/ppp/connect-errors"
+ #define _PATH_PEERFILES	 _ROOT_PATH "/etc/ppp/peers/"
+-#define _PATH_RESOLV	 _ROOT_PATH "/etc/ppp/resolv.conf"
++#define _PATH_RESOLV	 _ROOT_PATH "/var/run/ppp/resolv.conf"
+ 
+ #define _PATH_USEROPT	 ".ppprc"
+ #define	_PATH_PSEUDONYM	 ".ppp_pseudonym"
Index: npl/internetserver/poptop_ppp/patches/ppp-2.4.3-fix.patch
===================================================================
--- npl/internetserver/poptop_ppp/patches/ppp-2.4.3-fix.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
+++ npl/internetserver/poptop_ppp/patches/ppp-2.4.3-fix.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
@@ -0,0 +1,123 @@
+--- ppp-2.4.3/pppd/plugins/rp-pppoe/discovery.c	2004-11-04 10:07:37.000000000 +0000
++++ ppp-2.4.3/pppd/plugins/rp-pppoe/discovery.c	2004-11-22 15:18:56.546019577 +0000
+@@ -13,6 +13,8 @@
+ 
+ #include "pppoe.h"
+ 
++void warn __P((char *, ...));   /* log a warning message */
++
+ #ifdef HAVE_SYSLOG_H
+ #include <syslog.h>
+ #endif
+--- ppp-2.4.3/pppd/ipv6cp.c	2004-11-13 02:28:15.000000000 +0000
++++ ppp-2.4.3/pppd/ipv6cp.c	2004-11-22 15:22:27.469116775 +0000
+@@ -151,6 +151,7 @@
+  */
+ 
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
+ #include <netdb.h>
+@@ -1064,7 +1065,9 @@
+     return (rc);			/* Return final code */
+ }
+ 
+-
++#if defined(SOL2) || defined(__linux__)
++int ether_to_eui64(eui64_t *p_eui64);
++#endif
+ /*
+  * ipv6_check_options - check that any IP-related options are OK,
+  * and assign appropriate defaults.
+--- ppp-2.4.3/include/linux/if_pppox.h	2001-12-15 00:34:24.000000000 +0000
++++ ppp-2.4.3/include/linux/if_pppox.h	2004-11-22 15:24:19.080661226 +0000
+@@ -18,7 +18,7 @@
+ 
+ 
+ #include <asm/types.h>
+-#include <asm/byteorder.h>
++#include <endian.h>
+ 
+ #ifdef  __KERNEL__
+ #include <linux/if_ether.h>
+@@ -97,10 +97,10 @@
+ #define PTT_GEN_ERR  	__constant_htons(0x0203)
+ 
+ struct pppoe_hdr {
+-#if defined(__LITTLE_ENDIAN_BITFIELD)
++#if __BYTE_ORDER == __LITTLE_ENDIAN
+ 	__u8 ver : 4;
+ 	__u8 type : 4;
+-#elif defined(__BIG_ENDIAN_BITFIELD)
++#elif __BYTE_ORDER == __BIG_ENDIAN
+ 	__u8 type : 4;
+ 	__u8 ver : 4;
+ #else
+--- ppp-2.4.3/pppdump/deflate.c	2004-02-02 03:36:46.000000000 +0000
++++ ppp-2.4.3/pppdump/deflate.c	2004-11-22 15:26:09.473500830 +0000
+@@ -237,8 +237,8 @@
+ {
+     struct deflate_state *state = (struct deflate_state *) arg;
+     u_char *rptr, *wptr;
+-    int rlen, olen, ospace;
+-    int seq, i, flush, r, decode_proto;
++    int rlen, olen;
++    int seq, r;
+ 
+     rptr = mi;
+     if (*rptr == 0)
+--- ppp-2.4.3/pppdump/bsd-comp.c	2004-02-02 03:36:46.000000000 +0000
++++ ppp-2.4.3/pppdump/bsd-comp.c	2004-11-22 15:29:02.169002889 +0000
+@@ -383,7 +383,7 @@
+ 	|| options[0] != CI_BSD_COMPRESS || options[1] != CILEN_BSD_COMPRESS
+ 	|| BSD_VERSION(options[2]) != BSD_CURRENT_VERSION
+ 	|| BSD_NBITS(options[2]) != db->maxbits
+-	|| decomp && db->lens == NULL)
++	|| (decomp && db->lens == NULL))
+ 	return 0;
+ 
+     if (decomp) {
+@@ -556,11 +556,11 @@
+     u_int n_bits = db->n_bits;
+     u_int tgtbitno = 32-n_bits;	/* bitno when we have a code */
+     struct bsd_dict *dictp;
+-    int explen, i, seq, len;
++    int explen, seq, len;
+     u_int incode, oldcode, finchar;
+     u_char *p, *rptr, *wptr;
+     int ilen;
+-    int dlen, space, codelen, extra;
++    int dlen=0, codelen, extra;
+ 
+     rptr = cmsg;
+     if (*rptr == 0)
+@@ -616,7 +616,7 @@
+ 	}
+ 
+ 	if (incode > max_ent + 2 || incode > db->maxmaxcode
+-	    || incode > max_ent && oldcode == CLEAR) {
++	    || (incode > max_ent && oldcode == CLEAR)) {
+ 	    if (db->debug) {
+ 		printf("bsd_decomp%d: bad code 0x%x oldcode=0x%x ",
+ 		       db->unit, incode, oldcode);
+--- ppp-2.4.3/pppdump/pppdump.c	2004-02-02 03:36:46.000000000 +0000
++++ ppp-2.4.3/pppdump/pppdump.c	2004-11-22 17:18:49.340165228 +0000
+@@ -191,7 +191,7 @@
+ 	    show_time(f, c);
+ 	    break;
+ 	default:
+-	    printf("?%.2x\n");
++	    printf("?%.2x\n", c);
+ 	}
+     }
+ }
+@@ -421,7 +421,7 @@
+ 	    show_time(f, c);
+ 	    break;
+ 	default:
+-	    printf("?%.2x\n");
++	    printf("?%.2x\n", c);
+ 	}
+     }
+ }
Index: npl/internetserver/poptop_ppp/patches/ppp-2.4.3-fix64.patch
===================================================================
--- npl/internetserver/poptop_ppp/patches/ppp-2.4.3-fix64.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
+++ npl/internetserver/poptop_ppp/patches/ppp-2.4.3-fix64.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
@@ -0,0 +1,10 @@
+--- ppp-2.4.3/pppd/sha1.c	2004-10-25 00:28:02.000000000 +0100
++++ ppp-2.4.3/pppd/sha1.c	2004-11-22 15:36:46.929580681 +0000
+@@ -18,6 +18,7 @@
+ 
+ #include <string.h>
+ #include <netinet/in.h>	/* htonl() */
++#include <sys/types.h> /* u_int32_t */
+ #include "sha1.h"
+ 
+ static void
Index: npl/internetserver/poptop_ppp/patches/ppp-2.4.3-lib64.patch
===================================================================
--- npl/internetserver/poptop_ppp/patches/ppp-2.4.3-lib64.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
+++ npl/internetserver/poptop_ppp/patches/ppp-2.4.3-lib64.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
@@ -0,0 +1,54 @@
+If CC supports the "-print-multi-os-directory" option, use it to determine
+where to check for the existence libcrypt.  If it doesn't, then we get /usr/lib.
+
+--- ppp-2.4.3/pppd/Makefile.linux	2004-11-22 14:43:58.522728670 +0000
++++ ppp-2.4.3/pppd/Makefile.linux	2004-11-22 14:47:09.054728322 +0000
+@@ -8,6 +8,7 @@
+ BINDIR = $(DESTDIR)/sbin
+ MANDIR = $(DESTDIR)/share/man/man8
+ INCDIR = $(DESTDIR)/include
++LIBDIR = $(DESTDIR)/usr/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)
+ 
+ TARGETS = pppd
+ 
+@@ -32,7 +33,7 @@
+ 
+ CC = gcc
+ #
+-COPTS = -Wall $(RPM_OPT_FLAGS)
++COPTS = -Wall $(RPM_OPT_FLAGS) -DLIBDIR=\""$(LIBDIR)"\"
+ LIBS = -lutil
+ 
+ # Uncomment the next 2 lines to include support for Microsoft's
+@@ -120,7 +121,7 @@
+ ifneq ($(wildcard /usr/include/crypt.h),)
+ CFLAGS   += -DHAVE_CRYPT_H=1
+ endif
+-ifneq ($(wildcard /usr/lib/libcrypt.*),)
++ifneq ($(wildcard $(LIBDIR)/libcrypt.*),)
+ LIBS	+= -lcrypt
+ endif
+ 
+--- ppp-2.4.3/pppd/plugins/Makefile.linux	2004-11-22 14:43:58.528727189 +0000
++++ ppp-2.4.3/pppd/plugins/Makefile.linux	2004-11-22 14:54:10.108012609 +0000
+@@ -7,7 +7,7 @@
+ DESTDIR = @DESTDIR@
+ BINDIR = $(DESTDIR)/sbin
+ MANDIR = $(DESTDIR)/share/man/man8
+-LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
++LIBDIR = $(DESTDIR)/lib/$(shell $(CC) -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)
+ 
+ SUBDIRS := rp-pppoe pppoatm radius
+ # Uncomment the next line to include the radius authentication plugin
+If CC supports the "-print-multi-os-directory" option, use it to determine
+where to check for the existence libcrypt.  If it doesn't, then we get /usr/lib.
+
+--- ppp-2.4.3/pppd/pathnames.h	2004-03-10 18:52:15.000000000 -0500
++++ ppp-2.4.3/pppd/pathnames.h	2004-03-10 18:52:10.000000000 -0500
+@@ -55,5 +55,5 @@
+ #endif /* __STDC__ */
+ 
+ #ifdef PLUGIN
+-#define _PATH_PLUGIN	"/usr/lib/pppd/" VERSION
++#define _PATH_PLUGIN	LIBDIR "/pppd/" VERSION
+ #endif /* PLUGIN */
Index: npl/internetserver/poptop_ppp/patches/ppp-2.4.3-make.patch
===================================================================
--- npl/internetserver/poptop_ppp/patches/ppp-2.4.3-make.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
+++ npl/internetserver/poptop_ppp/patches/ppp-2.4.3-make.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
@@ -0,0 +1,92 @@
+Obey RPM_OPT_FLAGS, link with pppd with libutil to get logwtmp(), and enable
+PAM support.
+--- ppp-2.4.3/chat/Makefile.linux	2004-11-03 11:51:47.000000000 +0000
++++ ppp-2.4.3/chat/Makefile.linux	2004-11-22 14:28:51.100642512 +0000
+@@ -10,7 +10,7 @@
+ CDEF4=	-DFNDELAY=O_NDELAY		# Old name value
+ CDEFS=	$(CDEF1) $(CDEF2) $(CDEF3) $(CDEF4)
+ 
+-COPTS=	-O2 -g -pipe
++COPTS=	$(RPM_OPT_FLAGS)
+ CFLAGS=	$(COPTS) $(CDEFS)
+ 
+ INSTALL= install
+--- ppp-2.4.3/pppd/Makefile.linux	2003-11-27 16:55:19.000000000 -0500
++++ ppp-2.4.3/pppd/Makefile.linux	2004-03-10 18:32:46.000000000 -0500
+@@ -29,10 +29,10 @@
+ include .depend
+ endif
+ 
+-# CC = gcc
++CC = gcc
+ #
+-COPTS = -O2 -pipe -Wall -g
+-LIBS =
++COPTS = -Wall $(RPM_OPT_FLAGS)
++LIBS = -lutil
+ 
+ # Uncomment the next 2 lines to include support for Microsoft's
+ # MS-CHAP authentication protocol.  Also, edit plugins/radius/Makefile.linux.
+@@ -60,7 +60,7 @@
+ USE_TDB=y
+ 
+ HAS_SHADOW=y
+-#USE_PAM=y
++USE_PAM=y
+-#HAVE_INET6=y
++HAVE_INET6=y
+ 
+ # Enable plugins
+--- ppp-2.4.3/pppdump/Makefile.linux	2004-10-31 01:36:52.000000000 +0100
++++ ppp-2.4.3/pppdump/Makefile.linux	2004-11-22 14:31:17.128620741 +0000
+@@ -2,7 +2,7 @@
+ BINDIR = $(DESTDIR)/sbin
+ MANDIR = $(DESTDIR)/share/man/man8
+ 
+-CFLAGS= -O -I../include/net
++CFLAGS= $(RPM_OPT_FLAGS) -I../include/net
+ OBJS = pppdump.o bsd-comp.o deflate.o zlib.o
+ 
+ INSTALL= install
+--- ppp-2.4.2/pppstats/Makefile.linux	2002-11-09 06:24:43.000000000 -0500
++++ ppp-2.4.2/pppstats/Makefile.linux	2004-03-10 18:32:55.000000000 -0500
+@@ -7,7 +7,7 @@
+ PPPSTATOBJS = pppstats.o
+ 
+ #CC = gcc
+-COPTS = -O
++COPTS = $(RPM_OPT_FLAGS)
+ COMPILE_FLAGS = -I../include
+ LIBS =
+ 
+--- ppp-2.4.3/pppd/plugins/Makefile.linux	2004-01-12 22:56:24.000000000 -0500
++++ ppp-2.4.3/pppd/plugins/Makefile.linux	2004-03-10 18:41:20.000000000 -0500
+@@ -1,5 +1,5 @@
+ CC	= gcc
+-COPTS	= -O2 -g
++COPTS	= $(RPM_OPT_FLAGS)
+ CFLAGS	= $(COPTS) -I.. -I../../include -fPIC
+ LDFLAGS	= -shared
+ INSTALL	= install -o root
+--- ppp-2.4.3/pppd/plugins/radius/Makefile.linux	2004-11-14 07:02:31.000000000 +0000
++++ ppp-2.4.3/pppd/plugins/radius/Makefile.linux	2004-11-22 14:32:51.512336114 +0000
+@@ -12,7 +12,7 @@
+ INSTALL	= install
+ 
+ PLUGIN=radius.so radattr.so radrealms.so
+-CFLAGS=-I. -I../.. -I../../../include -O2 -fPIC -DRC_LOG_FACILITY=LOG_DAEMON
++CFLAGS=-I. -I../.. -I../../../include $(RPM_OPT_FLAGS) -fPIC -DRC_LOG_FACILITY=LOG_DAEMON
+ 
+ # Uncomment the next line to include support for Microsoft's
+ # MS-CHAP authentication protocol.
+--- ppp-2.4.3/pppd/plugins/rp-pppoe/Makefile.linux	2004-03-10 18:46:52.000000000 -0500
++++ ppp-2.4.3/pppd/plugins/rp-pppoe/Makefile.linux	2004-03-10 18:46:58.000000000 -0500
+@@ -16,7 +16,7 @@
+ # Version is set ONLY IN THE MAKEFILE!  Don't delete this!
+ VERSION=3.3
+ 
+-COPTS=-O2 -g
++COPTS=$(RPM_OPT_FLAGS)
+ CFLAGS=$(COPTS) -I../../../include/linux
+ all: rp-pppoe.so
+ 
Index: npl/internetserver/poptop_ppp/patches/ppp-2.4.3-no_strip.patch
===================================================================
--- npl/internetserver/poptop_ppp/patches/ppp-2.4.3-no_strip.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
+++ npl/internetserver/poptop_ppp/patches/ppp-2.4.3-no_strip.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
@@ -0,0 +1,211 @@
+--- ppp-2.4.3/pppd/Makefile.linux.make	2004-11-13 12:02:22.000000000 +0000
++++ ppp-2.4.3/pppd/Makefile.linux.make	2004-11-22 15:53:21.400562989 +0000
+@@ -99,7 +99,7 @@
+ CFLAGS	+= -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
+ LIBS	+= -lsrp -L/usr/local/ssl/lib -lcrypto
+ TARGETS	+= srp-entry
+-EXTRAINSTALL = $(INSTALL) -s -c -m 555 srp-entry $(BINDIR)/srp-entry
++EXTRAINSTALL = $(INSTALL) -c -m 555 srp-entry $(BINDIR)/srp-entry
+ MANPAGES += srp-entry.8
+ EXTRACLEAN += srp-entry.o
+ NEEDDES=y
+@@ -202,7 +202,7 @@
+ install: pppd
+ 	mkdir -p $(BINDIR) $(MANDIR)
+ 	$(EXTRAINSTALL)
+-	$(INSTALL) -s -c -m 555 pppd $(BINDIR)/pppd
++	$(INSTALL) -c -m 555 pppd $(BINDIR)/pppd
+ 	if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
+ 	  chmod o-rx,u+s $(BINDIR)/pppd; fi
+ 	$(INSTALL) -c -m 444 pppd.8 $(MANDIR)
+--- ppp-2.4.3/pppd/Makefile.linux	2004-11-22 15:51:53.253291549 +0000
++++ ppp-2.4.3/pppd/Makefile.linux	2004-11-22 15:54:18.119580551 +0000
+@@ -100,7 +100,7 @@
+ CFLAGS	+= -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
+ LIBS	+= -lsrp -L/usr/local/ssl/lib -lcrypto
+ TARGETS	+= srp-entry
+-EXTRAINSTALL = $(INSTALL) -s -c -m 555 srp-entry $(BINDIR)/srp-entry
++EXTRAINSTALL = $(INSTALL) -c -m 555 srp-entry $(BINDIR)/srp-entry
+ MANPAGES += srp-entry.8
+ EXTRACLEAN += srp-entry.o
+ NEEDDES=y
+@@ -203,7 +203,7 @@
+ install: pppd
+ 	mkdir -p $(BINDIR) $(MANDIR)
+ 	$(EXTRAINSTALL)
+-	$(INSTALL) -s -c -m 555 pppd $(BINDIR)/pppd
++	$(INSTALL) -c -m 755 pppd $(BINDIR)/pppd
+ 	if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
+ 	  chmod o-rx,u+s $(BINDIR)/pppd; fi
+ 	$(INSTALL) -c -m 444 pppd.8 $(MANDIR)
+--- ppp-2.4.3/pppd/plugins/radius/Makefile.linux.make	2004-11-14 07:02:31.000000000 +0000
++++ ppp-2.4.3/pppd/plugins/radius/Makefile.linux.make	2004-11-22 15:55:27.701428927 +0000
+@@ -36,9 +36,9 @@
+ 
+ install: all
+ 	$(INSTALL) -d -m 755 $(LIBDIR)
+-	$(INSTALL) -s -c -m 755 radius.so $(LIBDIR)
+-	$(INSTALL) -s -c -m 755 radattr.so $(LIBDIR)
+-	$(INSTALL) -s -c -m 755 radrealms.so $(LIBDIR)
++	$(INSTALL) -c -m 755 radius.so $(LIBDIR)
++	$(INSTALL) -c -m 755 radattr.so $(LIBDIR)
++	$(INSTALL) -c -m 755 radrealms.so $(LIBDIR)
+ 	$(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR)
+ 	$(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)
+ 
+--- ppp-2.4.3/pppd/plugins/radius/Makefile.linux	2004-11-22 15:51:53.130321861 +0000
++++ ppp-2.4.3/pppd/plugins/radius/Makefile.linux	2004-11-22 15:56:26.269991739 +0000
+@@ -36,9 +36,9 @@
+ 
+ install: all
+ 	$(INSTALL) -d -m 755 $(LIBDIR)
+-	$(INSTALL) -s -c -m 755 radius.so $(LIBDIR)
+-	$(INSTALL) -s -c -m 755 radattr.so $(LIBDIR)
+-	$(INSTALL) -s -c -m 755 radrealms.so $(LIBDIR)
++	$(INSTALL) -c -m 755 radius.so $(LIBDIR)
++	$(INSTALL) -c -m 755 radattr.so $(LIBDIR)
++	$(INSTALL) -c -m 755 radrealms.so $(LIBDIR)
+ 	$(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR)
+ 	$(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)
+ 
+--- ppp-2.4.3/pppd/plugins/rp-pppoe/Makefile.linux.make	2004-11-14 07:58:37.000000000 +0000
++++ ppp-2.4.3/pppd/plugins/rp-pppoe/Makefile.linux.make	2004-11-22 15:57:38.188262672 +0000
+@@ -39,9 +39,9 @@
+ 
+ install: all
+ 	$(INSTALL) -d -m 755 $(LIBDIR)
+-	$(INSTALL) -s -c -m 4550 rp-pppoe.so $(LIBDIR)
++	$(INSTALL) -c -m 4550 rp-pppoe.so $(LIBDIR)
+ 	$(INSTALL) -d -m 755 $(BINDIR)
+-	$(INSTALL) -s -c -m 555 pppoe-discovery $(BINDIR)
++	$(INSTALL) -c -m 755 pppoe-discovery $(BINDIR)
+ 
+ clean:
+ 	rm -f *.o *.so
+--- ppp-2.4.3/pppd/plugins/rp-pppoe/Makefile.linux	2004-11-22 15:51:53.131321614 +0000
++++ ppp-2.4.3/pppd/plugins/rp-pppoe/Makefile.linux	2004-11-22 15:58:40.461910148 +0000
+@@ -39,9 +39,9 @@
+ 
+ install: all
+ 	$(INSTALL) -d -m 755 $(LIBDIR)
+-	$(INSTALL) -s -c -m 4550 rp-pppoe.so $(LIBDIR)
++	$(INSTALL) -c -m 4550 rp-pppoe.so $(LIBDIR)
+ 	$(INSTALL) -d -m 755 $(BINDIR)
+-	$(INSTALL) -s -c -m 555 pppoe-discovery $(BINDIR)
++	$(INSTALL) -c -m 755 pppoe-discovery $(BINDIR)
+ 
+ clean:
+ 	rm -f *.o *.so
+--- ppp-2.4.3/pppd/Makefile.linux.lib64	2004-11-22 15:51:53.126322846 +0000
++++ ppp-2.4.3/pppd/Makefile.linux.lib64	2004-11-22 16:00:07.275506152 +0000
+@@ -99,7 +99,7 @@
+ CFLAGS	+= -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
+ LIBS	+= -lsrp -L/usr/local/ssl/lib -lcrypto
+ TARGETS	+= srp-entry
+-EXTRAINSTALL = $(INSTALL) -s -c -m 555 srp-entry $(BINDIR)/srp-entry
++EXTRAINSTALL = $(INSTALL) -c -m 555 srp-entry $(BINDIR)/srp-entry
+ MANPAGES += srp-entry.8
+ EXTRACLEAN += srp-entry.o
+ NEEDDES=y
+@@ -202,7 +202,7 @@
+ install: pppd
+ 	mkdir -p $(BINDIR) $(MANDIR)
+ 	$(EXTRAINSTALL)
+-	$(INSTALL) -s -c -m 555 pppd $(BINDIR)/pppd
++	$(INSTALL) -c -m 755 pppd $(BINDIR)/pppd
+ 	if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
+ 	  chmod o-rx,u+s $(BINDIR)/pppd; fi
+ 	$(INSTALL) -c -m 444 pppd.8 $(MANDIR)
+--- ppp-2.4.3/pppd/Makefile.linux.pie	2004-11-22 15:51:53.227297957 +0000
++++ ppp-2.4.3/pppd/Makefile.linux.pie	2004-11-22 16:01:23.690664430 +0000
+@@ -100,7 +100,7 @@
+ CFLAGS	+= -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
+ LIBS	+= -lsrp -L/usr/local/ssl/lib -lcrypto
+ TARGETS	+= srp-entry
+-EXTRAINSTALL = $(INSTALL) -s -c -m 555 srp-entry $(BINDIR)/srp-entry
++EXTRAINSTALL = $(INSTALL) -c -m 555 srp-entry $(BINDIR)/srp-entry
+ MANPAGES += srp-entry.8
+ EXTRACLEAN += srp-entry.o
+ NEEDDES=y
+@@ -203,7 +203,7 @@
+ install: pppd
+ 	mkdir -p $(BINDIR) $(MANDIR)
+ 	$(EXTRAINSTALL)
+-	$(INSTALL) -s -c -m 555 pppd $(BINDIR)/pppd
++	$(INSTALL) -c -m 755 pppd $(BINDIR)/pppd
+ 	if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
+ 	  chmod o-rx,u+s $(BINDIR)/pppd; fi
+ 	$(INSTALL) -c -m 444 pppd.8 $(MANDIR)
+--- ppp-2.4.3/pppdump/Makefile.linux.make	2004-10-31 01:36:52.000000000 +0100
++++ ppp-2.4.3/pppdump/Makefile.linux.make	2004-11-22 16:02:38.024334648 +0000
+@@ -17,5 +17,5 @@
+ 
+ install:
+ 	mkdir -p $(BINDIR) $(MANDIR)
+-	$(INSTALL) -s -c pppdump $(BINDIR)
++	$(INSTALL) -c pppdump $(BINDIR)
+ 	$(INSTALL) -c -m 444 pppdump.8 $(MANDIR)
+--- ppp-2.4.3/pppdump/Makefile.linux	2004-11-22 15:51:53.127322600 +0000
++++ ppp-2.4.3/pppdump/Makefile.linux	2004-11-22 16:03:25.914524837 +0000
+@@ -17,5 +17,5 @@
+ 
+ install:
+ 	mkdir -p $(BINDIR) $(MANDIR)
+-	$(INSTALL) -s -c pppdump $(BINDIR)
++	$(INSTALL) -c pppdump $(BINDIR)
+ 	$(INSTALL) -c -m 444 pppdump.8 $(MANDIR)
+--- ppp-2.4.3/pppstats/Makefile.linux.make	2004-10-31 22:09:03.000000000 +0000
++++ ppp-2.4.3/pppstats/Makefile.linux.make	2004-11-22 16:04:21.262875190 +0000
+@@ -22,7 +22,7 @@
+ 
+ install: pppstats
+ 	-mkdir -p $(MANDIR)
+-	$(INSTALL) -s -c pppstats $(BINDIR)
++	$(INSTALL) -c pppstats $(BINDIR)
+ 	$(INSTALL) -c -m 444 pppstats.8 $(MANDIR)
+ 
+ pppstats: $(PPPSTATSRCS)
+--- ppp-2.4.3/pppstats/Makefile.linux	2004-11-22 15:51:53.128322353 +0000
++++ ppp-2.4.3/pppstats/Makefile.linux	2004-11-22 16:04:37.569853540 +0000
+@@ -22,7 +22,7 @@
+ 
+ install: pppstats
+ 	-mkdir -p $(MANDIR)
+-	$(INSTALL) -s -c pppstats $(BINDIR)
++	$(INSTALL) -c pppstats $(BINDIR)
+ 	$(INSTALL) -c -m 444 pppstats.8 $(MANDIR)
+ 
+ pppstats: $(PPPSTATSRCS)
+--- ppp-2.4.3/chat/Makefile.linux.make	2004-11-03 11:51:47.000000000 +0000
++++ ppp-2.4.3/chat/Makefile.linux.make	2004-11-22 16:07:30.251263054 +0000
+@@ -25,7 +25,7 @@
+ 
+ install: chat
+ 	mkdir -p $(BINDIR)
+-	$(INSTALL) -s -c chat $(BINDIR)
++	$(INSTALL) -c chat $(BINDIR)
+ 	$(INSTALL) -c -m 644 chat.8 $(MANDIR)
+ 
+ clean:
+--- ppp-2.4.3/chat/Makefile.linux	2004-11-22 15:51:53.254291303 +0000
++++ ppp-2.4.3/chat/Makefile.linux	2004-11-22 16:07:46.477260716 +0000
+@@ -25,7 +25,7 @@
+ 
+ install: chat
+ 	mkdir -p $(BINDIR)
+-	$(INSTALL) -s -c chat $(BINDIR)
++	$(INSTALL) -c chat $(BINDIR)
+ 	$(INSTALL) -c -m 644 chat.8 $(MANDIR)
+ 
+ clean:
+--- ppp-2.4.3/chat/Makefile.linux.pie	2004-11-22 15:51:53.125323093 +0000
++++ ppp-2.4.3/chat/Makefile.linux.pie	2004-11-22 16:08:06.491323922 +0000
+@@ -25,7 +25,7 @@
+ 
+ install: chat
+ 	mkdir -p $(BINDIR)
+-	$(INSTALL) -s -c chat $(BINDIR)
++	$(INSTALL) -c chat $(BINDIR)
+ 	$(INSTALL) -c -m 644 chat.8 $(MANDIR)
+ 
+ clean:
Index: npl/internetserver/poptop_ppp/patches/ppp-2.4.3-pkgcheck.patch
===================================================================
--- npl/internetserver/poptop_ppp/patches/ppp-2.4.3-pkgcheck.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
+++ npl/internetserver/poptop_ppp/patches/ppp-2.4.3-pkgcheck.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
@@ -0,0 +1,12 @@
+--- ppp-2.4.3/pppd/cbcp.c	2004-10-28 01:15:36.000000000 +0100
++++ ppp-2.4.3/pppd/cbcp.c	2004-11-22 16:32:59.042090959 +0000
+@@ -146,7 +146,8 @@
+ cbcp_open(unit)
+     int unit;
+ {
+-    dbglog("cbcp_open");
++    if (debug)
++        dbglog("cbcp_open");
+ }
+ 
+ /* process an incomming packet */
Index: npl/internetserver/poptop_ppp/patches/ppp-2.4.3-winbind.base64.patch
===================================================================
--- npl/internetserver/poptop_ppp/patches/ppp-2.4.3-winbind.base64.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
+++ npl/internetserver/poptop_ppp/patches/ppp-2.4.3-winbind.base64.patch	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
@@ -0,0 +1,80 @@
+--- ppp-2.4.3/pppd/plugins/winbind.c.orig	2005-05-12 14:18:10.000000000 -0700
++++ ppp-2.4.3/pppd/plugins/winbind.c	2005-05-12 14:37:59.000000000 -0700
+@@ -200,50 +200,41 @@
+ 	return num_chars;
+ }
+ 
+-static const char *b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
++static const char *codes = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+ 
+ /**
+  * Encode a base64 string into a malloc()ed string caller to free.
+- *
+- *From SQUID: adopted from http://ftp.sunet.se/pub2/gnu/vm/base64-encode.c with adjustments
+  **/
+ char * base64_encode(const char *data)
+ {
+-	int bits = 0;
+-	int char_count = 0;
+-	size_t out_cnt = 0;
+-	size_t len = strlen(data);
+-	size_t output_len = strlen(data) * 2;
+-	char *result = malloc(output_len); /* get us plenty of space */
+-
+-	while (len-- && out_cnt < (output_len) - 5) {
+-		int c = (unsigned char) *(data++);
+-		bits += c;
+-		char_count++;
+-		if (char_count == 3) {
+-			result[out_cnt++] = b64[bits >> 18];
+-			result[out_cnt++] = b64[(bits >> 12) & 0x3f];
+-			result[out_cnt++] = b64[(bits >> 6) & 0x3f];
+-	    result[out_cnt++] = b64[bits & 0x3f];
+-	    bits = 0;
+-	    char_count = 0;
+-	} else {
+-	    bits <<= 8;
+-	}
++    int i;
++    size_t len = strlen(data);
++    size_t leven = 3*(len / 3);
++    size_t output_len = 4 * ((len + 2) / 3) + 1;
++    char *p, *result = malloc(output_len); /* get us plenty of space */
++    const char *in;
++    p = result;
++    in = data;
++    for (i = 0; i < leven; i += 3)
++    {
++        *p++ = codes[(in[0] >> 2) & 0x3F];
++        *p++ = codes[(((in[0] & 3) << 4) + (in[1] >> 4)) & 0x3F];
++        *p++ = codes[(((in[1] & 0xf) << 2) + (in[2] >> 6)) & 0x3F];
++        *p++ = codes[in[2] & 0x3F];
++        in += 3;
+     }
+-    if (char_count != 0) {
+-	bits <<= 16 - (8 * char_count);
+-	result[out_cnt++] = b64[bits >> 18];
+-	result[out_cnt++] = b64[(bits >> 12) & 0x3f];
+-	if (char_count == 1) {
+-	    result[out_cnt++] = '=';
+-	    result[out_cnt++] = '=';
+-	} else {
+-	    result[out_cnt++] = b64[(bits >> 6) & 0x3f];
+-	    result[out_cnt++] = '=';
+-	}
++    /* Pad it if necessary...  */
++    if (i < len)
++    {
++        unsigned a = in[0];
++        unsigned b = (i+1 < len) ? in[1] : 0;
++        *p++ = codes[(a >> 2) & 0x3F];
++        *p++ = codes[(((a & 3) << 4) + (b >> 4)) & 0x3F];
++        *p++ = (i+1 < len) ? codes[(((b & 0xf) << 2)) & 0x3F] : '=';
++        *p++ = '=';
+     }
+-    result[out_cnt] = '\0';	/* terminate */
++    /* append a NULL byte */
++    *p = '\0';
+     return result;
+ }
+ 
