diff options
author | Heinrich Wendel <lanius@gentoo.org> | 2004-03-06 14:46:39 +0000 |
---|---|---|
committer | Heinrich Wendel <lanius@gentoo.org> | 2004-03-06 14:46:39 +0000 |
commit | 8a4353828576a755f61a067ec6c2761ff3bf1980 (patch) | |
tree | 8e3345eff114fcf31c37ec8ca140c7623c51f37b /net-dialup/ppp | |
parent | Fixed small depend bug. (Manifest recommit) (diff) | |
download | gentoo-2-8a4353828576a755f61a067ec6c2761ff3bf1980.tar.gz gentoo-2-8a4353828576a755f61a067ec6c2761ff3bf1980.tar.bz2 gentoo-2-8a4353828576a755f61a067ec6c2761ff3bf1980.zip |
dd atm support (bug #41607) and mppc support (bug #42212)
Diffstat (limited to 'net-dialup/ppp')
-rw-r--r-- | net-dialup/ppp/ChangeLog | 8 | ||||
-rw-r--r-- | net-dialup/ppp/Manifest | 44 | ||||
-rw-r--r-- | net-dialup/ppp/files/2.4.2/killaddr-smarter.patch | 176 | ||||
-rw-r--r-- | net-dialup/ppp/files/2.4.2/killaddr-smarter.patch.gz | bin | 0 -> 2257 bytes | |||
-rw-r--r-- | net-dialup/ppp/files/2.4.2/mpls.patch | 431 | ||||
-rw-r--r-- | net-dialup/ppp/files/2.4.2/mpls.patch.gz | bin | 0 -> 3151 bytes | |||
-rw-r--r-- | net-dialup/ppp/files/2.4.2/pppoatm.diff.gz | bin | 0 -> 3567 bytes | |||
-rw-r--r-- | net-dialup/ppp/files/2.4.2/stdopt-mppe-mppc-0.82.patch.gz | bin | 0 -> 10108 bytes | |||
-rw-r--r-- | net-dialup/ppp/files/digest-ppp-2.4.2-r1 | 1 | ||||
-rw-r--r-- | net-dialup/ppp/ppp-2.4.2-r1.ebuild | 153 | ||||
-rw-r--r-- | net-dialup/ppp/ppp-2.4.2.ebuild | 6 |
11 files changed, 188 insertions, 631 deletions
diff --git a/net-dialup/ppp/ChangeLog b/net-dialup/ppp/ChangeLog index 6362c7e133b4..cc57e4d839ed 100644 --- a/net-dialup/ppp/ChangeLog +++ b/net-dialup/ppp/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-dialup/ppp # Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-dialup/ppp/ChangeLog,v 1.49 2004/02/22 01:36:18 lanius Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dialup/ppp/ChangeLog,v 1.50 2004/03/06 14:46:39 lanius Exp $ + + 06 Mar 2004; Heinrich Wendel <lanius@gentoo.org> ppp-2.4.2.ebuild, + files/2.4.2/killaddr-smarter.patch, files/2.4.2/killaddr-smarter.patch.gz, + files/2.4.2/mpls.patch, files/2.4.2/mpls.patch.gz, + files/2.4.2/pppoatm.diff.gz, files/2.4.2/stdopt-mppe-mppc-0.82.patch.gz: + add atm support (bug #41607) and mppc support (bug #42212) 22 Feb 2004; Heinrich Wendel <lanius@gentoo.org> ppp-2.4.2.ebuild: bug #41914 diff --git a/net-dialup/ppp/Manifest b/net-dialup/ppp/Manifest index 8e38c970c124..fe8712323181 100644 --- a/net-dialup/ppp/Manifest +++ b/net-dialup/ppp/Manifest @@ -1,28 +1,19 @@ MD5 51457a2491f5e903b350d582b49f7c51 ppp-2.4.2_beta3-r1.ebuild 3877 +MD5 7226a185b85b8dd36ce1eefb89ec2505 ppp-2.4.1-r14.ebuild 4617 +MD5 6b4b9eedca2ef7c71a19fefaa49b0c22 ppp-2.4.2.ebuild 3892 +MD5 33e363d2d674e7bb55fe98c75983e50f ppp-2.4.2-r1.ebuild 4119 +MD5 e97a97b6ab5c8d0993e02364291433fb ChangeLog 8907 +MD5 ec2f84816306825d125d0c01bd86758d metadata.xml 163 MD5 4e62cdeb360ca0a22becbd2deb6f2dac files/pon 957 MD5 86cdaf133f7a79fb464f02d83afc7734 files/plog 146 MD5 05b7394b35a2342033b52134568bf6b8 files/poff 2723 -MD5 2890b47660f967a07ac5b211850e46c5 files/2.4.2/options-pptp 238 -MD5 3f9363730082b77d6d2cddf4ba2fb188 files/2.4.2/chat-default 349 -MD5 aade0f158628e38b74a080bd40222bc3 files/2.4.2/ip-up 1055 -MD5 2f3cb68239518190078d5830de5e1398 files/2.4.2/killaddr-smarter.patch 6106 -MD5 ed4ee5550e1016ff405d410f8e37cdfe files/2.4.2/confd.ppp0 2782 -MD5 fa2a5b8df496922fa2fb592115953b6b files/2.4.2/options-pppoe 53 -MD5 561a149f78198208724ab4527837eb8c files/2.4.2/mpls.patch 10470 -MD5 eae3621e2f615e9614b392d6d0f3ef81 files/2.4.2/net.ppp0 4341 -MD5 1fd88dda7f4996799c69a9501d42cc23 files/2.4.2/README.mpls 530 -MD5 5d83af7b897082a0b1ecd70a2cc2a0c7 files/2.4.2/modules.ppp 268 -MD5 99aa8428a441ff748dc88892a8e98266 files/2.4.2/pcap.patch 728 -MD5 09fcad33830cb2af02446902cf6883c6 files/2.4.2/ip-down 801 -MD5 f0ad3e0c62aec1771536caf00e28b9c6 files/2.4.2/pppoe.html 7605 -MD5 bc88eaf56862e5ebf8f45ec5ada4bb90 files/2.4.2/cflags.patch 1857 -MD5 5f6f3203688bc5a2eceef8301f482c9f files/chat-default 344 +MD5 03eb44456283c43760269a92083946d3 files/chat-default 345 MD5 824964465508977f9d0836f029d6b02f files/ppp-2.4.1-openssl-0.9.6-mppe-patch.gz 36112 MD5 47bae70427ec4cb3ea1cc87ae799d0e3 files/gcc33-amd64.patch 1207 MD5 c74b7e519f593babcfc3821832d72819 files/ip-up 282 MD5 44cc662ba9aa61dd9add3ddd4c5ded57 files/pon.1 3607 MD5 feb6723fa9b971cb443cff79693db0cd files/ppp-crypto-fix.patch.bz2 35770 -MD5 271b9ea36d7e7c5c6587036927d604e6 files/confd.ppp0 3309 +MD5 208e12ddd9a3e4c4ac470e9c4d7d7144 files/confd.ppp0 3310 MD5 4fda43c2f3f8b5b58a58e5d238991c0b files/digest-ppp-2.4.1-r14 65 MD5 f82a3ae0dba4ce6031bbf1405071e827 files/ppp-2.4.1-r10.patch 311 MD5 b783e9bd9ac5956c582499f0623195fe files/net.ppp0 4705 @@ -30,9 +21,26 @@ MD5 8368eb79ad4618c3c6753801b5c4c689 files/gcc3.3-multiline.patch 1673 MD5 8d2dfaf7418945cb19864167542b14c0 files/digest-ppp-2.4.2 61 MD5 6f7e70fee6e827ad992da785cba032c6 files/digest-ppp-2.4.2_beta3-r1 63 MD5 eb5dfeb9b6a2c8b4b2f23df4980952e0 files/ppp-2.4.1-MSCHAPv2-fix.patch 507 +MD5 8d2dfaf7418945cb19864167542b14c0 files/digest-ppp-2.4.2-r1 61 MD5 5d83af7b897082a0b1ecd70a2cc2a0c7 files/modules.ppp 268 MD5 0713ffc9ae6e3ee4ef0f5c3cb752b3ea files/ip-down 285 MD5 f0ad3e0c62aec1771536caf00e28b9c6 files/pppoe.html 7605 +MD5 927fc5dafad76c9c1ee7f0259e9244b7 files/2.4.2/mpls.patch.gz 3151 +MD5 2890b47660f967a07ac5b211850e46c5 files/2.4.2/options-pptp 238 +MD5 3f9363730082b77d6d2cddf4ba2fb188 files/2.4.2/chat-default 349 +MD5 aade0f158628e38b74a080bd40222bc3 files/2.4.2/ip-up 1055 +MD5 8eaba18dd4e6f49c9fd2d35ab8572458 files/2.4.2/killaddr-smarter.patch.gz 2257 +MD5 ed4ee5550e1016ff405d410f8e37cdfe files/2.4.2/confd.ppp0 2782 +MD5 fa2a5b8df496922fa2fb592115953b6b files/2.4.2/options-pppoe 53 +MD5 9d798912edc0a47727afcd7aac100957 files/2.4.2/stdopt-mppe-mppc-0.82.patch.gz 10108 +MD5 eae3621e2f615e9614b392d6d0f3ef81 files/2.4.2/net.ppp0 4341 +MD5 971013ca1ccc5a25acffdb3ff9edff4e files/2.4.2/pppoatm.diff.gz 3567 +MD5 1fd88dda7f4996799c69a9501d42cc23 files/2.4.2/README.mpls 530 +MD5 5d83af7b897082a0b1ecd70a2cc2a0c7 files/2.4.2/modules.ppp 268 +MD5 99aa8428a441ff748dc88892a8e98266 files/2.4.2/pcap.patch 728 +MD5 09fcad33830cb2af02446902cf6883c6 files/2.4.2/ip-down 801 +MD5 f0ad3e0c62aec1771536caf00e28b9c6 files/2.4.2/pppoe.html 7605 +MD5 bc88eaf56862e5ebf8f45ec5ada4bb90 files/2.4.2/cflags.patch 1857 MD5 2890b47660f967a07ac5b211850e46c5 files/2.4.2b3/options-pptp 238 MD5 7004513b8b14aad3e2f598535e672af4 files/2.4.2b3/chat-default 351 MD5 7fd76d97cb9a07a6b23b3ab7a0c5cc2c files/2.4.2b3/ip-up 1168 @@ -46,7 +54,3 @@ MD5 5d83af7b897082a0b1ecd70a2cc2a0c7 files/2.4.2b3/modules.ppp 268 MD5 cb8bde7fab636f046c94e7aa52234ef2 files/2.4.2b3/ip-down 914 MD5 f0ad3e0c62aec1771536caf00e28b9c6 files/2.4.2b3/pppoe.html 7605 MD5 0e16e7bb8ae71505e719fe5471bd2097 files/2.4.2b3/cflags.patch 3403 -MD5 7226a185b85b8dd36ce1eefb89ec2505 ppp-2.4.1-r14.ebuild 4617 -MD5 2e4a73e5e8be1cfd54a06ece1794b9a7 ppp-2.4.2.ebuild 3886 -MD5 10e03feee05cdbb36f5b11e21b282ec4 ChangeLog 8571 -MD5 ec2f84816306825d125d0c01bd86758d metadata.xml 163 diff --git a/net-dialup/ppp/files/2.4.2/killaddr-smarter.patch b/net-dialup/ppp/files/2.4.2/killaddr-smarter.patch deleted file mode 100644 index b49afdce37bc..000000000000 --- a/net-dialup/ppp/files/2.4.2/killaddr-smarter.patch +++ /dev/null @@ -1,176 +0,0 @@ -diff -urN ppp-2.4.1.pppoe4-orig/chat/Makefile.linux ppp-2.4.1.pppoe4/chat/Makefile.linux ---- ppp-2.4.1.pppoe4-orig/chat/Makefile.linux 1999-08-12 21:54:32.000000000 -0400 -+++ ppp-2.4.1.pppoe4/chat/Makefile.linux 2002-10-04 12:46:49.000000000 -0400 -@@ -6,7 +6,7 @@ - CDEF4= -DFNDELAY=O_NDELAY # Old name value - CDEFS= $(CDEF1) $(CDEF2) $(CDEF3) $(CDEF4) - --COPTS= -O2 -g -pipe $(CDEFS) -+COPTS= ${COPTS} $(CDEFS) - CFLAGS= $(COPTS) $(CDEFS) - - INSTALL= install -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 -urN ppp-2.4.1.pppoe4-orig/pppdump/Makefile.linux ppp-2.4.1.pppoe4/pppdump/Makefile.linux ---- ppp-2.4.1.pppoe4-orig/pppdump/Makefile.linux 1999-07-26 07:09:29.000000000 -0400 -+++ ppp-2.4.1.pppoe4/pppdump/Makefile.linux 2002-10-04 12:46:49.000000000 -0400 -@@ -1,4 +1,4 @@ --CFLAGS= -O -I../include/net -+CFLAGS= $(COPTS) -I../include/net - OBJS = pppdump.o bsd-comp.o deflate.o zlib.o - - INSTALL= install -@@ -6,7 +6,7 @@ - all: pppdump - - pppdump: $(OBJS) -- $(CC) -o pppdump $(OBJS) -+ $(CC) $(LDFLAGS) -o pppdump $(OBJS) - - clean: - rm -f pppdump $(OBJS) *~ -diff -urN ppp-2.4.1.pppoe4-orig/pppstats/Makefile.linux ppp-2.4.1.pppoe4/pppstats/Makefile.linux ---- ppp-2.4.1.pppoe4-orig/pppstats/Makefile.linux 1998-03-24 21:21:19.000000000 -0500 -+++ ppp-2.4.1.pppoe4/pppstats/Makefile.linux 2002-10-04 12:46:49.000000000 -0400 -@@ -22,7 +22,7 @@ - $(INSTALL) -c -m 444 pppstats.8 $(MANDIR)/man8/pppstats.8 - - 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.2/killaddr-smarter.patch.gz b/net-dialup/ppp/files/2.4.2/killaddr-smarter.patch.gz Binary files differnew file mode 100644 index 000000000000..a4cca63c6947 --- /dev/null +++ b/net-dialup/ppp/files/2.4.2/killaddr-smarter.patch.gz diff --git a/net-dialup/ppp/files/2.4.2/mpls.patch b/net-dialup/ppp/files/2.4.2/mpls.patch deleted file mode 100644 index b711ce328b72..000000000000 --- a/net-dialup/ppp/files/2.4.2/mpls.patch +++ /dev/null @@ -1,431 +0,0 @@ -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.2/mpls.patch.gz b/net-dialup/ppp/files/2.4.2/mpls.patch.gz Binary files differnew file mode 100644 index 000000000000..50acff426221 --- /dev/null +++ b/net-dialup/ppp/files/2.4.2/mpls.patch.gz diff --git a/net-dialup/ppp/files/2.4.2/pppoatm.diff.gz b/net-dialup/ppp/files/2.4.2/pppoatm.diff.gz Binary files differnew file mode 100644 index 000000000000..e37807c37315 --- /dev/null +++ b/net-dialup/ppp/files/2.4.2/pppoatm.diff.gz diff --git a/net-dialup/ppp/files/2.4.2/stdopt-mppe-mppc-0.82.patch.gz b/net-dialup/ppp/files/2.4.2/stdopt-mppe-mppc-0.82.patch.gz Binary files differnew file mode 100644 index 000000000000..d986981ce497 --- /dev/null +++ b/net-dialup/ppp/files/2.4.2/stdopt-mppe-mppc-0.82.patch.gz diff --git a/net-dialup/ppp/files/digest-ppp-2.4.2-r1 b/net-dialup/ppp/files/digest-ppp-2.4.2-r1 new file mode 100644 index 000000000000..105b43c0d08b --- /dev/null +++ b/net-dialup/ppp/files/digest-ppp-2.4.2-r1 @@ -0,0 +1 @@ +MD5 362bcf218fba8afbb9afbee7471e5dac ppp-2.4.2.tar.gz 774441 diff --git a/net-dialup/ppp/ppp-2.4.2-r1.ebuild b/net-dialup/ppp/ppp-2.4.2-r1.ebuild new file mode 100644 index 000000000000..aba32eee0231 --- /dev/null +++ b/net-dialup/ppp/ppp-2.4.2-r1.ebuild @@ -0,0 +1,153 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-dialup/ppp/ppp-2.4.2-r1.ebuild,v 1.1 2004/03/06 14:46:39 lanius Exp $ + +DESCRIPTION="Point-to-point protocol - patched for PPPOE" +HOMEPAGE="http://www.samba.org/ppp" +SRC_URI="ftp://ftp.samba.org/pub/ppp/${P}.tar.gz" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="~x86 ~ppc ~sparc ~hppa -amd64 ~ia64" +IUSE="ipv6 activefilter pam" + +RDEPEND="virtual/glibc + >=net-libs/libpcap-0.8 + atm? ( x86? ( net-dialup/linux-atm ) )" +DEPEND="${RDEPEND} + >=sys-apps/sed-4" + +src_unpack() { + unpack ${A} + cd ${S} + + epatch ${FILESDIR}/${PV}/mpls.patch.gz + epatch ${FILESDIR}/${PV}/killaddr-smarter.patch.gz + epatch ${FILESDIR}/${PV}/cflags.patch + epatch ${FILESDIR}/${PV}/pcap.patch + epatch ${FILESDIR}/${PV}/stdopt-mppe-mppc-0.82.patch.gz + + if [ "`use atm`" -a "`use x86`" ]; then + einfo "Enabling PPPoATM support" + epatch ${FILESDIR}/${PV}/pppoatm.diff.gz + fi + + use activefilter && { + einfo "Enabling active-filter" + sed -i -e "s/^#FILTER=y/FILTER=y/" pppd/Makefile.linux || die + } + + use pam && { + einfo "Enabling PAM" + sed -i -e "s/^#USE_PAM=y/USE_PAM=y/" pppd/Makefile.linux || die + } + + use ipv6 && { + einfo "Enabling IPv6" + sed -i -e "s/#HAVE_INET6/HAVE_INET6/" pppd/Makefile.linux || die + } + + einfo "Enabling CBCP" + sed -i 's/^#CBCP=y/CBCP=y/' pppd/Makefile.linux || die + + einfo "Enabling radius" + sed -i -e 's/SUBDIRS := rp-pppoe/SUBDIRS := rp-pppoe radius/' pppd/plugins/Makefile.linux || die +} + +src_compile() { + export WANT_AUTOCONF=2.1 + # compile radius better than their makefile does + (cd pppd/plugins/radius/radiusclient && econf && emake) || die + ./configure --prefix=/usr || die + emake COPTS="${CFLAGS}" || die +} + +src_install() { + for y in chat pppd pppdump pppstats + do + doman ${y}/${y}.8 + dosbin ${y}/${y} + done + chmod u+s-w ${D}/usr/sbin/pppd + + dodir /etc/ppp/peers + insinto /etc/ppp + insopts -m0600 + doins etc.ppp/pap-secrets etc.ppp/chap-secrets + + 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 + + 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/rp-pppoe/rp-pppoe.so + 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 + + dodoc PLUGINS README* SETUP Changes-2.3 FAQ + dodoc ${FILESDIR}/${PV}/README.mpls + dohtml ${FILESDIR}/${PV}/pppoe.html + + 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/* + + # install radius + cd pppd/plugins/radius + dolib.so radius.so + dolib.so radattr.so + dolib.so radrealms.so + doman pppd-radius.8 + doman pppd-radattr.8 + cd radiusclient + make DESTDIR=${D} install || die +} + +pkg_postinst() { + if [ ! -e ${ROOT}dev/.devfsd ] + 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 +} diff --git a/net-dialup/ppp/ppp-2.4.2.ebuild b/net-dialup/ppp/ppp-2.4.2.ebuild index 064af209399c..fa692bf500ae 100644 --- a/net-dialup/ppp/ppp-2.4.2.ebuild +++ b/net-dialup/ppp/ppp-2.4.2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-dialup/ppp/ppp-2.4.2.ebuild,v 1.3 2004/02/22 01:36:18 lanius Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dialup/ppp/ppp-2.4.2.ebuild,v 1.4 2004/03/06 14:46:39 lanius Exp $ DESCRIPTION="Point-to-point protocol - patched for PPPOE" HOMEPAGE="http://www.samba.org/ppp" @@ -20,8 +20,8 @@ src_unpack() { unpack ${A} cd ${S} - epatch ${FILESDIR}/${PV}/mpls.patch - epatch ${FILESDIR}/${PV}/killaddr-smarter.patch + epatch ${FILESDIR}/${PV}/mpls.patch.gz + epatch ${FILESDIR}/${PV}/killaddr-smarter.patch.gz epatch ${FILESDIR}/${PV}/cflags.patch epatch ${FILESDIR}/${PV}/pcap.patch |