import ebuild for 2.4.3 from #72405
authorAlin Năstac <mrness@gentoo.org>
Sat, 27 Nov 2004 10:48:15 +0000 (10:48 +0000)
committerAlin Năstac <mrness@gentoo.org>
Sat, 27 Nov 2004 10:48:15 +0000 (10:48 +0000)
16 files changed:
net-dialup/ppp/ChangeLog
net-dialup/ppp/Manifest
net-dialup/ppp/files/2.4.3/chat-default [new file with mode: 0644]
net-dialup/ppp/files/2.4.3/confd.ppp0 [new file with mode: 0644]
net-dialup/ppp/files/2.4.3/ip-down [new file with mode: 0644]
net-dialup/ppp/files/2.4.3/ip-up [new file with mode: 0644]
net-dialup/ppp/files/2.4.3/killaddr-smarter.patch [new file with mode: 0644]
net-dialup/ppp/files/2.4.3/modules.ppp [new file with mode: 0644]
net-dialup/ppp/files/2.4.3/mpls.patch [new file with mode: 0644]
net-dialup/ppp/files/2.4.3/net.ppp0 [new file with mode: 0644]
net-dialup/ppp/files/2.4.3/options-pppoe [new file with mode: 0644]
net-dialup/ppp/files/2.4.3/options-pptp [new file with mode: 0644]
net-dialup/ppp/files/2.4.3/ppp_flags.patch [new file with mode: 0644]
net-dialup/ppp/files/2.4.3/pppoe.html [new file with mode: 0644]
net-dialup/ppp/files/digest-ppp-2.4.3 [new file with mode: 0644]
net-dialup/ppp/ppp-2.4.3.ebuild [new file with mode: 0644]

index e390202be72eb987224ba60a6ff768cf38ca2a02..9a9df13286ae5d7dd170bbddd52e9d21df1df5fb 100644 (file)
@@ -1,6 +1,16 @@
 # ChangeLog for net-dialup/ppp
 # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/ppp/ChangeLog,v 1.92 2004/11/17 22:14:31 mrness Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/ppp/ChangeLog,v 1.93 2004/11/27 10:48:15 mrness Exp $
+
+*ppp-2.4.3 (27 Nov 2004)
+
+  27 Nov 2004; Alin Nastac <mrness@gentoo.org> +files/2.4.3/chat-default,
+  +files/2.4.3/confd.ppp0, +files/2.4.3/ip-down, +files/2.4.3/ip-up,
+  +files/2.4.3/killaddr-smarter.patch, +files/2.4.3/modules.ppp,
+  +files/2.4.3/mpls.patch, +files/2.4.3/net.ppp0, +files/2.4.3/options-pppoe,
+  +files/2.4.3/options-pptp, +files/2.4.3/ppp_flags.patch,
+  +files/2.4.3/pppoe.html, +ppp-2.4.3.ebuild:
+  Import ebuild for 2.4.3 from #72405, thanks to tove <bugs@veller.net>.
 
   18 Nov 2004; Alin Nastac <mrness@gentoo.org> ppp-2.4.2-r10.ebuild,
   ppp-2.4.2-r9.ebuild:
index 643e32f65570fda238c1a792a34974d041db0b5f..e990485712d5d7548bbf768a4bfc649ae6cc1dad 100644 (file)
@@ -1,7 +1,7 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-MD5 446c207bccc842989fe1b8f328cbf27e ChangeLog 15402
+MD5 de2e152a0aeea3305de71c5739fe189c ChangeLog 15893
 MD5 ec2f84816306825d125d0c01bd86758d metadata.xml 163
 MD5 b109af0767940076444e51dbf3275f16 ppp-2.4.1-r14.ebuild 4698
 MD5 20502c85d128ae0dd4545dc3ae3eec6b ppp-2.4.2-r1.ebuild 4276
@@ -12,6 +12,7 @@ MD5 24f264eef320520caee8597fb071405b ppp-2.4.2.ebuild 3957
 MD5 917e389e491522c945831ca1388ddf2e ppp-2.4.2-r8.ebuild 5601
 MD5 36c90a8e811d5547f180911f2cb628a5 ppp-2.4.2-r9.ebuild 5624
 MD5 583f9c8b8ee2605c4cdf7129f5ae9cf8 ppp-2.4.2-r10.ebuild 5809
+MD5 944d68a579e90650ae2336491ce00260 ppp-2.4.3.ebuild 5750
 MD5 140bc2a08334d3546f43259934da603e files/chat-default 347
 MD5 1a60baf88a301c6eed8472a01b3691eb files/confd.ppp0 3312
 MD5 4fda43c2f3f8b5b58a58e5d238991c0b files/digest-ppp-2.4.1-r14 65
@@ -36,6 +37,7 @@ MD5 f0ad3e0c62aec1771536caf00e28b9c6 files/pppoe.html 7605
 MD5 c07c26f0d600a1fde9752fa06fc4b0c3 files/digest-ppp-2.4.2-r8 194
 MD5 c07c26f0d600a1fde9752fa06fc4b0c3 files/digest-ppp-2.4.2-r9 194
 MD5 c07c26f0d600a1fde9752fa06fc4b0c3 files/digest-ppp-2.4.2-r10 194
+MD5 01ed8667e00028ff1c6a8ac4a0d7e1dc files/digest-ppp-2.4.3 194
 MD5 1fd88dda7f4996799c69a9501d42cc23 files/2.4.2/README.mpls 530
 MD5 fe4d81182954a014493a830a24fb2f07 files/2.4.2/cbcp-dosfix.patch 3098
 MD5 bc88eaf56862e5ebf8f45ec5ada4bb90 files/2.4.2/cflags.patch 1857
@@ -56,10 +58,22 @@ MD5 971013ca1ccc5a25acffdb3ff9edff4e files/2.4.2/pppoatm.diff.gz 3567
 MD5 f0ad3e0c62aec1771536caf00e28b9c6 files/2.4.2/pppoe.html 7605
 MD5 9d798912edc0a47727afcd7aac100957 files/2.4.2/stdopt-mppe-mppc-0.82.patch.gz 10108
 MD5 844c9d343d7511902b5380b27eca417e files/2.4.2/mppe-mppc-1.0.patch.gz 11442
+MD5 93217f52392558608bbf223aa22a483d files/2.4.3/killaddr-smarter.patch 4573
+MD5 f1a623897655a8550dc09c7879b8479f files/2.4.3/ppp_flags.patch 4341
+MD5 561a149f78198208724ab4527837eb8c files/2.4.3/mpls.patch 10470
+MD5 05cb3f055d11109381811e26568a9b30 files/2.4.3/ip-down 734
+MD5 054b3958fe0cfda4ac1420846fcc7a4b files/2.4.3/ip-up 1081
+MD5 46f07887363e6b1cf7ae30e522bf4eeb files/2.4.3/net.ppp0 4414
+MD5 636e57af528015248a294a363a4ecaf8 files/2.4.3/confd.ppp0 2781
+MD5 161c955fd1a731fa7c8895e01d14d67b files/2.4.3/chat-default 348
+MD5 5d83af7b897082a0b1ecd70a2cc2a0c7 files/2.4.3/modules.ppp 268
+MD5 fa2a5b8df496922fa2fb592115953b6b files/2.4.3/options-pppoe 53
+MD5 2890b47660f967a07ac5b211850e46c5 files/2.4.3/options-pptp 238
+MD5 f0ad3e0c62aec1771536caf00e28b9c6 files/2.4.3/pppoe.html 7605
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.6 (GNU/Linux)
 
-iD8DBQFBm81Rjtv59x0+BrURAnxuAKDf9GWSjqBEo4eCHO2wycVb10rCxQCdFXFV
-0Z8LTBFylqCtYL2a1HtdKLg=
-=zDLv
+iD8DBQFBqFt6jtv59x0+BrURAjuhAJwOwkj9H4wXfwe/DHI7gv75DMg7OQCfQIO6
+mz6oOA0rZ01gAR6AwjdWRoA=
+=6WLH
 -----END PGP SIGNATURE-----
diff --git a/net-dialup/ppp/files/2.4.3/chat-default b/net-dialup/ppp/files/2.4.3/chat-default
new file mode 100644 (file)
index 0000000..8a74b98
--- /dev/null
@@ -0,0 +1,15 @@
+# /etc/ppp/chat-default:
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/ppp/files/2.4.3/chat-default,v 1.1 2004/11/27 10:48:15 mrness Exp $
+
+'ABORT' 'BUSY'
+'ABORT' 'ERROR'
+'ABORT' 'NO ANSWER'
+'ABORT' 'NO CARRIER'
+'ABORT' 'NO DIALTONE'
+'ABORT' 'Invalid Login'
+'ABORT' 'Login incorrect'
+'' 'ATZ'
+'OK' 'ATDT$NUMBER'
+'CONNECT' ''
+'TIMEOUT' '5'
+'~--' ''
diff --git a/net-dialup/ppp/files/2.4.3/confd.ppp0 b/net-dialup/ppp/files/2.4.3/confd.ppp0
new file mode 100644 (file)
index 0000000..7f2ef20
--- /dev/null
@@ -0,0 +1,49 @@
+# /etc/conf.d/net.ppp0:
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/ppp/files/2.4.3/confd.ppp0,v 1.1 2004/11/27 10:48:15 mrness Exp $
+
+# Config file for /etc/init.d/net.ppp0
+
+PEER="MyPeer"                   # Define peer (aka ISP)
+DEBUG="no"                      # Turn on debugging
+PERSIST="no"                    # Redial after being dropped
+ONDEMAND="no"                   # Only bring the interface up on demand?
+MODEMPORT="/dev/ttyS1"          # TTY device modem is connected to
+LINESPEED="115200"              # Speed pppd should try to connect at
+INITSTRING=""                   # Extra init string for the modem
+DEFROUTE="yes"                  # Must pppd set the default route?
+HARDFLOWCTL="yes"               # Use hardware flow control?
+ESCAPECHARS="yes"               # Use escape caracters ?
+PPPOPTIONS=""                   # Extra options for pppd
+USERNAME="user"                 # The PAP/CHAP username
+PASSWORD="passwd"               # Your password/secret.  Ugly I know, but i
+                                # will work on something more secure later
+                                # on.  700 permission on /etc/init.d/net.ppp0
+                                # should be enouth for now.
+NUMBER="9180000"                # The telephone number of your ISP
+                                # leave blank for leased-line operation.
+REMIP=""                        # The ip of the remote box if it should be set
+NETMASK=""                      # Netmask
+IPADDR=""                       # Our IP if we have a static one
+MRU="768"                       # Sets the MRU
+MTU="768"                       # Sets the MTU
+RETRYTIMEOUT="60"               # Retry timeout for when ONDEMAND="yes" or
+                                # PERSIST="yes"
+IDLETIMEOUT="600"               # Idle timeout for when ONDEMAND="yes"
+PEERDNS="no"                    # Should pppd set the peer dns?
+
+AUTOCFGFILES="yes"              # By default this scripts will generate
+                                # /etc/ppp/chat-isp, /etc/ppp/chap-secrets,
+                                # /etc/ppp/pap-secrets and /etc/ppp/peers/isp
+                                # automatically.  Set to "no" if you experience
+                                # problems, or need specialized scripts.  You
+                                # will have to create these files by hand then.
+
+AUTOCHATSCRIPT="yes"            # By default this script iwll generate
+                                # /etc/ppp/chat-${PEER} automatically. Set to "no"
+                                # if you experience problems, or need specialized
+                                # scripts. You will have to create these files by
+                                # hand then.
+
+
+# Directory where the templates is stored
+TEMPLATEDIR=/etc/ppp
diff --git a/net-dialup/ppp/files/2.4.3/ip-down b/net-dialup/ppp/files/2.4.3/ip-down
new file mode 100644 (file)
index 0000000..2a522fd
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# this is a script which is executed after disconnecting the ppp interface.
+# look at man pppd for details
+
+# the followings parameters are available:
+# $1 = interface-name
+# $2 = tty-device
+# $3 = speed
+# $4 = local-IP-address
+# $5 = remote-IP-address
+# $6 = ipparam
+
+if [ "$USEPEERDNS" ]; then
+
+       # taken from debian's 0000usepeerdns
+       # follow any symlink to find the real file
+       REALRESOLVCONF=$(readlink --canonicalize /etc/resolv.conf)
+
+       if [ "$REALRESOLVCONF" != "/etc/ppp/resolv.conf" ]; then
+
+               # if an old resolv.conf file exists, restore it
+               if [ -e $REALRESOLVCONF.pppd-backup ]; then
+                       mv $REALRESOLVCONF.pppd-backup $REALRESOLVCONF
+               fi
+
+       fi
+
+fi
+
+[ -f /etc/ppp/ip-down.local ] && . /etc/ppp/ip-down.local "$@"
diff --git a/net-dialup/ppp/files/2.4.3/ip-up b/net-dialup/ppp/files/2.4.3/ip-up
new file mode 100644 (file)
index 0000000..2971956
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+# this is a script which is executed after connecting the ppp interface.
+# look at man pppd for details
+
+# the followings parameters are available:
+# $1 = interface-name
+# $2 = tty-device
+# $3 = speed
+# $4 = local-IP-address
+# $5 = remote-IP-address
+# $6 = ipparam
+
+if [ "$USEPEERDNS" ]; then
+
+       # add the server supplied DNS entries to /etc/resolv.conf
+       # (taken from debian's 0000usepeerdns)
+
+       # follow any symlink to find the real file
+       REALRESOLVCONF=$(readlink --canonicalize /etc/resolv.conf)
+
+       if [ "$REALRESOLVCONF" != "/etc/ppp/resolv.conf" ]; then
+
+               # merge the new nameservers with the other options from the old configuration
+               {
+                       grep --invert-match '^nameserver[[:space:]]' $REALRESOLVCONF
+                       cat /etc/ppp/resolv.conf
+               } > $REALRESOLVCONF.tmp
+
+               # backup the old configuration and install the new one
+               cp -a $REALRESOLVCONF $REALRESOLVCONF.pppd-backup
+               mv $REALRESOLVCONF.tmp $REALRESOLVCONF
+
+               # correct permissions
+               chmod 0644 /etc/resolv.conf
+               chown root:root /etc/resolv.conf
+
+       fi
+
+fi
+
+[ -f /etc/ppp/ip-up.local ] && . /etc/ppp/ip-up.local "$@"
diff --git a/net-dialup/ppp/files/2.4.3/killaddr-smarter.patch b/net-dialup/ppp/files/2.4.3/killaddr-smarter.patch
new file mode 100644 (file)
index 0000000..a1f7269
--- /dev/null
@@ -0,0 +1,134 @@
+diff -urN ppp-2.4.1.pppoe4-orig/pppd/options.c ppp-2.4.1.pppoe4/pppd/options.c
+--- ppp-2.4.1.pppoe4-orig/pppd/options.c       2001-03-30 19:33:55.000000000 -0500
++++ ppp-2.4.1.pppoe4/pppd/options.c    2002-10-04 12:48:21.000000000 -0400
+@@ -67,6 +67,9 @@
+ char  user[MAXNAMELEN];       /* Username for PAP */
+ char  passwd[MAXSECRETLEN];   /* Password for PAP */
+ bool  persist = 0;            /* Reopen link after it goes down */
++bool  killoldaddr = 0;                /* If our IP is reassigned on
++                                  reconnect, kill active TCP
++                                   connections using the old IP. */
+ char  our_name[MAXNAMELEN];   /* Our name for authentication purposes */
+ bool  demand = 0;             /* do dial-on-demand */
+ char  *ipparam = NULL;        /* Extra parameter for ip up/down scripts */
+@@ -186,6 +189,11 @@
+     { "demand", o_bool, &demand,
+       "Dial on demand", OPT_INITONLY | 1, &persist },
+ 
++    { "killoldaddr", o_bool, &killoldaddr,
++      "Kill connections from an old source address", 1},
++    { "nokilloldaddr", o_bool,&killoldaddr,
++      "Don't kill connections from an old source address" },
++
+     { "--version", o_special_noarg, (void *)showversion,
+       "Show version number" },
+     { "--help", o_special_noarg, (void *)showhelp,
+diff -urN ppp-2.4.1.pppoe4-orig/pppd/pppd.h ppp-2.4.1.pppoe4/pppd/pppd.h
+--- ppp-2.4.1.pppoe4-orig/pppd/pppd.h  2001-04-01 15:06:17.000000000 -0400
++++ ppp-2.4.1.pppoe4/pppd/pppd.h       2002-10-04 12:46:49.000000000 -0400
+@@ -252,6 +252,9 @@
+ extern char   remote_name[MAXNAMELEN]; /* Peer's name for authentication */
+ extern bool   explicit_remote;/* remote_name specified with remotename opt */
+ extern bool   demand;         /* Do dial-on-demand */
++extern bool   killoldaddr;    /* If our IP is reassigned on
++                                  reconnect, kill active TCP
++                                   connections using the old IP. */
+ extern char   *ipparam;       /* Extra parameter for ip up/down scripts */
+ extern bool   cryptpap;       /* Others' PAP passwords are encrypted */
+ extern int    idle_time_limit;/* Shut down link if idle for this long */
+diff -urN ppp-2.4.1.pppoe4-orig/pppd/sys-linux.c ppp-2.4.1.pppoe4/pppd/sys-linux.c
+--- ppp-2.4.1.pppoe4-orig/pppd/sys-linux.c     2001-07-26 16:19:33.000000000 -0400
++++ ppp-2.4.1.pppoe4/pppd/sys-linux.c  2002-10-04 12:46:49.000000000 -0400
+@@ -114,6 +114,10 @@
+ 
+ #endif /* INET6 */
+ 
++#ifndef SIOCKILLADDR
++#define SIOCKILLADDR  0x8939
++#endif
++
+ /* We can get an EIO error on an ioctl if the modem has hung up */
+ #define ok_error(num) ((num)==EIO)
+ 
+@@ -151,6 +155,7 @@
+ static u_int32_t proxy_arp_addr;      /* Addr for proxy arp entry added */
+ static char proxy_arp_dev[16];                /* Device for proxy arp entry */
+ static u_int32_t our_old_addr;                /* for detecting address changes */
++static u_int32_t our_current_addr;
+ static int    dynaddr_set;            /* 1 if ip_dynaddr set */
+ static int    looped;                 /* 1 if using loop */
+ static int    link_mtu;               /* mtu for the link (not bundle) */
+@@ -504,6 +509,27 @@
+     return -1;
+ }
+ 
++static void do_killaddr(u_int32_t oldaddr)
++{
++    struct ifreq   ifr; 
++
++    memset(&ifr,0,sizeof ifr);
++
++    SET_SA_FAMILY (ifr.ifr_addr,    AF_INET); 
++    SET_SA_FAMILY (ifr.ifr_dstaddr, AF_INET); 
++    SET_SA_FAMILY (ifr.ifr_netmask, AF_INET); 
++    
++    SIN_ADDR(ifr.ifr_addr) = oldaddr;
++
++    strlcpy(ifr.ifr_name, ifname, sizeof (ifr.ifr_name));
++    
++    if(ioctl(sock_fd,SIOCKILLADDR,&ifr) < 0) {
++      if (!ok_error (errno))
++      error("ioctl(SIOCKILLADDR): %m(%d)", errno);
++      return;
++    }
++}
++
+ /********************************************************************
+  *
+  * tty_disestablish_ppp - Restore the serial port to normal operation.
+@@ -2290,21 +2316,29 @@
+       }
+     }
+ 
+-    /* set ip_dynaddr in demand mode if address changes */
+-    if (demand && tune_kernel && !dynaddr_set
+-      && our_old_addr && our_old_addr != our_adr) {
++    if(persist && our_old_addr && our_old_addr != our_adr) {
++
++      if(killoldaddr)
++      do_killaddr(our_old_addr);
++
++      
++      /* set ip_dynaddr in persist mode if address changes */
++      if (tune_kernel && !dynaddr_set) {
+       /* set ip_dynaddr if possible */
+       char *path;
+       int fd;
+ 
+       path = path_to_procfs("/sys/net/ipv4/ip_dynaddr");
+       if (path != 0 && (fd = open(path, O_WRONLY)) >= 0) {
+-          if (write(fd, "1", 1) != 1)
+-              error("Couldn't enable dynamic IP addressing: %m");
+-          close(fd);
++        if (write(fd, "1", 1) != 1)
++          error("Couldn't enable dynamic IP addressing: %m");
++        close(fd);
+       }
+       dynaddr_set = 1;        /* only 1 attempt */
++      }
+     }
++
++    our_current_addr = our_adr;
+     our_old_addr = 0;
+ 
+     return 1;
+@@ -2360,7 +2394,8 @@
+     }
+ 
+     our_old_addr = our_adr;
+-
++    our_current_addr = 0;
++    
+     return 1;
+ }
+ 
diff --git a/net-dialup/ppp/files/2.4.3/modules.ppp b/net-dialup/ppp/files/2.4.3/modules.ppp
new file mode 100644 (file)
index 0000000..1f5ad7f
--- /dev/null
@@ -0,0 +1,9 @@
+alias char-major-108   ppp_generic
+alias /dev/ppp         ppp_generic
+alias tty-ldisc-3      ppp_async
+alias tty-ldisc-13     n_hdlc
+alias tty-ldisc-14     ppp_synctty
+alias ppp-compress-21  bsd_comp
+alias ppp-compress-24  ppp_deflate
+alias ppp-compress-26  ppp_deflate
+alias net-pf-24                pppoe
diff --git a/net-dialup/ppp/files/2.4.3/mpls.patch b/net-dialup/ppp/files/2.4.3/mpls.patch
new file mode 100644 (file)
index 0000000..b711ce3
--- /dev/null
@@ -0,0 +1,431 @@
+diff -uarN ppp-2.4.2-orig/pppd/Makefile.linux ppp-2.4.2/pppd/Makefile.linux
+--- ppp-2.4.2-orig/pppd/Makefile.linux 2003-01-31 06:11:17.000000000 -0500
++++ ppp-2.4.2/pppd/Makefile.linux      2003-12-08 11:21:50.000000000 -0500
+@@ -12,16 +12,16 @@
+ 
+ PPPDSRCS = main.c magic.c fsm.c lcp.c ipcp.c upap.c chap-new.c md5.c ccp.c \
+          ecp.c ipxcp.c auth.c options.c sys-linux.c md4.c chap_ms.c \
+-         demand.c utils.c tty.c eap.c chap-md5.c
++         demand.c utils.c tty.c eap.c chap-md5.c mplscp.c
+ 
+ HEADERS = ccp.h chap-new.h ecp.h fsm.h ipcp.h \
+       ipxcp.h lcp.h magic.h md5.h patchlevel.h pathnames.h pppd.h \
+-      upap.h eap.h
++      upap.h eap.h mplscp.h
+ 
+ MANPAGES = pppd.8
+ PPPDOBJS = main.o magic.o fsm.o lcp.o ipcp.o upap.o chap-new.o md5.o ccp.o \
+          ecp.o auth.o options.o demand.o utils.o sys-linux.o ipxcp.o tty.o \
+-         eap.o chap-md5.o
++         eap.o chap-md5.o mplscp.o
+ 
+ #
+ # include dependencies if present
+diff -uarN ppp-2.4.2-orig/pppd/main.c ppp-2.4.2/pppd/main.c
+--- ppp-2.4.2-orig/pppd/main.c 2003-04-06 20:01:45.000000000 -0400
++++ ppp-2.4.2/pppd/main.c      2003-12-08 11:20:42.000000000 -0500
+@@ -70,6 +70,9 @@
+ #include "fsm.h"
+ #include "lcp.h"
+ #include "ipcp.h"
++
++#include "mplscp.h"
++
+ #ifdef INET6
+ #include "ipv6cp.h"
+ #endif
+@@ -246,6 +249,7 @@
+     &cbcp_protent,
+ #endif
+     &ipcp_protent,
++    &mplscp_protent,
+ #ifdef INET6
+     &ipv6cp_protent,
+ #endif
+diff -uarN ppp-2.4.2-orig/pppd/mplscp.c ppp-2.4.2/pppd/mplscp.c
+--- ppp-2.4.2-orig/pppd/mplscp.c       1969-12-31 19:00:00.000000000 -0500
++++ ppp-2.4.2/pppd/mplscp.c    2003-12-08 11:20:44.000000000 -0500
+@@ -0,0 +1,371 @@
++
++/* MPLSCP - Serge.Krier@advalvas.be (C) 2001 */
++
++#include <stdio.h>
++#include <string.h>
++#include <netdb.h>
++#include <sys/param.h>
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <netinet/in.h>
++#include <arpa/inet.h>
++
++#include "pppd.h"
++#include "fsm.h"
++#include "mplscp.h"
++
++
++/* local vars */
++/* static int mplscp_is_up; */                  /* have called np_up() */
++
++/*
++ * Callbacks for fsm code.  (CI = Configuration Information)
++ */
++static void mplscp_resetci __P((fsm *));      /* Reset our CI */
++static int  mplscp_cilen __P((fsm *));                /* Return length of our CI */
++static void mplscp_addci __P((fsm *, u_char *, int *)); /* Add our CI */
++static int  mplscp_ackci __P((fsm *, u_char *, int)); /* Peer ack'd our CI */
++static int  mplscp_nakci __P((fsm *, u_char *, int)); /* Peer nak'd our CI */
++static int  mplscp_rejci __P((fsm *, u_char *, int)); /* Peer rej'd our CI */
++static int  mplscp_reqci __P((fsm *, u_char *, int *, int)); /* Rcv CI */
++static void mplscp_up __P((fsm *));           /* We're UP */
++static void mplscp_down __P((fsm *));         /* We're DOWN */
++static void mplscp_finished __P((fsm *));     /* Don't need lower layer */
++
++fsm mplscp_fsm[NUM_PPP];              /* MPLSCP fsm structure */
++
++static fsm_callbacks mplscp_callbacks = { /* MPLSCP callback routines */
++  mplscp_resetci,             /* Reset our Configuration Information */
++  mplscp_cilen,                       /* Length of our Configuration Information */
++  mplscp_addci,                       /* Add our Configuration Information */
++  mplscp_ackci,                       /* ACK our Configuration Information */
++  mplscp_nakci,                       /* NAK our Configuration Information */
++  mplscp_rejci,                       /* Reject our Configuration Information */
++  mplscp_reqci,                       /* Request peer's Configuration Information */
++  mplscp_up,                  /* Called when fsm reaches OPENED state */
++  mplscp_down,                        /* Called when fsm leaves OPENED state */
++  NULL,                               /* Called when we want the lower layer up */
++  mplscp_finished,            /* Called when we want the lower layer down */
++  NULL,                               /* Called when Protocol-Reject received */
++  NULL,                               /* Retransmission is necessary */
++  NULL,                               /* Called to handle protocol-specific codes */
++  "MPLSCP"                    /* String name of protocol */
++};
++
++static option_t mplscp_option_list[] = {
++    { "mpls", o_bool, &mplscp_protent.enabled_flag,
++      "Enable MPLSCP (and MPLS)", 1 },
++    { NULL } };
++
++/*
++ * Protocol entry points from main code.
++ */
++
++static void mplscp_init __P((int));
++static void mplscp_open __P((int));
++static void mplscp_close __P((int, char *));
++static void mplscp_lowerup __P((int));
++static void mplscp_lowerdown __P((int));
++static void mplscp_input __P((int, u_char *, int));
++static void mplscp_protrej __P((int));
++static int  mplscp_printpkt __P((u_char *, int,
++                               void (*) __P((void *, char *, ...)), void *));
++
++struct protent mplscp_protent = {
++    PPP_MPLSCP,
++    mplscp_init,
++    mplscp_input,
++    mplscp_protrej,
++    mplscp_lowerup,
++    mplscp_lowerdown,
++    mplscp_open,
++    mplscp_close,
++    mplscp_printpkt,
++    NULL,
++    0,                            /* MPLS not enabled by default */
++    "MPLSCP",
++    "MPLS",
++    mplscp_option_list,
++    NULL,
++    NULL,
++    NULL
++};
++
++/*
++ * mplscp_init - Initialize MPLSCP.
++ */
++static void
++mplscp_init(int unit) {
++
++  fsm *f = &mplscp_fsm[unit];
++  
++  f->unit = unit;
++  f->protocol = PPP_MPLSCP;
++  f->callbacks = &mplscp_callbacks;  
++  fsm_init(&mplscp_fsm[unit]); 
++  
++}
++
++/*
++ * mplscp_open - MPLSCP is allowed to come up.
++ */
++static void
++mplscp_open(int unit) {
++  
++  fsm_open(&mplscp_fsm[unit]);
++
++}
++
++/*
++ * mplscp_close - Take MPLSCP down.
++ */
++static void
++mplscp_close(int unit, char *reason) {
++
++  fsm_close(&mplscp_fsm[unit], reason);
++
++}
++
++/*
++ * mplscp_lowerup - The lower layer is up.
++ */
++static void
++mplscp_lowerup(int unit) {
++
++  fsm_lowerup(&mplscp_fsm[unit]);
++}
++
++/*
++ * mplscp_lowerdown - The lower layer is down.
++ */
++static void
++mplscp_lowerdown(int unit) {
++  
++  fsm_lowerdown(&mplscp_fsm[unit]);
++}
++
++/*
++ * mplscp_input - Input MPLSCP packet.
++ */
++static void
++mplscp_input(int unit, u_char *p, int len) {
++
++  fsm_input(&mplscp_fsm[unit], p, len);
++}
++
++/*
++ * mplscp_protrej - A Protocol-Reject was received for MPLSCP.
++ * Pretend the lower layer went down, so we shut up.
++ */
++static void
++mplscp_protrej(int unit) {
++
++    fsm_lowerdown(&mplscp_fsm[unit]);
++}
++
++/*
++ * mplscp_resetci - Reset our CI.
++ * Called by fsm_sconfreq, Send Configure Request.
++ */
++static void
++mplscp_resetci(fsm *f) {
++
++  return;
++}
++
++/*
++ * mplscp_cilen - Return length of our CI.
++ * Called by fsm_sconfreq, Send Configure Request.
++ */
++static int
++mplscp_cilen(fsm *f) {
++
++  return 0;
++}
++
++/*
++ * mplscp_addci - Add our desired CIs to a packet.
++ * Called by fsm_sconfreq, Send Configure Request.
++ */
++static void
++mplscp_addci(fsm *f, u_char *ucp, int *lenp) {
++
++}
++
++/*
++ * ipcp_ackci - Ack our CIs.
++ * Called by fsm_rconfack, Receive Configure ACK.
++ *
++ * Returns:
++ *    0 - Ack was bad.
++ *    1 - Ack was good.
++ */
++static int
++mplscp_ackci(fsm *f, u_char *p, int  len) {
++  
++  return 1;
++
++}
++
++/*
++ * mplscp_nakci - Peer has sent a NAK for some of our CIs.
++ * This should not modify any state if the Nak is bad
++ * or if MPLSCP is in the OPENED state.
++ * Calback from fsm_rconfnakrej - Receive Configure-Nak or Configure-Reject.
++ *
++ * Returns:
++ *    0 - Nak was bad.
++ *    1 - Nak was good.
++ */
++static int
++mplscp_nakci(fsm *f, u_char *p, int len) {
++
++  return 1;
++}
++
++/*
++ * MPLSVP_rejci - Reject some of our CIs.
++ * Callback from fsm_rconfnakrej.
++ */
++static int
++mplscp_rejci(fsm *f, u_char *p, int len) {
++
++  return 1;
++
++}
++
++/*
++ * mplscp_reqci - Check the peer's requested CIs and send appropriate response.
++ * Callback from fsm_rconfreq, Receive Configure Request
++ *
++ * Returns: CONFACK, CONFNAK or CONFREJ and input packet modified
++ * appropriately.  If reject_if_disagree is non-zero, doesn't return
++ * CONFNAK; returns CONFREJ if it can't return CONFACK.
++ */
++static int
++mplscp_reqci(fsm *f, u_char *inp, int *len, int reject_if_disagree) {
++  
++  
++  int rc = CONFACK;           /* Final packet return code */
++   
++  PUTCHAR(CONFACK,inp);
++
++  return rc;
++
++}
++
++static void
++mplscp_up(fsm *f) {
++
++  sifnpmode(f->unit, PPP_MPLS_UC, NPMODE_PASS);
++  /*  sifnpmode(f->unit, PPP_MPLS_MC, NPMODE_PASS);*/
++  
++  np_up(f->unit, PPP_MPLS_UC);
++  /*  np_up(f->unit, PPP_MPLS_MC);*/
++  /*  ipcp_is_up = 1;*/
++
++  
++#if 1
++  printf("MPLSCP is OPENED\n");
++#endif
++
++}
++
++static void
++mplscp_down(fsm *f) {
++  
++  sifnpmode(f->unit, PPP_MPLS_UC, NPMODE_DROP);
++  /*  sifnpmode(f->unit, PPP_MPLS_MC, NPMODE_DROP);*/
++
++  sifdown(f->unit); 
++  
++#if 1
++  printf("MPLSCP is CLOSED\n");
++#endif
++  
++
++}
++
++static void 
++mplscp_finished(fsm *f) {
++  
++  np_finished(f->unit, PPP_MPLS_UC);
++  /*  np_finished(f->unit, PPP_MPLS_MC);*/
++
++}
++
++/*
++ * mpls_printpkt - print the contents of an MPLSCP packet.
++ */
++static char *mplscp_codenames[] = {
++    "ConfReq", "ConfAck", "ConfNak", "ConfRej",
++    "TermReq", "TermAck", "CodeRej"
++};
++
++static int
++mplscp_printpkt(u_char *p, int plen, 
++              void (*printer) __P((void *, char *, ...)),
++              void *arg) {
++ 
++    int code, id, len, olen;
++    u_char *pstart, *optend;
++
++    if (plen < HEADERLEN)
++      return 0;
++    pstart = p;
++    GETCHAR(code, p);
++    GETCHAR(id, p);
++    GETSHORT(len, p);
++    if (len < HEADERLEN || len > plen)
++      return 0;
++
++    if (code >= 1 && code <= sizeof(mplscp_codenames) / sizeof(char *))
++      printer(arg, " %s", mplscp_codenames[code-1]);
++    else
++      printer(arg, " code=0x%x", code);
++    printer(arg, " id=0x%x", id);
++    len -= HEADERLEN;
++    switch (code) {
++    case CONFREQ:
++    case CONFACK:
++    case CONFNAK:
++    case CONFREJ:
++      /* print option list */
++      while (len >= 2) {
++          GETCHAR(code, p);
++          GETCHAR(olen, p);
++          p -= 2;
++          if (olen < 2 || olen > len) {
++              break;
++          }
++          printer(arg, " <");
++          len -= olen;
++          optend = p + olen;
++          while (p < optend) {
++              GETCHAR(code, p);
++              printer(arg, " %.2x", code);
++          }
++          printer(arg, ">");
++      }
++      break;
++
++    case TERMACK:
++    case TERMREQ:
++      if (len > 0 && *p >= ' ' && *p < 0x7f) {
++          printer(arg, " ");
++          print_string((char *)p, len, printer, arg);
++          p += len;
++          len = 0;
++      }
++      break;
++    }
++
++    /* print the rest of the bytes in the packet */
++    for (; len > 0; --len) {
++      GETCHAR(code, p);
++      printer(arg, " %.2x", code);
++    }
++
++    return p - pstart;
++
++}
+diff -uarN ppp-2.4.2-orig/pppd/mplscp.h ppp-2.4.2/pppd/mplscp.h
+--- ppp-2.4.2-orig/pppd/mplscp.h       1969-12-31 19:00:00.000000000 -0500
++++ ppp-2.4.2/pppd/mplscp.h    2003-12-08 11:20:44.000000000 -0500
+@@ -0,0 +1,8 @@
++
++/* MPLSCP - Serge.Krier@advalvas.be (C) 2001 */
++
++#define PPP_MPLSCP  0x8281
++#define PPP_MPLS_UC 0x0281
++#define PPP_MPLS_MC 0x0283
++
++extern struct protent mplscp_protent;
diff --git a/net-dialup/ppp/files/2.4.3/net.ppp0 b/net-dialup/ppp/files/2.4.3/net.ppp0
new file mode 100644 (file)
index 0000000..7f33e0f
--- /dev/null
@@ -0,0 +1,221 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/ppp/files/2.4.3/net.ppp0,v 1.1 2004/11/27 10:48:15 mrness Exp $
+
+# Misc internal variables
+CMD_LINE=""
+FUNCT="$2"
+TEMPLATEDIR="/etc/ppp"
+
+checkconfig() {
+
+       if [ -e "/var/run/ppp-${IFACE}.pid" -o -e "/var/run/${IFACE}.pid" ] && \
+          [ "${FUNCT}" = "start" ]
+       then
+               eerror "${IFACE} is already up"
+               return 1
+       fi
+}
+
+start() {
+
+       checkconfig || return 1
+
+       setup_modules
+       setup_cmd_line
+       setup_cfg_files
+
+       ebegin "Bringing ${IFACE} up"
+       if [ -x "$(which pppd)" ]
+       then
+
+               if [ "${DEFROUTE}" = "yes" ]
+               then
+                       [ -n "$(/sbin/route -n | egrep '0.0.0.0')" ] && route del default
+               fi
+               # Added hide-password here, can't be too sure...
+               /usr/sbin/pppd ${CMD_LINE} ${MODEMPORT} ${LINESPEED} \
+                       ipparam ${IFACE} linkname ${IFACE} call ${PEER} \
+                       noauth ${PPPOPTIONS} hide-password
+       fi
+       eend
+}
+
+stop() {
+
+       checkconfig || return 1
+
+       ebegin "Bringing ${IFACE} down"
+       if [ -x "$(which ifconfig)" ]
+       then
+
+               # Obtain interface name from pid file (IFACE is actually linkname)
+               if [ -e /var/run/ppp-${IFACE}.pid ]
+               then
+                       IFNAME=$(egrep "ppp" /var/run/ppp-${IFACE}.pid)
+               fi
+               if [ -z "${IFNAME}" ]
+               then
+                       IFNAME=${IFACE}
+               fi
+
+               if [ -z "$(/sbin/ifconfig | egrep "${IFNAME}")" ]
+               then
+                       # Link is not up but pppd may be running
+                       ewarn "Interface seems to be down already"
+               fi
+               
+               if [ -e /var/run/ppp-${IFACE}.pid ]
+               then
+                       PID=$(egrep -v "${IFNAME}" /var/run/ppp-${IFACE}.pid)
+               elif [ -e /var/run/${IFACE}.pid ]
+               then
+                       PID=$(egrep -v "${IFNAME}" /var/run/${IFACE}.pid)
+               fi
+
+               if [ -n "${PID}" ]
+               then
+                       kill ${PID}
+                       sleep 1
+
+                       # Try to kill pppd repeatedly (sometimes, (e.g. if connection
+                       # is not established) pppd ignores SIGTERM for a while)
+                       PID_TMP=`pstree -p ${PID}`
+                       PID_TMP=`echo ${PID_TMP} | sed -e 's:^.*pppd(\|).*::g'`
+                       COUNT=0
+                       while [ -n "${PID_TMP}" ] && [ ${COUNT} -lt 10 ]
+                       do
+                               kill ${PID}
+                               sleep 1
+                               PID_TMP=`pstree -p ${PID}`
+                               PID_TMP=`echo ${PID_TMP} | sed -e 's:^.*pppd(\|).*::g'`
+                               let COUNT++
+                       done
+               fi
+
+               if [ -n "${PID_TMP}" ]
+               then
+                       eend 1 "Error stopping pppd"
+               fi
+
+       fi
+       eend
+}
+
+setup_cmd_line() {
+
+       CMD_LINE="lock"
+       
+       if [ "${DEBUG}" = "yes" ]
+       then
+               CMD_LINE="${CMD_LINE} debug"
+       fi
+
+       if [ "${PERSIST}" = "yes" ]
+       then
+               CMD_LINE="${CMD_LINE} persist holdoff ${RETRYTIMEOUT}"
+       fi
+
+       if [ "${DEFROUTE}" = "yes" ]
+       then
+               CMD_LINE="${CMD_LINE} defaultroute"
+       fi
+
+       if [ "${HARDFLOWCTL}" = "yes" ]
+       then
+               CMD_LINE="${CMD_LINE} modem crtscts"
+       fi
+
+       if [ "${ESCAPECHARS}" = "yes" ]
+       then
+               CMD_LINE="${CMD_LINE} asyncmap 00000000"
+       fi
+
+       if [ "${PEERDNS}" = "yes" ]
+       then
+               CMD_LINE="${CMD_LINE} usepeerdns"
+       fi
+
+       if [ -n "${IPADDR}${REMIP}" ]
+       then
+               CMD_LINE="${CMD_LINE} ${IPADDR}:${REMIP}"
+       fi
+
+       if [ -n "${NETMASK}" ]
+       then
+               CMD_LINE="${CMD_LINE} netmask ${NETMASK}"
+       fi
+
+       if [ -n "${MRU}" ]
+       then
+               CMD_LINE="${CMD_LINE} mru ${MRU}"
+       fi
+       
+       if [ -n "${MTU}" ]
+       then
+               CMD_LINE="${CMD_LINE} mtu ${MTU}"
+       fi
+           
+       if [ -n "${USERNAME}" ]
+       then
+               CMD_LINE="${CMD_LINE} user ${USERNAME} remotename ${PEER}"
+       fi
+
+       if [ "${ONDEMAND}" = "yes" ]
+       then
+               CMD_LINE="${CMD_LINE} demand ktune idle ${IDLETIMEOUT}"
+               CMD_LINE="${CMD_LINE} holdoff ${RETRYTIMEOUT}"
+       fi
+}
+
+setup_cfg_files() {
+
+       if [ "${AUTOCFGFILES}" = "yes" ]
+       then
+               if [ -n "${NUMBER}" ]
+               then
+                       # Setup the peers file
+                       echo "connect '/usr/sbin/chat -f /etc/ppp/chat-${PEER}'" \
+                               >/etc/ppp/peers/${PEER}
+               fi
+
+               # Setup the secrets files
+               echo "\"${USERNAME}\" * \"${PASSWORD}\"" >/etc/ppp/chap-secrets
+               chmod 600 /etc/ppp/chap-secrets
+               echo "\"${USERNAME}\" ${PEER} \"${PASSWORD}\"" >/etc/ppp/pap-secrets
+               chmod 600 /etc/ppp/pap-secrets
+
+               # Setup the chat file
+               if [ "${AUTOCHATSCRIPT}" = "yes" ]
+               then
+                       if [ -n "${INITSTRING}" ]
+                       then
+                               if [ -n "${NUMBER}" ]; then
+                                       sed -e "12i\\'OK\' \'${INITSTRING}\'" \
+                                               -e "s:\$NUMBER:${NUMBER}:" \
+                                               ${TEMPLATEDIR}/chat-default \
+                                               >/etc/ppp/chat-${PEER}
+                               else
+                                       sed -e "12i\\'OK\' \'${INITSTRING}\'" \
+                                               ${TEMPLATEDIR}/chat-default \
+                                               >/etc/ppp/chat-${PEER}
+                               fi
+                       else
+                               if [ -n "${NUMBER}" ]; then
+                                       sed -e "s:\$NUMBER:${NUMBER}:" \
+                                               ${TEMPLATEDIR}/chat-default \
+                                               >/etc/ppp/chat-${PEER}
+                               fi
+                       fi
+               fi
+       fi
+}
+
+setup_modules() {
+       if [ ! -c /dev/ppp ]; then
+               modprobe /dev/ppp
+       fi
+}
+
+# vim:ts=4
diff --git a/net-dialup/ppp/files/2.4.3/options-pppoe b/net-dialup/ppp/files/2.4.3/options-pppoe
new file mode 100644 (file)
index 0000000..5988ee2
--- /dev/null
@@ -0,0 +1,6 @@
+noipdefault
+hide-password
+defaultroute
+persist
+lock
+
diff --git a/net-dialup/ppp/files/2.4.3/options-pptp b/net-dialup/ppp/files/2.4.3/options-pptp
new file mode 100644 (file)
index 0000000..af5749a
--- /dev/null
@@ -0,0 +1,18 @@
+#192.168.1.0:
+netmask 255.255.255.0
+#debug
+#kdebug 1
+lock
+mtu 1490
+mru 1490
+proxyarp
+auth
+require-chap
+passive
+ipcp-accept-local
+ipcp-accept-remote
+lcp-echo-failure 3
+lcp-echo-interval 5
+deflate 0
+#ms-dns 192.168.1.1
+#ms-wins 192.168.1.1
diff --git a/net-dialup/ppp/files/2.4.3/ppp_flags.patch b/net-dialup/ppp/files/2.4.3/ppp_flags.patch
new file mode 100644 (file)
index 0000000..bd41e2d
--- /dev/null
@@ -0,0 +1,123 @@
+diff -Nuar ppp-2.4.3_old/chat/Makefile.linux ppp-2.4.3/chat/Makefile.linux
+--- ppp-2.4.3_old/chat/Makefile.linux  2004-11-03 12:51:47.000000000 +0100
++++ ppp-2.4.3/chat/Makefile.linux      2004-11-24 00:01:06.606425768 +0100
+@@ -10,7 +10,6 @@
+ CDEF4=        -DFNDELAY=O_NDELAY              # Old name value
+ CDEFS=        $(CDEF1) $(CDEF2) $(CDEF3) $(CDEF4)
+ 
+-COPTS=        -O2 -g -pipe
+ CFLAGS=       $(COPTS) $(CDEFS)
+ 
+ INSTALL= install
+diff -Nuar ppp-2.4.3_old/pppd/Makefile.linux ppp-2.4.3/pppd/Makefile.linux
+--- ppp-2.4.3_old/pppd/Makefile.linux  2004-11-24 00:00:00.255512640 +0100
++++ ppp-2.4.3/pppd/Makefile.linux      2004-11-24 00:01:07.017363296 +0100
+@@ -32,7 +32,7 @@
+ 
+ # CC = gcc
+ #
+-COPTS = -O2 -pipe -Wall -g
++COPTS+= -Wall
+ LIBS =
+ 
+ # Uncomment the next 2 lines to include support for Microsoft's
+diff -Nuar ppp-2.4.3_old/pppd/plugins/Makefile.linux ppp-2.4.3/pppd/plugins/Makefile.linux
+--- ppp-2.4.3_old/pppd/plugins/Makefile.linux  2004-11-14 08:57:35.000000000 +0100
++++ ppp-2.4.3/pppd/plugins/Makefile.linux      2004-11-24 00:01:06.618423944 +0100
+@@ -1,5 +1,4 @@
+ CC    = gcc
+-COPTS = -O2 -g
+ CFLAGS        = $(COPTS) -I.. -I../../include -fPIC
+ LDFLAGS       = -shared
+ INSTALL       = install
+diff -Nuar ppp-2.4.3_old/pppd/plugins/pppoatm/Makefile.linux ppp-2.4.3/pppd/plugins/pppoatm/Makefile.linux
+--- ppp-2.4.3_old/pppd/plugins/pppoatm/Makefile.linux  2004-11-14 02:12:10.000000000 +0100
++++ ppp-2.4.3/pppd/plugins/pppoatm/Makefile.linux      2004-11-24 00:01:06.961371808 +0100
+@@ -1,5 +1,4 @@
+ CC    = gcc
+-COPTS = -O2 -g
+ CFLAGS        = $(COPTS) -I../.. -I../../../include -fPIC
+ LDFLAGS       = -shared
+ INSTALL       = install
+@@ -33,7 +32,7 @@
+ all: $(PLUGIN)
+ 
+ $(PLUGIN): $(PLUGIN_OBJS)
+-      $(CC) $(CFLAGS) -o $@ -shared $^ $(LIBS)
++      $(CC) $(LDFLAGS) $(CFLAGS) -o $@ -shared $^ $(LIBS)
+ 
+ install: all
+       $(INSTALL) -d -m 755 $(LIBDIR)
+diff -Nuar ppp-2.4.3_old/pppd/plugins/radius/Makefile.linux ppp-2.4.3/pppd/plugins/radius/Makefile.linux
+--- ppp-2.4.3_old/pppd/plugins/radius/Makefile.linux   2004-11-14 08:02:31.000000000 +0100
++++ ppp-2.4.3/pppd/plugins/radius/Makefile.linux       2004-11-24 00:01:06.623423184 +0100
+@@ -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=$(COPTS) -I. -I../.. -I../../../include -fPIC -DRC_LOG_FACILITY=LOG_DAEMON
+ 
+ # Uncomment the next line to include support for Microsoft's
+ # MS-CHAP authentication protocol.
+diff -Nuar ppp-2.4.3_old/pppd/plugins/rp-pppoe/Makefile.linux ppp-2.4.3/pppd/plugins/rp-pppoe/Makefile.linux
+--- ppp-2.4.3_old/pppd/plugins/rp-pppoe/Makefile.linux 2004-11-14 08:58:37.000000000 +0100
++++ ppp-2.4.3/pppd/plugins/rp-pppoe/Makefile.linux     2004-11-24 00:01:06.963371504 +0100
+@@ -24,7 +24,6 @@
+ # Version is set ONLY IN THE MAKEFILE!  Don't delete this!
+ VERSION=3.3
+ 
+-COPTS=-O2 -g
+ CFLAGS=$(COPTS) -I../../../include/linux
+ all: rp-pppoe.so pppoe-discovery
+ 
+@@ -35,7 +34,7 @@
+       $(CC) $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o pppoe-discovery.o pppoe-discovery.c
+ 
+ rp-pppoe.so: libplugin.a plugin.o
+-      $(CC) -o rp-pppoe.so -shared plugin.o libplugin.a
++      $(CC) $(LDFLAGS) -o rp-pppoe.so -shared plugin.o libplugin.a
+ 
+ install: all
+       $(INSTALL) -d -m 755 $(LIBDIR)
+diff -Nuar ppp-2.4.3_old/pppdump/Makefile.linux ppp-2.4.3/pppdump/Makefile.linux
+--- ppp-2.4.3_old/pppdump/Makefile.linux       2004-10-31 02:36:52.000000000 +0200
++++ ppp-2.4.3/pppdump/Makefile.linux   2004-11-24 00:05:01.100777208 +0100
+@@ -2,7 +2,7 @@
+ BINDIR = $(DESTDIR)/sbin
+ MANDIR = $(DESTDIR)/share/man/man8
+ 
+-CFLAGS= -O -I../include/net
++CFLAGS=$(COPTS) -I../include/net
+ OBJS = pppdump.o bsd-comp.o deflate.o zlib.o
+ 
+ INSTALL= install
+@@ -10,7 +10,7 @@
+ all:  pppdump
+ 
+ pppdump: $(OBJS)
+-      $(CC) -o pppdump $(OBJS)
++      $(CC) $(LDFLAGS) -o pppdump $(OBJS)
+ 
+ clean:
+       rm -f pppdump $(OBJS) *~
+diff -Nuar ppp-2.4.3_old/pppstats/Makefile.linux ppp-2.4.3/pppstats/Makefile.linux
+--- ppp-2.4.3_old/pppstats/Makefile.linux      2004-10-31 23:09:03.000000000 +0100
++++ ppp-2.4.3/pppstats/Makefile.linux  2004-11-24 00:04:01.848784880 +0100
+@@ -10,7 +10,6 @@
+ PPPSTATOBJS = pppstats.o
+ 
+ #CC = gcc
+-COPTS = -O
+ COMPILE_FLAGS = -I../include
+ LIBS =
+ 
+@@ -26,7 +25,7 @@
+       $(INSTALL) -c -m 444 pppstats.8 $(MANDIR)
+ 
+ pppstats: $(PPPSTATSRCS)
+-      $(CC) $(CFLAGS) -o pppstats pppstats.c $(LIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o pppstats pppstats.c $(LIBS)
+ 
+ clean:
+       rm -f pppstats *~ #* core
diff --git a/net-dialup/ppp/files/2.4.3/pppoe.html b/net-dialup/ppp/files/2.4.3/pppoe.html
new file mode 100644 (file)
index 0000000..512dc78
--- /dev/null
@@ -0,0 +1,174 @@
+<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+            
+  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+            
+  <meta name="GENERATOR" content="Mozilla/4.75 [en] (X11; U; Linux 2.2.16-22 i686) [Netscape]">
+  <title>Index of /~mostrows</title>
+</head>
+ <body text="#000000" bgcolor="#ffffff" link="#0000ef" vlink="#51188e" alink="#ff0000">
+   <b><font face="Arial,Helvetica"><font size="+4">PPPoE for Linux 2.4</font></font></b>
+     
+<p><font size="+0">This is a driver for PPPoE for Linux 2.4.</font> </p>
+   
+<p><font size="+0">This driver is for 2.4 kernels only.&nbsp; For a driver 
+ for 2.2 kernels, the <a href="http://www.roaringpenguin.com">Roaring Penguin</a><br>
+  package is recommended.<br>
+  </font></p>
+   
+<p>The software on this page is currently required if you wish to use kernel-mode<br>
+  PPPoE with Roaring Penguin (see the Roaring Penguin documentation for details),<br>
+  though this functionality is currently recommended for experts only.<br>
+  </p>
+   
+<p><font size="+0">Files:</font> </p>
+   
+<p><font size="+0"> &nbsp; &nbsp; &nbsp; &nbsp; <a href="ppp-2.4.1-pppoe.patch4">
+  ppp-2.4.1-pppoe.patch4</a> &nbsp; Patch for ppp-2.4.1</font><br>
+  <font size="+0"> &nbsp; &nbsp; &nbsp; &nbsp; <a href="ppp-2.4.1-pppoe4.tgz">
+  ppp-2.4.1-pppoe4.tgz</a> &nbsp; &nbsp; &nbsp; Source of ppp-2.4.1 with patches  applied.
+</font> <br>
+  <font size="+0"> &nbsp; &nbsp; &nbsp; &nbsp; <a href="ppp-cvs.pppoe1.tgz">
+  ppp-cvs.pppoe1.tgz</a> &nbsp; &nbsp; &nbsp; Source of ppp CVS repository with patches  applied.
+</font> <br>
+  &nbsp; </p>
+   
+<p><b><font size="+0">Installation &amp; Usage:</font></b> </p>
+   
+<p><font size="+0">1.&nbsp; Configure, compile and install a 2.4 kernel.</font>
+   <br>
+  <font size="+0"><br>
+ &nbsp;&nbsp;&nbsp;&nbsp; Make sure to enable PPP over Ethernet in the kernel 
+configuration, as</font> <br>
+  <font size="+0">&nbsp;&nbsp;&nbsp;&nbsp; well as as the "Packet Socket" 
+option.&nbsp; You must also enable support</font> <br>
+  <font size="+0">&nbsp;&nbsp;&nbsp;&nbsp; for experimental drivers.</font></p>
+ 
+<p><font size="+0">&nbsp;&nbsp;&nbsp; &nbsp;If you are compiling as a module, 
+add the line "alias net-pf-24 pppoe" to<br>
+ &nbsp;&nbsp;&nbsp; &nbsp; /etc/modules.conf.</font></p>
+ 
+<p><font size="+0">&nbsp; &nbsp; &nbsp; Make sure that the /dev/ppp device 
+exists: &nbsp;"mknod /dev/ppp c 108 0"<br>
+ </font>  </p>
+   
+<p><font size="+0">2.&nbsp; Configure, compile and install the modified pppd 
+package.</font> <br>
+  <font size="+0">&nbsp;&nbsp;&nbsp;&nbsp; Links to the patch, or the complete 
+ patched source are available above.</font> </p>
+   
+<p><font size="+0">3.&nbsp; Include the following line in your ppp options 
+ file:</font> </p>
+   
+<p><font size="+0">&nbsp;&nbsp;&nbsp; plugin pppoe</font> </p>
+   
+<p><font size="+0">&nbsp;&nbsp;&nbsp; If you experience problems, try replacing 
+ the "pppoe" with the</font> <br>
+  <font size="+0">&nbsp;&nbsp;&nbsp; full path and file name of the "pppoe.so" 
+ file that is installed</font> <br>
+  <font size="+0">&nbsp;&nbsp;&nbsp; by the pppd installation.</font> </p>
+   
+<p><font size="+0">&nbsp;&nbsp;&nbsp; Following these two lines should be 
+ your other ppp options.&nbsp; My</font> <br>
+  <font size="+0">&nbsp;&nbsp;&nbsp; options file includes only one other 
+line; a "name" statement for</font> <br>
+  <font size="+0">&nbsp;&nbsp;&nbsp; PAP.</font> </p>
+   
+<p><font size="+0">4.&nbsp; Invoke pppd (e.g.: "pppd eth0").&nbsp; Before 
+ doing this, make sure the ethernet</font> <br>
+  <font size="+0">&nbsp;&nbsp;&nbsp;&nbsp; device is up ("ifconfig eth0 up"
+ has been executed).</font> <br>
+  <font size="+0"></font>&nbsp; <br>
+  &nbsp; </p>
+   
+<p><b><font size="+0">Other Stuff:</font></b> </p>
+   
+<p><font size="+0">1.&nbsp; You can restrict pppd to connect to specific access-concentrators</font>
+  <br>
+  <font size="+0">&nbsp;&nbsp;&nbsp; or specific services by addin "pppoe_ac_name" 
+ and "pppoe_srv_name"</font> <br>
+  <font size="+0">&nbsp;&nbsp;&nbsp; options (respectively) to your options 
+ file.&nbsp; Each of these options is</font> <br>
+  <font size="+0">&nbsp;&nbsp;&nbsp; followed by a string specifying the
+conecntrator  or service name that</font> <br>
+  <font size="+0">&nbsp;&nbsp;&nbsp; is to be matched. Most people should 
+not need this.</font> <br>
+  &nbsp; </p>
+   
+<p><font size="+0">2.&nbsp; Here's how I've configured things to get a server 
+ working:</font> </p>
+   
+<p><font size="+0">&nbsp;&nbsp;&nbsp; client's /etc/ppp/options:</font> </p>
+   
+<p><font size="+0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; plugin /usr/lib/pppd/plugins/pppoe.so</font>
+   <br>
+  <font size="+0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name papname</font>
+   </p>
+   
+<p><font size="+0">&nbsp;&nbsp;&nbsp; client's /etc/ppp/pap-secrets:</font>
+   </p>
+   
+<p><font size="+0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; papname * papsecret</font>
+   </p>
+   
+<p><font size="+0">&nbsp;&nbsp;&nbsp; server's /etc/ppp/options:</font> </p>
+   
+<p><font size="+0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; plugin /usr/lib/pppd/plugins/pppoe.so</font>
+   <br>
+  <font size="+0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pppoe_server</font>
+   <br>
+  <font size="+0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +pap</font>
+<br>
+  <font size="+0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10.10.10.1:</font>
+   </p>
+   
+<p><font size="+0">&nbsp;&nbsp;&nbsp; server's /etc/ppp/pap-secrets:</font>
+   </p>
+   
+<p><font size="+0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; papname * papsecret 
+ 10.10.10.0/24+ !10.10.10.1</font> <br>
+  &nbsp; </p>
+   
+<p><font size="+0">&nbsp;&nbsp;&nbsp; On both the client and the server, pppd
+is invoked as "pppd eth0".</font> <br>
+  <font size="+0">&nbsp;&nbsp;&nbsp; With this setup you will have to invoke 
+ a new pppd on the server for</font> <br>
+  <font size="+0">&nbsp;&nbsp;&nbsp; each session.</font> </p>
+   
+<p><font size="+0">&nbsp;&nbsp;&nbsp; The patched pppd also builds a new pppoed
+which can be used to create</font> <br>
+  <font size="+0">&nbsp;&nbsp;&nbsp; a PPPoE server capable of serving multiple
+ clients.&nbsp; To use this ,</font> <br>
+  <font size="+0">&nbsp;&nbsp;&nbsp; remove the "pppoe_server" line from
+the  server's /etc/ppp/options</font> <br>
+  <font size="+0">&nbsp;&nbsp;&nbsp; file.&nbsp; Invoke pppoed as: "pppoed 
+-S -I eth0 -A ac_name -S srv_name".</font> <br>
+  <font size="+0">&nbsp;&nbsp;&nbsp; pppoed will now create a new pppd process
+ for each incoming connection.</font> <br>
+  <font size="+0">&nbsp;&nbsp;&nbsp; Note: this is still rather flaky, use
+ with caution&nbsp; If pppoed seems to jam,</font> <br>
+  <font size="+0">&nbsp;&nbsp;&nbsp; restarting it will not affect existing 
+ connections.</font> <br>
+  &nbsp; </p>
+   
+<p>3.&nbsp; If you're trying to run masquerading over your PPPoE link, check
+ out&nbsp; <a href="http://www.hgfelger.de/mss/mss.html">this</a> <br>
+  &nbsp;&nbsp;&nbsp;&nbsp; page for instructions on how to ensure that path
+ MTU's are properly <br>
+  &nbsp;&nbsp;&nbsp;&nbsp; reported across your network.&nbsp;&nbsp; Without
+ this your masquerading will <br>
+  &nbsp;&nbsp;&nbsp;&nbsp; not work. </p>
+   
+<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <a href="http://www.hgfelger.de/mss/mss.html">
+  http://www.hgfelger.de/mss/mss.html</a> <br>
+  &nbsp; </p>
+   
+<p><font size="+0">Michal Ostrowski</font> <br>
+  <font size="+0"><a href="mailto:mostrows@styx.uwaterloo.ca">mostrows@styx.uwaterloo.ca</a></font>
+   <br>
+  &nbsp; <br>
+  &nbsp; </p>
+   
+</body>
+</html>
diff --git a/net-dialup/ppp/files/digest-ppp-2.4.3 b/net-dialup/ppp/files/digest-ppp-2.4.3
new file mode 100644 (file)
index 0000000..9382fda
--- /dev/null
@@ -0,0 +1,3 @@
+MD5 848f6c3cafeb6074ffeb293c3af79b7c ppp-2.4.3.tar.gz 688092
+MD5 8453a29338cb96dd0c0dda35d3e872a4 ppp-2.4.3-mppe-mppc-1.1.patch.gz 11441
+MD5 9d2f3febf510c5b0cbb4dacba713a217 ppp-dhcpc.tgz 33497
diff --git a/net-dialup/ppp/ppp-2.4.3.ebuild b/net-dialup/ppp/ppp-2.4.3.ebuild
new file mode 100644 (file)
index 0000000..9286b7d
--- /dev/null
@@ -0,0 +1,204 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/ppp/ppp-2.4.3.ebuild,v 1.1 2004/11/27 10:48:15 mrness Exp $
+
+inherit eutils gnuconfig flag-o-matic
+
+IUSE="gtk ipv6 activefilter pam atm mppe-mppc dhcp"
+
+DESCRIPTION="Point-to-point protocol"
+HOMEPAGE="http://www.samba.org/ppp"
+SRC_URI="ftp://ftp.samba.org/pub/ppp/${P}.tar.gz
+       http://www.polbox.com/h/hs001/ppp-2.4.3-mppe-mppc-1.1.patch.gz
+       http://www.netservers.co.uk/gpl/ppp-dhcpc.tgz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~sparc ~x86"
+
+RDEPEND="virtual/libc
+       activefilter? ( >=net-libs/libpcap-0.8.3-r1 )
+       atm? ( net-dialup/linux-atm )
+       pam? ( sys-libs/pam )
+       gtk? ( =x11-libs/gtk+-1* )"
+DEPEND="${RDEPEND}
+       >=sys-apps/sed-4"
+
+src_unpack() {
+       unpack ${A}
+       cd ${S}
+
+       epatch ${FILESDIR}/${PV}/ppp_flags.patch || die "patch failed"
+       epatch ${FILESDIR}/${PV}/mpls.patch || die "patch failed"
+       epatch ${FILESDIR}/${PV}/killaddr-smarter.patch || die "patch failed"
+
+       sed -i "s:pcap-bpf\.h:net/bpf.h:" pppd/sys-linux.c pppd/demand.c pppd/Makefile.linux
+
+       useq mppe-mppc && {
+               einfo "Enabling mppe-mppc support"
+               epatch ${DISTDIR}/ppp-2.4.3-mppe-mppc-1.1.patch.gz || die "patch failed"
+       }
+
+       useq atm && {
+               einfo "Enabling PPPoATM support"
+               sed -i "s/^#HAVE_LIBATM=yes/HAVE_LIBATM=yes/" ${S}/pppd/plugins/pppoatm/Makefile.linux
+       }
+
+       useq activefilter || {
+               einfo "Disabling active filter"
+               sed -i "s/^FILTER=y/#FILTER=y/" pppd/Makefile.linux
+       }
+
+       useq pam && {
+               einfo "Enabling PAM"
+               sed -i "s/^#USE_PAM=y/USE_PAM=y/" pppd/Makefile.linux
+       }
+
+       useq ipv6 && {
+               einfo "Enabling IPv6"
+               sed -i "s/#HAVE_INET6/HAVE_INET6/" pppd/Makefile.linux
+       }
+
+       einfo "Enabling CBCP"
+       sed -i "s/^#CBCP=y/CBCP=y/" ${S}/pppd/Makefile.linux
+
+       useq dhcp && {
+               # copy the ppp-dhcp plugin files
+               einfo "Copying ppp-dhcp plugin files..."
+               tar -xzf ${DISTDIR}/ppp-dhcpc.tgz -C ${S}/pppd/plugins/
+               sed -i 's/SUBDIRS := rp-pppoe/SUBDIRS := rp-pppoe dhcp/' ${S}/pppd/plugins/Makefile.linux
+               sed -i "s/-O2/${CFLAGS} -fPIC/" ${S}/pppd/plugins/dhcp/Makefile.linux
+       }
+}
+
+src_compile() {
+       #export WANT_AUTOCONF=2.1
+       #gnuconfig_update
+       # compile radius better than their makefile does
+       append-ldflags -Wl,-z,now
+       econf || die "configuration failed"
+       emake COPTS="${CFLAGS}" || die "compile failed"
+
+       #build pppgetpass
+       cd contrib/pppgetpass
+       if useq gtk; then
+               emake -f Makefile.linux || die "failed to build pppgetpass"
+       else
+               emake pppgetpass.vt || die "failed to build pppgetpass"
+       fi
+}
+
+src_install() {
+       local y
+       for y in chat pppd pppdump pppstats
+       do
+               doman ${y}/${y}.8
+               dosbin ${y}/${y}
+       done
+       chmod u+s-w ${D}/usr/sbin/pppd
+
+       dosbin pppd/plugins/rp-pppoe/pppoe-discovery
+
+       insinto /etc/ppp
+       insopts -m0600
+       newins etc.ppp/pap-secrets pap-secrets.example
+       newins etc.ppp/chap-secrets chap-secrets.example
+
+       insopts -m0644
+       doins etc.ppp/options
+       doins ${FILESDIR}/${PV}/options-pptp
+       doins ${FILESDIR}/${PV}/options-pppoe
+       doins ${FILESDIR}/${PV}/chat-default
+
+       insopts -m0755
+       doins ${FILESDIR}/${PV}/ip-up
+       doins ${FILESDIR}/${PV}/ip-down
+
+       exeinto /etc/init.d/
+       doexe ${FILESDIR}/${PV}/net.ppp0
+
+       if useq pam; then
+               insinto /etc/pam.d
+               insopts -m0644
+               newins pppd/ppp.pam ppp || die "not found ppp.pam"
+       fi
+
+       insinto /etc/conf.d
+       insopts -m0600
+       newins ${FILESDIR}/${PV}/confd.ppp0 net.ppp0
+
+       dolib.so pppd/plugins/minconn.so
+       dolib.so pppd/plugins/passprompt.so
+       dolib.so pppd/plugins/passwordfd.so
+       dolib.so pppd/plugins/winbind.so
+       dolib.so pppd/plugins/rp-pppoe/rp-pppoe.so
+       dolib.so pppd/plugins/radius/radius.so
+       dolib.so pppd/plugins/radius/radattr.so
+       dolib.so pppd/plugins/radius/radrealms.so
+       if useq atm; then
+               dolib.so pppd/plugins/pppoatm/pppoatm.so || die "pppoatm.so not build"
+       fi
+       if useq dhcp; then
+               dolib.so pppd/plugins/dhcp/dhcpc.so || die "dhcpc.so not build"
+       fi
+
+       dodir /usr/lib/pppd/$(awk -F '"' '/VERSION/ {print $2}' pppd/patchlevel.h)
+       mv ${D}/usr/lib/*.so ${D}/usr/lib/pppd/$(awk -F '"' '/VERSION/ {print $2}' pppd/patchlevel.h)
+
+       insinto /etc/modules.d
+       insopts -m0644
+       newins ${FILESDIR}/${PV}/modules.ppp ppp
+       if useq mppe-mppc; then
+               echo 'alias ppp-compress-18 ppp_mppe_mppc' >> ${D}/etc/modules.d/ppp
+       fi
+
+       dodoc PLUGINS README* SETUP Changes-2.3 FAQ
+       dodoc ${FILESDIR}/${PV}/README.mpls
+       dohtml ${FILESDIR}/${PV}/pppoe.html
+
+       doman pppd/plugins/radius/pppd-radius.8
+       doman pppd/plugins/radius/pppd-radattr.8
+
+       dosbin scripts/pon
+       dosbin scripts/poff
+       dosbin scripts/plog
+       doman scripts/pon.1
+
+       # Adding misc. specialized scripts to doc dir
+       dodir /usr/share/doc/${PF}/scripts/chatchat
+       insinto /usr/share/doc/${PF}/scripts/chatchat
+       doins scripts/chatchat/*
+       insinto /usr/share/doc/${PF}/scripts
+       doins scripts/*
+
+       if useq gtk; then
+               dosbin contrib/pppgetpass/{pppgetpass.vt,pppgetpass.gtk}
+               newsbin contrib/pppgetpass/pppgetpass.sh pppgetpass
+       else
+               newsbin contrib/pppgetpass/pppgetpass.vt pppgetpass
+       fi
+       doman contrib/pppgetpass/pppgetpass.8
+}
+
+pkg_postinst() {
+       if [ ! -e ${ROOT}dev/.devfsd ] && [ ! -e ${ROOT}dev/.udev ]
+       then
+               if [ ! -e ${ROOT}dev/ppp ]; then
+                       mknod ${ROOT}dev/ppp c 108 0
+               fi
+       fi
+       if [ "$ROOT" = "/" ]
+       then
+               /sbin/update-modules
+       fi
+       ewarn "To enable kernel-pppoe read html/pppoe.html in the doc-directory."
+       ewarn "Note: the library name has changed from pppoe.so to rp-pppoe.so."
+       ewarn "Pon, poff and plog scripts have been supplied for experienced users."
+       ewarn "New users or those requiring something more should have a look at"
+       ewarn "the /etc/init.d/net.ppp0 script."
+       ewarn "Users needing particular scripts (ssh,rsh,etc.)should check out the"
+       ewarn "/usr/share/doc/ppp*/scripts directory."
+
+       # lib name has changed
+       sed -i -e "s:^pppoe.so:rp-pppoe.so:" ${ROOT}etc/ppp/options
+}