aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-06-03 09:12:29 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-06-03 09:21:26 +0000
commit28648190fd6f9d06d4db3f636dd91af48f293158 (patch)
tree0d2c64a20a3bd54951221dd8a3b451972410c2a4
parent80e7a7e86c28c23fff4fd31edce1fdf48727a6ce (diff)
downloadalpine_aports-28648190fd6f9d06d4db3f636dd91af48f293158.tar.bz2
alpine_aports-28648190fd6f9d06d4db3f636dd91af48f293158.tar.xz
alpine_aports-28648190fd6f9d06d4db3f636dd91af48f293158.zip
main/ppp: upgrade to 2.4.6 and ship net/ppp_defs.h
-rw-r--r--main/ppp/APKBUILD28
-rw-r--r--main/ppp/defaultroute-metric.3.patch101
-rw-r--r--main/ppp/musl-fix-headers.patch128
3 files changed, 142 insertions, 115 deletions
diff --git a/main/ppp/APKBUILD b/main/ppp/APKBUILD
index d1d662ae65..a8038cf373 100644
--- a/main/ppp/APKBUILD
+++ b/main/ppp/APKBUILD
@@ -1,7 +1,7 @@
1# Maintainer: Natanael Copa <ncopa@alpinelinux.org> 1# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
2pkgname=ppp 2pkgname=ppp
3pkgver=2.4.5 3pkgver=2.4.6
4pkgrel=8 4pkgrel=0
5pkgdesc="A daemon which implements the PPP protocol for dial-up networking" 5pkgdesc="A daemon which implements the PPP protocol for dial-up networking"
6url="http://www.samba.org/ppp/" 6url="http://www.samba.org/ppp/"
7arch="all" 7arch="all"
@@ -32,7 +32,7 @@ prepare() {
32 done 32 done
33} 33}
34 34
35build () { 35build () {
36 cd "$_builddir" 36 cd "$_builddir"
37 37
38 # fix CFLAGS 38 # fix CFLAGS
@@ -61,7 +61,9 @@ build () {
61 61
62package() { 62package() {
63 cd "$_builddir" 63 cd "$_builddir"
64 make INSTROOT="$pkgdir" install 64 make INSTROOT="$pkgdir" install || return 1
65 install -Dm644 include/net/ppp_defs.h \
66 "$pkgdir"/usr/include/net/ppp_defs.h || return 1
65 67
66 install -D -m644 "$srcdir"/options "$pkgdir"/etc/ppp/options 68 install -D -m644 "$srcdir"/options "$pkgdir"/etc/ppp/options
67 install -D -m755 "$srcdir"/ip-up "$pkgdir"/etc/ppp/ip-up 69 install -D -m755 "$srcdir"/ip-up "$pkgdir"/etc/ppp/ip-up
@@ -74,9 +76,9 @@ package() {
74 install -D -m644 "$srcdir"/pon.1 "$pkgdir"/usr/share/man/man1/pon.1 76 install -D -m644 "$srcdir"/pon.1 "$pkgdir"/usr/share/man/man1/pon.1
75 mkdir -p "$pkgdir"/etc/ppp/peers 77 mkdir -p "$pkgdir"/etc/ppp/peers
76} 78}
77md5sums="4621bc56167b6953ec4071043fe0ec57 ppp-2.4.5.tar.gz 79md5sums="3434d2cc9327167a0723aaaa8670083b ppp-2.4.6.tar.gz
78e26f807a61490fedbc9a7632caebd973 defaultroute-metric.3.patch 805a5c2d1bdca62979d9ed7a5a648e86d1 defaultroute-metric.3.patch
79a1fde30d2ae6e7e6fcef470afc90d13f musl-fix-headers.patch 818d2128c74d62a2844491a24794b05a3e musl-fix-headers.patch
809185f645bb433b22a9951d9d12f79c35 options 829185f645bb433b22a9951d9d12f79c35 options
8148c024f73a80c8b69c4def22f86902cc pon 8348c024f73a80c8b69c4def22f86902cc pon
822d811f8470ccdea3b8c4505a438483e9 poff 842d811f8470ccdea3b8c4505a438483e9 poff
@@ -84,9 +86,9 @@ a1fde30d2ae6e7e6fcef470afc90d13f musl-fix-headers.patch
8444cc662ba9aa61dd9add3ddd4c5ded57 pon.1 8644cc662ba9aa61dd9add3ddd4c5ded57 pon.1
85fac0c773490371ea673f4be0977a230f ip-up 87fac0c773490371ea673f4be0977a230f ip-up
86a88b40b1bf91eb5cca3762b7195e4fe2 ip-down" 88a88b40b1bf91eb5cca3762b7195e4fe2 ip-down"
87sha256sums="43317afec9299f9920b96f840414c977f0385410202d48e56d2fdb8230003505 ppp-2.4.5.tar.gz 89sha256sums="1b33181a03962c8a092c055fb9980e9722728a8d98a4bb7ec7acda17c1b1b49d ppp-2.4.6.tar.gz
88b6b01f0022120d4575359663b03518e630aa671b11695f2e20776a83f62228e6 defaultroute-metric.3.patch 901f69c03747ed68eaaaa8b2f0a239e57f167967fc90a6f89d802dcfe77026846f defaultroute-metric.3.patch
8932bff6e2ffc34677f483d6d7860851270251fb3ce935fcffc7126bfaad10d26d musl-fix-headers.patch 91b136d5366e64a686a3ea24baaaeb4a37c2654c098dd7fcb263caebf9e9281956 musl-fix-headers.patch
909f473800a48bbaec41b465817ae9c4c53d6b0ce865b4298d9353b30707a39605 options 929f473800a48bbaec41b465817ae9c4c53d6b0ce865b4298d9353b30707a39605 options
91c92e0721c4f53987dd0a02fe7089d0f5a58cdb7bb9f26d1bddc28111406ce6c2 pon 93c92e0721c4f53987dd0a02fe7089d0f5a58cdb7bb9f26d1bddc28111406ce6c2 pon
92ee1e1e5f164effe49bc7ffab3fbde6efbd46d186c58192913f749257026d75e2 poff 94ee1e1e5f164effe49bc7ffab3fbde6efbd46d186c58192913f749257026d75e2 poff
@@ -94,9 +96,9 @@ ee1e1e5f164effe49bc7ffab3fbde6efbd46d186c58192913f749257026d75e2 poff
949bb35eac78898cdc75184bb70fea11fb2e2889e1e2cadf0b7bb8320d7cae0959 pon.1 969bb35eac78898cdc75184bb70fea11fb2e2889e1e2cadf0b7bb8320d7cae0959 pon.1
957d44e21ed945434c32a385f44c690826f74c3d5ddac353deae8174692d8d1beb ip-up 977d44e21ed945434c32a385f44c690826f74c3d5ddac353deae8174692d8d1beb ip-up
9684f2b44c9f4b8abdbc9cfbfffb669fa19385b80da55f9c292df115189dc62bd6 ip-down" 9884f2b44c9f4b8abdbc9cfbfffb669fa19385b80da55f9c292df115189dc62bd6 ip-down"
97sha512sums="3688720a0f9ee47802e72dc6aa3d47c7312c195007f37a6ceb087fdb6f1f77ad75e922a568cffed6d1a857f06d79460d6d38b56e179310e493a0380a0c5a4f6e ppp-2.4.5.tar.gz 99sha512sums="65d6967ba43cd8b4d3f63f52ff69f6fed964f748fc780dff982629668213c2cd1891671f6f4a0c1c22118a382e282fabdd2328e60a120d9b984d3c17f9355cc6 ppp-2.4.6.tar.gz
98135cd073f1a1b6a1213f87b4d201dc3a298f40c0474ecc3ef0bd01bf61f8273d94e22b5a38b54dfa8d5315a64fc53a0bec3bb68123881ea6bb2c22ef759ccd21 defaultroute-metric.3.patch 100fccc7a6809ae4a617796ccf1d2132de8edb1cc0c71d76a95393585a5970b92be2a54da558702db355c8aea8d37b4dfffc64406129a2b3322f0b10e8f0481f685 defaultroute-metric.3.patch
999423da37d3b002ff0b554419b293bc8507f1c6d0404dfed42bb37194b981a4927ee7cef62798e31b14e46693c6c4a5c1986876c3fafb798e160d99f92601d23c musl-fix-headers.patch 1012f071ea9db15e4abf1bed6cce8130dc81b710a31bfef5fa8f9370c353f845dbc47674b1551b8e040478e5156add6f98d480530206125e8bb308f0f4288d1eec6 musl-fix-headers.patch
100cabcaa8d44f0da399326b7f93267d4786b32f69c6fa7a78ab451575a8cc594f2a259406166c874d88ecfc0861b8b4abdb3b653cf1cb00e2f2838ea880962f6ee options 102cabcaa8d44f0da399326b7f93267d4786b32f69c6fa7a78ab451575a8cc594f2a259406166c874d88ecfc0861b8b4abdb3b653cf1cb00e2f2838ea880962f6ee options
10129233c8010f511792c2dcf54ee06ede271994ef029b6b526aeeb17433233ef6b638b96346d81db55c2a6bb25fb07633328415cd3af55dadd78a32b1d45b07dd8 pon 10329233c8010f511792c2dcf54ee06ede271994ef029b6b526aeeb17433233ef6b638b96346d81db55c2a6bb25fb07633328415cd3af55dadd78a32b1d45b07dd8 pon
1023605ce49bad21473ef5f3ff2421e1ef7687e9267986503deca63ae3a2baa6308e8d031cb1da2f93b5b73dc292206a49c59cea17b80c129272cc975e07e3c6142 poff 1043605ce49bad21473ef5f3ff2421e1ef7687e9267986503deca63ae3a2baa6308e8d031cb1da2f93b5b73dc292206a49c59cea17b80c129272cc975e07e3c6142 poff
diff --git a/main/ppp/defaultroute-metric.3.patch b/main/ppp/defaultroute-metric.3.patch
index 2eee724c23..d4dc5df325 100644
--- a/main/ppp/defaultroute-metric.3.patch
+++ b/main/ppp/defaultroute-metric.3.patch
@@ -1,26 +1,34 @@
1Default route metric 1From ddea82ad5cb547f3582060d6a0265bb96a0634ea Mon Sep 17 00:00:00 2001
2From: Natanael Copa <ncopa@alpinelinux.org>
3Date: Tue, 3 Jun 2014 08:53:47 +0000
4Subject: [PATCH] pppd: add support for defaultroute-metric option
2 5
3Define the metric of the default route and only add it if there 6This allows user to specify the 'metric' (or 'prio') for the default
4is no other default route with the same metric. With the default 7route set by pppd. This is useful in multi-ISP setups where there
5value of -1, the route is only added if there is no default route 8might be more than one default gateway.
6at all.
7 9
8Olivier Mehani <olivier.mehani@nicta.com.au> 10Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
9Index: ppp-2.4.4/pppd/options.c 11---
10=================================================================== 12 pppd/options.c | 5 +++++
11--- ppp-2.4.4.orig/pppd/options.c 2006-06-18 21:26:00.000000000 +1000 13 pppd/pppd.8 | 6 ++++++
12+++ ppp-2.4.4/pppd/options.c 2010-04-22 17:08:38.000000000 +1000 14 pppd/sys-linux.c | 24 ++++++++++++++++--------
13@@ -119,6 +119,7 @@ 15 3 files changed, 27 insertions(+), 8 deletions(-)
14 bool dryrun; /* print out option values and exit */ 16
17diff --git a/pppd/options.c b/pppd/options.c
18index 45fa742..ca3f875 100644
19--- a/pppd/options.c
20+++ b/pppd/options.c
21@@ -121,6 +121,7 @@ bool dryrun; /* print out option values and exit */
15 char *domain; /* domain name set by domain option */ 22 char *domain; /* domain name set by domain option */
16 int child_wait = 5; /* # seconds to wait for children at exit */ 23 int child_wait = 5; /* # seconds to wait for children at exit */
24 struct userenv *userenv_list; /* user environment variables */
17+int dfl_route_metric = -1; /* metric of the default route to set over the PPP link */ 25+int dfl_route_metric = -1; /* metric of the default route to set over the PPP link */
18 26
19 #ifdef MAXOCTETS 27 #ifdef MAXOCTETS
20 unsigned int maxoctets = 0; /* default - no limit */ 28 unsigned int maxoctets = 0; /* default - no limit */
21@@ -281,6 +282,10 @@ 29@@ -299,6 +300,10 @@ option_t general_options[] = {
22 "Number of seconds to wait for child processes at exit", 30 "Unset user environment variable",
23 OPT_PRIO }, 31 OPT_A2PRINTER | OPT_NOPRINT, (void *)user_unsetprint },
24 32
25+ { "defaultroute-metric", o_int, &dfl_route_metric, 33+ { "defaultroute-metric", o_int, &dfl_route_metric,
26+ "Metric to use for the default route (Linux only; -1 for default behavior)", 34+ "Metric to use for the default route (Linux only; -1 for default behavior)",
@@ -29,11 +37,28 @@ Index: ppp-2.4.4/pppd/options.c
29 #ifdef HAVE_MULTILINK 37 #ifdef HAVE_MULTILINK
30 { "multilink", o_bool, &multilink, 38 { "multilink", o_bool, &multilink,
31 "Enable multilink operation", OPT_PRIO | 1 }, 39 "Enable multilink operation", OPT_PRIO | 1 },
32Index: ppp-2.4.4/pppd/sys-linux.c 40diff --git a/pppd/pppd.8 b/pppd/pppd.8
33=================================================================== 41index e2768b1..c508d27 100644
34--- ppp-2.4.4.orig/pppd/sys-linux.c 2005-08-27 08:44:35.000000000 +1000 42--- a/pppd/pppd.8
35+++ ppp-2.4.4/pppd/sys-linux.c 2010-04-22 17:09:44.000000000 +1000 43+++ b/pppd/pppd.8
36@@ -232,7 +232,7 @@ 44@@ -121,6 +121,12 @@ the gateway, when IPCP negotiation is successfully completed.
45 This entry is removed when the PPP connection is broken. This option
46 is privileged if the \fInodefaultroute\fR option has been specified.
47 .TP
48+.B defaultroute-metric
49+Define the metric of the \fIdefaultroute\fR and only add it if there
50+is no other default route with the same metric. With the default
51+value of -1, the route is only added if there is no default route at
52+all.
53+.TP
54 .B disconnect \fIscript
55 Execute the command specified by \fIscript\fR, by passing it to a
56 shell, after
57diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c
58index 72a7727..6d71530 100644
59--- a/pppd/sys-linux.c
60+++ b/pppd/sys-linux.c
61@@ -232,7 +232,7 @@ static int baud_rate_of (int speed);
37 static void close_route_table (void); 62 static void close_route_table (void);
38 static int open_route_table (void); 63 static int open_route_table (void);
39 static int read_route_table (struct rtentry *rt); 64 static int read_route_table (struct rtentry *rt);
@@ -42,7 +67,7 @@ Index: ppp-2.4.4/pppd/sys-linux.c
42 static int get_ether_addr (u_int32_t ipaddr, struct sockaddr *hwaddr, 67 static int get_ether_addr (u_int32_t ipaddr, struct sockaddr *hwaddr,
43 char *name, int namelen); 68 char *name, int namelen);
44 static void decode_version (char *buf, int *version, int *mod, int *patch); 69 static void decode_version (char *buf, int *version, int *mod, int *patch);
45@@ -242,6 +242,8 @@ 70@@ -242,6 +242,8 @@ static int make_ppp_unit(void);
46 71
47 extern u_char inpacket_buf[]; /* borrowed from main.c */ 72 extern u_char inpacket_buf[]; /* borrowed from main.c */
48 73
@@ -51,7 +76,7 @@ Index: ppp-2.4.4/pppd/sys-linux.c
51 /* 76 /*
52 * SET_SA_FAMILY - set the sa_family field of a struct sockaddr, 77 * SET_SA_FAMILY - set the sa_family field of a struct sockaddr,
53 * if it exists. 78 * if it exists.
54@@ -1526,9 +1528,10 @@ 79@@ -1550,9 +1552,10 @@ static int read_route_table(struct rtentry *rt)
55 /******************************************************************** 80 /********************************************************************
56 * 81 *
57 * defaultroute_exists - determine if there is a default route 82 * defaultroute_exists - determine if there is a default route
@@ -63,7 +88,7 @@ Index: ppp-2.4.4/pppd/sys-linux.c
63 { 88 {
64 int result = 0; 89 int result = 0;
65 90
66@@ -1541,7 +1544,8 @@ 91@@ -1565,7 +1568,8 @@ static int defaultroute_exists (struct rtentry *rt)
67 92
68 if (kernel_version > KVERSION(2,1,0) && SIN_ADDR(rt->rt_genmask) != 0) 93 if (kernel_version > KVERSION(2,1,0) && SIN_ADDR(rt->rt_genmask) != 0)
69 continue; 94 continue;
@@ -73,7 +98,7 @@ Index: ppp-2.4.4/pppd/sys-linux.c
73 result = 1; 98 result = 1;
74 break; 99 break;
75 } 100 }
76@@ -1588,13 +1592,13 @@ 101@@ -1612,13 +1616,13 @@ int sifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway)
77 { 102 {
78 struct rtentry rt; 103 struct rtentry rt;
79 104
@@ -92,7 +117,7 @@ Index: ppp-2.4.4/pppd/sys-linux.c
92 return 0; 117 return 0;
93 } 118 }
94 119
95@@ -1602,6 +1606,7 @@ 120@@ -1626,6 +1630,7 @@ int sifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway)
96 SET_SA_FAMILY (rt.rt_dst, AF_INET); 121 SET_SA_FAMILY (rt.rt_dst, AF_INET);
97 122
98 rt.rt_dev = ifname; 123 rt.rt_dev = ifname;
@@ -100,9 +125,9 @@ Index: ppp-2.4.4/pppd/sys-linux.c
100 125
101 if (kernel_version > KVERSION(2,1,0)) { 126 if (kernel_version > KVERSION(2,1,0)) {
102 SET_SA_FAMILY (rt.rt_genmask, AF_INET); 127 SET_SA_FAMILY (rt.rt_genmask, AF_INET);
103@@ -1634,6 +1639,9 @@ 128@@ -1660,6 +1665,9 @@ int cifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway)
104 SET_SA_FAMILY (rt.rt_dst, AF_INET); 129
105 SET_SA_FAMILY (rt.rt_gateway, AF_INET); 130 rt.rt_dev = ifname;
106 131
107+ rt.rt_dev = ifname; 132+ rt.rt_dev = ifname;
108+ rt.rt_metric = dfl_route_metric + 1; /* +1 for binary compatibility */ 133+ rt.rt_metric = dfl_route_metric + 1; /* +1 for binary compatibility */
@@ -110,20 +135,6 @@ Index: ppp-2.4.4/pppd/sys-linux.c
110 if (kernel_version > KVERSION(2,1,0)) { 135 if (kernel_version > KVERSION(2,1,0)) {
111 SET_SA_FAMILY (rt.rt_genmask, AF_INET); 136 SET_SA_FAMILY (rt.rt_genmask, AF_INET);
112 SIN_ADDR(rt.rt_genmask) = 0L; 137 SIN_ADDR(rt.rt_genmask) = 0L;
113Index: ppp-2.4.4/pppd/pppd.8 138--
114=================================================================== 1392.0.0
115--- ppp-2.4.4.orig/pppd/pppd.8 2006-06-16 10:01:23.000000000 +1000 140
116+++ ppp-2.4.4/pppd/pppd.8 2010-04-22 17:08:38.000000000 +1000
117@@ -121,6 +121,12 @@
118 This entry is removed when the PPP connection is broken. This option
119 is privileged if the \fInodefaultroute\fR option has been specified.
120 .TP
121+.B defaultroute-metric
122+Define the metric of the \fIdefaultroute\fR and only add it if there
123+is no other default route with the same metric. With the default
124+value of -1, the route is only added if there is no default route at
125+all.
126+.TP
127 .B disconnect \fIscript
128 Execute the command specified by \fIscript\fR, by passing it to a
129 shell, after
diff --git a/main/ppp/musl-fix-headers.patch b/main/ppp/musl-fix-headers.patch
index 6a43cc0fd1..d24f628968 100644
--- a/main/ppp/musl-fix-headers.patch
+++ b/main/ppp/musl-fix-headers.patch
@@ -1,5 +1,7 @@
1--- ppp-2.4.5.orig/include/net/ppp_defs.h 1diff --git a/include/net/ppp_defs.h b/include/net/ppp_defs.h
2+++ ppp-2.4.5/include/net/ppp_defs.h 2index b06eda5..dafa36c 100644
3--- a/include/net/ppp_defs.h
4+++ b/include/net/ppp_defs.h
3@@ -38,6 +38,8 @@ 5@@ -38,6 +38,8 @@
4 #ifndef _PPP_DEFS_H_ 6 #ifndef _PPP_DEFS_H_
5 #define _PPP_DEFS_H_ 7 #define _PPP_DEFS_H_
@@ -9,18 +11,23 @@
9 /* 11 /*
10 * The basic PPP frame. 12 * The basic PPP frame.
11 */ 13 */
12--- ppp-2.4.5.orig/pppd/ipv6cp.c 14diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
13+++ ppp-2.4.5/pppd/ipv6cp.c 15index a74c914..7acd2cf 100644
14@@ -151,6 +151,7 @@ 16--- a/pppd/Makefile.linux
15 */ 17+++ b/pppd/Makefile.linux
18@@ -126,7 +126,7 @@ LIBS += -lcrypt
19 endif
16 20
17 #include <stdio.h> 21 ifdef USE_LIBUTIL
18+#include <stdlib.h> 22-CFLAGS += -DHAVE_LOGWTMP=1
19 #include <string.h> 23+#CFLAGS += -DHAVE_LOGWTMP=1
20 #include <unistd.h> 24 LIBS += -lutil
21 #include <netdb.h> 25 endif
22--- ppp-2.4.5.orig/pppd/magic.h 26
23+++ ppp-2.4.5/pppd/magic.h 27diff --git a/pppd/magic.h b/pppd/magic.h
28index c81213b..305aece 100644
29--- a/pppd/magic.h
30+++ b/pppd/magic.h
24@@ -42,6 +42,8 @@ 31@@ -42,6 +42,8 @@
25 * $Id: magic.h,v 1.5 2003/06/11 23:56:26 paulus Exp $ 32 * $Id: magic.h,v 1.5 2003/06/11 23:56:26 paulus Exp $
26 */ 33 */
@@ -30,31 +37,11 @@
30 void magic_init __P((void)); /* Initialize the magic number generator */ 37 void magic_init __P((void)); /* Initialize the magic number generator */
31 u_int32_t magic __P((void)); /* Returns the next magic number */ 38 u_int32_t magic __P((void)); /* Returns the next magic number */
32 39
33--- ppp-2.4.5.orig/pppd/sys-linux.c 40diff --git a/pppd/plugins/rp-pppoe/if.c b/pppd/plugins/rp-pppoe/if.c
34+++ ppp-2.4.5/pppd/sys-linux.c 41index 91e9a57..9c0fac3 100644
35@@ -102,19 +102,11 @@ 42--- a/pppd/plugins/rp-pppoe/if.c
36 #define MAX_ADDR_LEN 7 43+++ b/pppd/plugins/rp-pppoe/if.c
37 #endif 44@@ -30,10 +30,6 @@ static char const RCSID[] =
38
39-#if __GLIBC__ >= 2
40 #include <asm/types.h> /* glibc 2 conflicts with linux/types.h */
41 #include <net/if.h>
42 #include <net/if_arp.h>
43 #include <net/route.h>
44 #include <netinet/if_ether.h>
45-#else
46-#include <linux/types.h>
47-#include <linux/if.h>
48-#include <linux/if_arp.h>
49-#include <linux/route.h>
50-#include <linux/if_ether.h>
51-#endif
52 #include <netinet/in.h>
53 #include <arpa/inet.h>
54
55--- ppp-2.4.5.orig/pppd/plugins/rp-pppoe/if.c
56+++ ppp-2.4.5/pppd/plugins/rp-pppoe/if.c
57@@ -30,10 +30,6 @@
58 #include <linux/if_packet.h> 45 #include <linux/if_packet.h>
59 #endif 46 #endif
60 47
@@ -65,18 +52,22 @@
65 #ifdef HAVE_ASM_TYPES_H 52 #ifdef HAVE_ASM_TYPES_H
66 #include <asm/types.h> 53 #include <asm/types.h>
67 #endif 54 #endif
68--- ppp-2.4.5.orig/pppd/plugins/rp-pppoe/plugin.c 55diff --git a/pppd/plugins/rp-pppoe/plugin.c b/pppd/plugins/rp-pppoe/plugin.c
69+++ ppp-2.4.5/pppd/plugins/rp-pppoe/plugin.c 56index a8c2bb4..ca34d79 100644
70@@ -46,7 +46,6 @@ 57--- a/pppd/plugins/rp-pppoe/plugin.c
58+++ b/pppd/plugins/rp-pppoe/plugin.c
59@@ -46,7 +46,6 @@ static char const RCSID[] =
71 #include <unistd.h> 60 #include <unistd.h>
72 #include <fcntl.h> 61 #include <fcntl.h>
73 #include <signal.h> 62 #include <signal.h>
74-#include <net/ethernet.h> 63-#include <net/ethernet.h>
75 #include <net/if_arp.h> 64 #include <net/if_arp.h>
76 #include <linux/ppp_defs.h> 65 #include <linux/ppp_defs.h>
77 #include <linux/if_ppp.h> 66 #include <linux/if_pppox.h>
78--- ppp-2.4.5.orig/pppd/plugins/rp-pppoe/pppoe-discovery.c 67diff --git a/pppd/plugins/rp-pppoe/pppoe-discovery.c b/pppd/plugins/rp-pppoe/pppoe-discovery.c
79+++ ppp-2.4.5/pppd/plugins/rp-pppoe/pppoe-discovery.c 68index 3d3bf4e..b5f82d3 100644
69--- a/pppd/plugins/rp-pppoe/pppoe-discovery.c
70+++ b/pppd/plugins/rp-pppoe/pppoe-discovery.c
80@@ -27,10 +27,6 @@ 71@@ -27,10 +27,6 @@
81 #include <linux/if_packet.h> 72 #include <linux/if_packet.h>
82 #endif 73 #endif
@@ -88,9 +79,20 @@
88 #ifdef HAVE_ASM_TYPES_H 79 #ifdef HAVE_ASM_TYPES_H
89 #include <asm/types.h> 80 #include <asm/types.h>
90 #endif 81 #endif
91--- ppp-2.4.5.orig/pppd/plugins/rp-pppoe/pppoe.h 82@@ -55,6 +51,8 @@ void die(int status)
92+++ ppp-2.4.5/pppd/plugins/rp-pppoe/pppoe.h 83 exit(status);
93@@ -86,18 +86,6 @@ 84 }
85
86+#define error(x...) fprintf(stderr, x)
87+
88 /* Initialize frame types to RFC 2516 values. Some broken peers apparently
89 use different frame types... sigh... */
90
91diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h
92index 9ab2eee..4d68147 100644
93--- a/pppd/plugins/rp-pppoe/pppoe.h
94+++ b/pppd/plugins/rp-pppoe/pppoe.h
95@@ -86,18 +86,6 @@ typedef unsigned long UINT32_t;
94 96
95 #include <netinet/in.h> 97 #include <netinet/in.h>
96 98
@@ -109,15 +111,27 @@
109 111
110 /* Ethernet frame types according to RFC 2516 */ 112 /* Ethernet frame types according to RFC 2516 */
111 #define ETH_PPPOE_DISCOVERY 0x8863 113 #define ETH_PPPOE_DISCOVERY 0x8863
112Only in ppp-2.4.5/pppd/plugins/rp-pppoe: pppoe-discovery 114diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c
113--- ppp-2.4.5.orig/pppd/plugins/rp-pppoe/pppoe-discovery.c 115index 6d71530..86d224e 100644
114+++ ppp-2.4.5/pppd/plugins/rp-pppoe/pppoe-discovery.c 116--- a/pppd/sys-linux.c
115@@ -51,6 +51,8 @@ 117+++ b/pppd/sys-linux.c
116 exit(status); 118@@ -102,19 +102,11 @@
117 } 119 #define MAX_ADDR_LEN 7
120 #endif
118 121
119+#define error(x...) fprintf(stderr, x) 122-#if __GLIBC__ >= 2
120+ 123 #include <asm/types.h> /* glibc 2 conflicts with linux/types.h */
121 /* Initialize frame types to RFC 2516 values. Some broken peers apparently 124 #include <net/if.h>
122 use different frame types... sigh... */ 125 #include <net/if_arp.h>
126 #include <net/route.h>
127 #include <netinet/if_ether.h>
128-#else
129-#include <linux/types.h>
130-#include <linux/if.h>
131-#include <linux/if_arp.h>
132-#include <linux/route.h>
133-#include <linux/if_ether.h>
134-#endif
135 #include <netinet/in.h>
136 #include <arpa/inet.h>
123 137