summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/ppp
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/ppp')
-rw-r--r--meta/recipes-connectivity/ppp/ppp/0001-Fix-build-with-musl.patch124
-rw-r--r--meta/recipes-connectivity/ppp/ppp/0001-ppp-Remove-unneeded-include.patch43
-rw-r--r--meta/recipes-connectivity/ppp/ppp/0001-pppd-Fix-bounds-check-in-EAP-code.patch47
-rw-r--r--meta/recipes-connectivity/ppp/ppp/copts.patch21
-rw-r--r--meta/recipes-connectivity/ppp/ppp/fix-CVE-2015-3310.patch30
-rw-r--r--meta/recipes-connectivity/ppp/ppp/makefile-remove-hard-usr-reference.patch34
-rw-r--r--meta/recipes-connectivity/ppp/ppp/makefile.patch115
-rw-r--r--meta/recipes-connectivity/ppp/ppp/pppd-resolv-varrun.patch45
-rw-r--r--meta/recipes-connectivity/ppp/ppp_2.4.8.bb103
-rw-r--r--meta/recipes-connectivity/ppp/ppp_2.5.0.bb75
10 files changed, 75 insertions, 562 deletions
diff --git a/meta/recipes-connectivity/ppp/ppp/0001-Fix-build-with-musl.patch b/meta/recipes-connectivity/ppp/ppp/0001-Fix-build-with-musl.patch
deleted file mode 100644
index 65291368bd..0000000000
--- a/meta/recipes-connectivity/ppp/ppp/0001-Fix-build-with-musl.patch
+++ /dev/null
@@ -1,124 +0,0 @@
1From e50cdaed07e51f2508f94eb1f34fe43776e4ca78 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 29 May 2015 14:57:05 -0700
4Subject: [PATCH] Fix build with musl
5
6There are several assumption about glibc
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9Upstream-Status: Pending
10---
11 include/net/ppp_defs.h | 2 ++
12 pppd/Makefile.linux | 2 +-
13 pppd/plugins/rp-pppoe/config.h | 3 ++-
14 pppd/plugins/rp-pppoe/plugin.c | 1 -
15 pppd/plugins/rp-pppoe/pppoe-discovery.c | 8 ++++----
16 pppd/plugins/rp-pppoe/pppoe.h | 2 +-
17 pppd/sys-linux.c | 3 ++-
18 7 files changed, 12 insertions(+), 9 deletions(-)
19
20diff --git a/include/net/ppp_defs.h b/include/net/ppp_defs.h
21index b06eda5..dafa36c 100644
22--- a/include/net/ppp_defs.h
23+++ b/include/net/ppp_defs.h
24@@ -38,6 +38,8 @@
25 #ifndef _PPP_DEFS_H_
26 #define _PPP_DEFS_H_
27
28+#include <sys/time.h>
29+
30 /*
31 * The basic PPP frame.
32 */
33diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
34index 4e485a1..76411bc 100644
35--- a/pppd/Makefile.linux
36+++ b/pppd/Makefile.linux
37@@ -131,7 +131,7 @@ LIBS += -lcrypt
38 endif
39
40 ifdef USE_LIBUTIL
41-CFLAGS += -DHAVE_LOGWTMP=1
42+#CFLAGS += -DHAVE_LOGWTMP=1
43 LIBS += -lutil
44 endif
45
46diff --git a/pppd/plugins/rp-pppoe/config.h b/pppd/plugins/rp-pppoe/config.h
47index a708859..4a16a88 100644
48--- a/pppd/plugins/rp-pppoe/config.h
49+++ b/pppd/plugins/rp-pppoe/config.h
50@@ -78,8 +78,9 @@
51 #define HAVE_NET_IF_ARP_H 1
52
53 /* Define if you have the <net/ethernet.h> header file. */
54+#ifdef __GLIBC__
55 #define HAVE_NET_ETHERNET_H 1
56-
57+#endif
58 /* Define if you have the <net/if.h> header file. */
59 #define HAVE_NET_IF_H 1
60
61diff --git a/pppd/plugins/rp-pppoe/plugin.c b/pppd/plugins/rp-pppoe/plugin.c
62index 44e0c31..93c0906 100644
63--- a/pppd/plugins/rp-pppoe/plugin.c
64+++ b/pppd/plugins/rp-pppoe/plugin.c
65@@ -46,7 +46,6 @@ static char const RCSID[] =
66 #include <unistd.h>
67 #include <fcntl.h>
68 #include <signal.h>
69-#include <net/ethernet.h>
70 #include <net/if_arp.h>
71 #include <linux/ppp_defs.h>
72 #include <linux/if_pppox.h>
73diff --git a/pppd/plugins/rp-pppoe/pppoe-discovery.c b/pppd/plugins/rp-pppoe/pppoe-discovery.c
74index f19c6d8..f45df2c 100644
75--- a/pppd/plugins/rp-pppoe/pppoe-discovery.c
76+++ b/pppd/plugins/rp-pppoe/pppoe-discovery.c
77@@ -29,10 +29,6 @@
78 #include <linux/if_packet.h>
79 #endif
80
81-#ifdef HAVE_NET_ETHERNET_H
82-#include <net/ethernet.h>
83-#endif
84-
85 #ifdef HAVE_ASM_TYPES_H
86 #include <asm/types.h>
87 #endif
88diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h
89index a4e7d5c..de191c8 100644
90--- a/pppd/plugins/rp-pppoe/pppoe.h
91+++ b/pppd/plugins/rp-pppoe/pppoe.h
92@@ -90,7 +90,7 @@ typedef unsigned long UINT32_t;
93 #ifdef HAVE_SYS_SOCKET_H
94 #include <sys/socket.h>
95 #endif
96-#ifndef HAVE_SYS_DLPI_H
97+#if !defined HAVE_SYS_DLPI_H && defined HAVE_NET_ETHERNET_H
98 #include <netinet/if_ether.h>
99 #endif
100 #endif
101diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c
102index a0531e9..84ee394 100644
103--- a/pppd/sys-linux.c
104+++ b/pppd/sys-linux.c
105@@ -112,7 +112,7 @@
106 #include <linux/types.h>
107 #include <linux/if.h>
108 #include <linux/if_arp.h>
109-#include <linux/route.h>
110+/* #include <linux/route.h> */
111 #include <linux/if_ether.h>
112 #endif
113 #include <netinet/in.h>
114@@ -145,6 +145,7 @@
115 #endif
116
117 #ifdef INET6
118+#include <net/route.h>
119 #ifndef _LINUX_IN6_H
120 /*
121 * This is in linux/include/net/ipv6.h.
122--
1232.17.1
124
diff --git a/meta/recipes-connectivity/ppp/ppp/0001-ppp-Remove-unneeded-include.patch b/meta/recipes-connectivity/ppp/ppp/0001-ppp-Remove-unneeded-include.patch
deleted file mode 100644
index a32f89fbc8..0000000000
--- a/meta/recipes-connectivity/ppp/ppp/0001-ppp-Remove-unneeded-include.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1commit cd90fd147844a0cfec101f1e2db7a3c59d236621
2Author: Jussi Kukkonen <jussi.kukkonen@intel.com>
3Date: Wed Dec 28 14:11:22 2016 +0200
4
5pppol2tp plugin: Remove unneeded include
6
7The include is not required and will break compile on musl libc with
8
9| In file included from pppol2tp.c:34:0:
10| /usr/include/linux/if.h:97:2: error: expected identifier before numeric constant
11| IFF_LOWER_UP = 1<<16, /* __volatile__ */
12
13Patch originally from Khem Raj.
14
15Upstream-Status: Pending [https://github.com/paulusmack/ppp/issues/73]
16Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
17
18diff --git a/pppd/plugins/pppol2tp/openl2tp.c b/pppd/plugins/pppol2tp/openl2tp.c
19index 9643b96..458316b 100644
20--- a/pppd/plugins/pppol2tp/openl2tp.c
21+++ b/pppd/plugins/pppol2tp/openl2tp.c
22@@ -47,7 +47,6 @@
23 #include <linux/if_ether.h>
24 #include <linux/ppp_defs.h>
25 #include <linux/if_ppp.h>
26-#include <linux/if_pppox.h>
27 #include <linux/if_pppol2tp.h>
28
29 #include "l2tp_event.h"
30diff --git a/pppd/plugins/pppol2tp/pppol2tp.c b/pppd/plugins/pppol2tp/pppol2tp.c
31index 0e28606..4f6d98c 100644
32--- a/pppd/plugins/pppol2tp/pppol2tp.c
33+++ b/pppd/plugins/pppol2tp/pppol2tp.c
34@@ -46,7 +46,6 @@
35 #include <linux/if_ether.h>
36 #include <linux/ppp_defs.h>
37 #include <linux/if_ppp.h>
38-#include <linux/if_pppox.h>
39 #include <linux/if_pppol2tp.h>
40
41 /* should be added to system's socket.h... */
42---
43
diff --git a/meta/recipes-connectivity/ppp/ppp/0001-pppd-Fix-bounds-check-in-EAP-code.patch b/meta/recipes-connectivity/ppp/ppp/0001-pppd-Fix-bounds-check-in-EAP-code.patch
deleted file mode 100644
index b7ba7ba643..0000000000
--- a/meta/recipes-connectivity/ppp/ppp/0001-pppd-Fix-bounds-check-in-EAP-code.patch
+++ /dev/null
@@ -1,47 +0,0 @@
1From 8d7970b8f3db727fe798b65f3377fe6787575426 Mon Sep 17 00:00:00 2001
2From: Paul Mackerras <paulus@ozlabs.org>
3Date: Mon, 3 Feb 2020 15:53:28 +1100
4Subject: [PATCH] pppd: Fix bounds check in EAP code
5
6Given that we have just checked vallen < len, it can never be the case
7that vallen >= len + sizeof(rhostname). This fixes the check so we
8actually avoid overflowing the rhostname array.
9
10Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
11Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
12
13Upstream-Status: Backport
14[https://github.com/paulusmack/ppp/commit/8d7970b8f3db727fe798b65f3377fe6787575426]
15
16CVE: CVE-2020-8597
17
18Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
19---
20 pppd/eap.c | 4 ++--
21 1 file changed, 2 insertions(+), 2 deletions(-)
22
23diff --git a/pppd/eap.c b/pppd/eap.c
24index 94407f5..1b93db0 100644
25--- a/pppd/eap.c
26+++ b/pppd/eap.c
27@@ -1420,7 +1420,7 @@ int len;
28 }
29
30 /* Not so likely to happen. */
31- if (vallen >= len + sizeof (rhostname)) {
32+ if (len - vallen >= sizeof (rhostname)) {
33 dbglog("EAP: trimming really long peer name down");
34 BCOPY(inp + vallen, rhostname, sizeof (rhostname) - 1);
35 rhostname[sizeof (rhostname) - 1] = '\0';
36@@ -1846,7 +1846,7 @@ int len;
37 }
38
39 /* Not so likely to happen. */
40- if (vallen >= len + sizeof (rhostname)) {
41+ if (len - vallen >= sizeof (rhostname)) {
42 dbglog("EAP: trimming really long peer name down");
43 BCOPY(inp + vallen, rhostname, sizeof (rhostname) - 1);
44 rhostname[sizeof (rhostname) - 1] = '\0';
45--
462.17.1
47
diff --git a/meta/recipes-connectivity/ppp/ppp/copts.patch b/meta/recipes-connectivity/ppp/ppp/copts.patch
deleted file mode 100644
index 53ff06e03e..0000000000
--- a/meta/recipes-connectivity/ppp/ppp/copts.patch
+++ /dev/null
@@ -1,21 +0,0 @@
1ppp: use build system CFLAGS when compiling
2
3Upstream-Status: Pending
4
5Override the hard-coded COPTS make variables with
6CFLAGS. Add COPTS into one Makefile that did not
7use it.
8
9Signed-off-by: Joe Slater <jslater@windriver.com>
10
11--- a/pppd/plugins/radius/Makefile.linux
12+++ b/pppd/plugins/radius/Makefile.linux
13@@ -12,7 +12,7 @@ VERSION = $(shell awk -F '"' '/VERSION/
14 INSTALL = install
15
16 PLUGIN=radius.so radattr.so radrealms.so
17-CFLAGS=-I. -I../.. -I../../../include -O2 -fPIC -DRC_LOG_FACILITY=LOG_DAEMON
18+CFLAGS=-I. -I../.. -I../../../include $(COPTS) -fPIC -DRC_LOG_FACILITY=LOG_DAEMON
19
20 # Uncomment the next line to include support for Microsoft's
21 # MS-CHAP authentication protocol.
diff --git a/meta/recipes-connectivity/ppp/ppp/fix-CVE-2015-3310.patch b/meta/recipes-connectivity/ppp/ppp/fix-CVE-2015-3310.patch
deleted file mode 100644
index c5a0be86f5..0000000000
--- a/meta/recipes-connectivity/ppp/ppp/fix-CVE-2015-3310.patch
+++ /dev/null
@@ -1,30 +0,0 @@
1ppp: Buffer overflow in radius plugin
2
3From: https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;bug=782450
4
5Upstream-Status: Backport
6CVE: CVE-2015-3310
7
8On systems with more than 65535 processes running, pppd aborts when
9sending a "start" accounting message to the RADIUS server because of a
10buffer overflow in rc_mksid.
11
12The process id is used in rc_mksid to generate a pseudo-unique string,
13assuming that the hex representation of the pid will be at most 4
14characters (FFFF). __sprintf_chk(), used when compiling with
15optimization levels greater than 0 and FORTIFY_SOURCE, detects the
16buffer overflow and makes pppd crash.
17
18The following patch fixes the problem.
19
20--- ppp-2.4.6.orig/pppd/plugins/radius/util.c
21+++ ppp-2.4.6/pppd/plugins/radius/util.c
22@@ -77,7 +77,7 @@ rc_mksid (void)
23 static unsigned short int cnt = 0;
24 sprintf (buf, "%08lX%04X%02hX",
25 (unsigned long int) time (NULL),
26- (unsigned int) getpid (),
27+ (unsigned int) getpid () % 65535,
28 cnt & 0xFF);
29 cnt++;
30 return buf;
diff --git a/meta/recipes-connectivity/ppp/ppp/makefile-remove-hard-usr-reference.patch b/meta/recipes-connectivity/ppp/ppp/makefile-remove-hard-usr-reference.patch
deleted file mode 100644
index 614a474c37..0000000000
--- a/meta/recipes-connectivity/ppp/ppp/makefile-remove-hard-usr-reference.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1From 505705d0e1b55ce3fdc10d0e5eab5488f869adb6 Mon Sep 17 00:00:00 2001
2From: Andreas Oberritter <obi@opendreambox.org>
3Date: Thu, 1 Jul 2010 14:34:12 +0800
4Subject: [PATCH] ppp: Upgraded to version 2.4.5
5
6The patch comes from OpenEmbedded.
7Rebased for ppp-2.4.5. Dongxiao Xu <dongxiao.xu@intel.com>
8
9Updated from OE-Classic to include the pcap hunk.
10Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
11
12Upstream-Status: Inappropriate [configuration]
13
14---
15 pppd/Makefile.linux | 4 ++--
16 1 file changed, 2 insertions(+), 2 deletions(-)
17
18diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
19index 4e485a1..44c4193 100644
20--- a/pppd/Makefile.linux
21+++ b/pppd/Makefile.linux
22@@ -188,10 +188,10 @@ LIBS += -ldl
23 endif
24
25 ifdef FILTER
26-ifneq ($(wildcard /usr/include/pcap-bpf.h),)
27+#ifneq ($(wildcard /usr/include/pcap-bpf.h),)
28 LIBS += -lpcap
29 CFLAGS += -DPPP_FILTER
30-endif
31+#endif
32 endif
33
34 ifdef HAVE_INET6
diff --git a/meta/recipes-connectivity/ppp/ppp/makefile.patch b/meta/recipes-connectivity/ppp/ppp/makefile.patch
deleted file mode 100644
index 25b8ded441..0000000000
--- a/meta/recipes-connectivity/ppp/ppp/makefile.patch
+++ /dev/null
@@ -1,115 +0,0 @@
1From f7fb1d1abfa6d208fb40fca1602e0c488108f1b5 Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard@openedhand.com>
3Date: Wed, 31 Aug 2005 10:45:47 +0000
4Subject: [PATCH] Initial population
5
6The patch comes from OpenEmbedded
7Rebased for ppp-2.4.5. Dongxiao Xu <dongxiao.xu@intel.com>
8
9Upstream-Status: Inappropriate [configuration]
10
11---
12 chat/Makefile.linux | 2 +-
13 pppd/Makefile.linux | 4 ++--
14 pppd/plugins/radius/Makefile.linux | 10 +++++-----
15 pppd/plugins/rp-pppoe/Makefile.linux | 4 ++--
16 pppdump/Makefile.linux | 2 +-
17 pppstats/Makefile.linux | 2 +-
18 6 files changed, 12 insertions(+), 12 deletions(-)
19
20diff --git a/chat/Makefile.linux b/chat/Makefile.linux
21index 0732ec8..f082dab 100644
22--- a/chat/Makefile.linux
23+++ b/chat/Makefile.linux
24@@ -25,7 +25,7 @@ chat.o: chat.c
25
26 install: chat
27 mkdir -p $(BINDIR) $(MANDIR)
28- $(INSTALL) -s -c chat $(BINDIR)
29+ $(INSTALL) -c chat $(BINDIR)
30 $(INSTALL) -c -m 644 chat.8 $(MANDIR)
31
32 clean:
33diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
34index 9664f70..4e485a1 100644
35--- a/pppd/Makefile.linux
36+++ b/pppd/Makefile.linux
37@@ -107,7 +107,7 @@ ifdef USE_SRP
38 CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
39 LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto
40 TARGETS += srp-entry
41-EXTRAINSTALL = $(INSTALL) -s -c -m 555 srp-entry $(BINDIR)/srp-entry
42+EXTRAINSTALL = $(INSTALL) -c -m 555 srp-entry $(BINDIR)/srp-entry
43 MANPAGES += srp-entry.8
44 EXTRACLEAN += srp-entry.o
45 NEEDDES=y
46@@ -219,7 +219,7 @@ all: $(TARGETS)
47 install: pppd
48 mkdir -p $(BINDIR) $(MANDIR)
49 $(EXTRAINSTALL)
50- $(INSTALL) -s -c -m 555 pppd $(BINDIR)/pppd
51+ $(INSTALL) -c -m 555 pppd $(BINDIR)/pppd
52 if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
53 chmod o-rx,u+s $(BINDIR)/pppd; fi
54 $(INSTALL) -c -m 444 pppd.8 $(MANDIR)
55diff --git a/pppd/plugins/radius/Makefile.linux b/pppd/plugins/radius/Makefile.linux
56index e702263..af57ae3 100644
57--- a/pppd/plugins/radius/Makefile.linux
58+++ b/pppd/plugins/radius/Makefile.linux
59@@ -36,11 +36,11 @@ all: $(PLUGIN)
60
61 install: all
62 $(INSTALL) -d -m 755 $(LIBDIR)
63- $(INSTALL) -s -c -m 755 radius.so $(LIBDIR)
64- $(INSTALL) -s -c -m 755 radattr.so $(LIBDIR)
65- $(INSTALL) -s -c -m 755 radrealms.so $(LIBDIR)
66- $(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR)
67- $(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)
68+ $(INSTALL) -c -m 755 radius.so $(LIBDIR)
69+ $(INSTALL) -c -m 755 radattr.so $(LIBDIR)
70+ $(INSTALL) -c -m 755 radrealms.so $(LIBDIR)
71+ $(INSTALL) -m 444 pppd-radius.8 $(MANDIR)
72+ $(INSTALL) -m 444 pppd-radattr.8 $(MANDIR)
73
74 radius.so: radius.o libradiusclient.a
75 $(CC) $(LDFLAGS) -o radius.so -shared radius.o libradiusclient.a
76diff --git a/pppd/plugins/rp-pppoe/Makefile.linux b/pppd/plugins/rp-pppoe/Makefile.linux
77index 749ccc2..2c93f4a 100644
78--- a/pppd/plugins/rp-pppoe/Makefile.linux
79+++ b/pppd/plugins/rp-pppoe/Makefile.linux
80@@ -43,9 +43,9 @@ rp-pppoe.so: plugin.o discovery.o if.o common.o
81
82 install: all
83 $(INSTALL) -d -m 755 $(LIBDIR)
84- $(INSTALL) -s -c -m 4550 rp-pppoe.so $(LIBDIR)
85+ $(INSTALL) -c -m 4550 rp-pppoe.so $(LIBDIR)
86 $(INSTALL) -d -m 755 $(BINDIR)
87- $(INSTALL) -s -c -m 555 pppoe-discovery $(BINDIR)
88+ $(INSTALL) -c -m 555 pppoe-discovery $(BINDIR)
89
90 clean:
91 rm -f *.o *.so pppoe-discovery
92diff --git a/pppdump/Makefile.linux b/pppdump/Makefile.linux
93index cdf7ac4..0457561 100644
94--- a/pppdump/Makefile.linux
95+++ b/pppdump/Makefile.linux
96@@ -17,5 +17,5 @@ clean:
97
98 install:
99 mkdir -p $(BINDIR) $(MANDIR)
100- $(INSTALL) -s -c pppdump $(BINDIR)
101+ $(INSTALL) -c pppdump $(BINDIR)
102 $(INSTALL) -c -m 444 pppdump.8 $(MANDIR)
103diff --git a/pppstats/Makefile.linux b/pppstats/Makefile.linux
104index 71afbe6..1819370 100644
105--- a/pppstats/Makefile.linux
106+++ b/pppstats/Makefile.linux
107@@ -22,7 +22,7 @@ all: pppstats
108
109 install: pppstats
110 -mkdir -p $(MANDIR)
111- $(INSTALL) -s -c pppstats $(BINDIR)
112+ $(INSTALL) -c pppstats $(BINDIR)
113 $(INSTALL) -c -m 444 pppstats.8 $(MANDIR)
114
115 pppstats: $(PPPSTATSRCS)
diff --git a/meta/recipes-connectivity/ppp/ppp/pppd-resolv-varrun.patch b/meta/recipes-connectivity/ppp/ppp/pppd-resolv-varrun.patch
deleted file mode 100644
index a72414ff8a..0000000000
--- a/meta/recipes-connectivity/ppp/ppp/pppd-resolv-varrun.patch
+++ /dev/null
@@ -1,45 +0,0 @@
1The patch comes from OpenEmbedded
2Rebased for ppp-2.4.5. Dongxiao Xu <dongxiao.xu@intel.com>
3
4Upstream-Status: Inappropriate [embedded specific]
5
6diff -ruN ppp-2.4.5-orig/pppd/ipcp.c ppp-2.4.5/pppd/ipcp.c
7--- ppp-2.4.5-orig/pppd/ipcp.c 2010-06-30 15:51:12.050166398 +0800
8+++ ppp-2.4.5/pppd/ipcp.c 2010-06-30 17:02:33.930393283 +0800
9@@ -55,6 +55,8 @@
10 #include <sys/socket.h>
11 #include <netinet/in.h>
12 #include <arpa/inet.h>
13+#include <sys/stat.h>
14+#include <unistd.h>
15
16 #include "pppd.h"
17 #include "fsm.h"
18@@ -2095,6 +2097,14 @@
19 u_int32_t peerdns1, peerdns2;
20 {
21 FILE *f;
22+ struct stat dirinfo;
23+
24+ if(stat(_PATH_OUTDIR, &dirinfo)) {
25+ if(mkdir(_PATH_OUTDIR, 0775)) {
26+ error("Failed to create directory %s: %m", _PATH_OUTDIR);
27+ return;
28+ }
29+ }
30
31 f = fopen(_PATH_RESOLV, "w");
32 if (f == NULL) {
33diff -ruN ppp-2.4.5-orig/pppd/pathnames.h ppp-2.4.5/pppd/pathnames.h
34--- ppp-2.4.5-orig/pppd/pathnames.h 2010-06-30 15:51:12.043682063 +0800
35+++ ppp-2.4.5/pppd/pathnames.h 2010-06-30 17:03:20.594371055 +0800
36@@ -30,7 +30,8 @@
37 #define _PATH_TTYOPT _ROOT_PATH "/etc/ppp/options."
38 #define _PATH_CONNERRS _ROOT_PATH "/etc/ppp/connect-errors"
39 #define _PATH_PEERFILES _ROOT_PATH "/etc/ppp/peers/"
40-#define _PATH_RESOLV _ROOT_PATH "/etc/ppp/resolv.conf"
41+#define _PATH_OUTDIR _ROOT_PATH _PATH_VARRUN "/ppp"
42+#define _PATH_RESOLV _PATH_OUTDIR "/resolv.conf"
43
44 #define _PATH_USEROPT ".ppprc"
45 #define _PATH_PSEUDONYM ".ppp_pseudonym"
diff --git a/meta/recipes-connectivity/ppp/ppp_2.4.8.bb b/meta/recipes-connectivity/ppp/ppp_2.4.8.bb
deleted file mode 100644
index f9c60d6bad..0000000000
--- a/meta/recipes-connectivity/ppp/ppp_2.4.8.bb
+++ /dev/null
@@ -1,103 +0,0 @@
1SUMMARY = "Point-to-Point Protocol (PPP) support"
2DESCRIPTION = "ppp (Paul's PPP Package) is an open source package which implements \
3the Point-to-Point Protocol (PPP) on Linux and Solaris systems."
4SECTION = "console/network"
5HOMEPAGE = "http://samba.org/ppp/"
6BUGTRACKER = "http://ppp.samba.org/cgi-bin/ppp-bugs"
7DEPENDS = "libpcap openssl virtual/crypt"
8LICENSE = "BSD & GPLv2+ & LGPLv2+ & PD"
9LIC_FILES_CHKSUM = "file://pppd/ccp.c;beginline=1;endline=29;md5=e2c43fe6e81ff77d87dc9c290a424dea \
10 file://pppd/plugins/passprompt.c;beginline=1;endline=10;md5=3bcbcdbf0e369c9a3e0b8c8275b065d8 \
11 file://pppd/tdb.c;beginline=1;endline=27;md5=4ca3a9991b011038d085d6675ae7c4e6 \
12 file://chat/chat.c;beginline=1;endline=15;md5=0d374b8545ee5c62d7aff1acbd38add2"
13
14SRC_URI = "https://download.samba.org/pub/${BPN}/${BP}.tar.gz \
15 file://makefile.patch \
16 file://pppd-resolv-varrun.patch \
17 file://makefile-remove-hard-usr-reference.patch \
18 file://pon \
19 file://poff \
20 file://init \
21 file://ip-up \
22 file://ip-down \
23 file://08setupdns \
24 file://92removedns \
25 file://copts.patch \
26 file://pap \
27 file://ppp_on_boot \
28 file://provider \
29 file://ppp@.service \
30 file://fix-CVE-2015-3310.patch \
31 file://0001-ppp-Remove-unneeded-include.patch \
32 file://0001-pppd-Fix-bounds-check-in-EAP-code.patch \
33 "
34
35SRC_URI_append_libc-musl = "\
36 file://0001-Fix-build-with-musl.patch \
37"
38SRC_URI[md5sum] = "2ca8342b9804be15103fd3f687af701c"
39SRC_URI[sha256sum] = "f6bf89beae26b2943dff8f1003533d6a5a4909a0fa6edfbec44fe039bbe61bc6"
40
41inherit autotools-brokensep systemd
42
43TARGET_CC_ARCH += " ${LDFLAGS}"
44EXTRA_OEMAKE = "STRIPPROG=${STRIP} MANDIR=${D}${datadir}/man/man8 INCDIR=${D}${includedir} LIBDIR=${D}${libdir}/pppd/${PV} BINDIR=${D}${sbindir}"
45EXTRA_OECONF = "--disable-strip"
46
47# Package Makefile computes CFLAGS, referencing COPTS.
48# Typically hard-coded to '-O2 -g' in the Makefile's.
49#
50EXTRA_OEMAKE += ' COPTS="${CFLAGS} -I${STAGING_INCDIR}/openssl -I${S}/include"'
51
52do_configure () {
53 oe_runconf
54}
55
56do_install_append () {
57 make install-etcppp ETCDIR=${D}/${sysconfdir}/ppp
58 mkdir -p ${D}${bindir}/ ${D}${sysconfdir}/init.d
59 mkdir -p ${D}${sysconfdir}/ppp/ip-up.d/
60 mkdir -p ${D}${sysconfdir}/ppp/ip-down.d/
61 install -m 0755 ${WORKDIR}/pon ${D}${bindir}/pon
62 install -m 0755 ${WORKDIR}/poff ${D}${bindir}/poff
63 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/ppp
64 install -m 0755 ${WORKDIR}/ip-up ${D}${sysconfdir}/ppp/
65 install -m 0755 ${WORKDIR}/ip-down ${D}${sysconfdir}/ppp/
66 install -m 0755 ${WORKDIR}/08setupdns ${D}${sysconfdir}/ppp/ip-up.d/
67 install -m 0755 ${WORKDIR}/92removedns ${D}${sysconfdir}/ppp/ip-down.d/
68 mkdir -p ${D}${sysconfdir}/chatscripts
69 mkdir -p ${D}${sysconfdir}/ppp/peers
70 install -m 0755 ${WORKDIR}/pap ${D}${sysconfdir}/chatscripts
71 install -m 0755 ${WORKDIR}/ppp_on_boot ${D}${sysconfdir}/ppp/ppp_on_boot
72 install -m 0755 ${WORKDIR}/provider ${D}${sysconfdir}/ppp/peers/provider
73 install -d ${D}${systemd_unitdir}/system
74 install -m 0644 ${WORKDIR}/ppp@.service ${D}${systemd_unitdir}/system
75 sed -i -e 's,@SBINDIR@,${sbindir},g' \
76 ${D}${systemd_unitdir}/system/ppp@.service
77 rm -rf ${D}/${mandir}/man8/man8
78 chmod u+s ${D}${sbindir}/pppd
79}
80
81do_install_append_libc-musl () {
82 install -Dm 0644 ${S}/include/net/ppp_defs.h ${D}${includedir}/net/ppp_defs.h
83}
84
85CONFFILES_${PN} = "${sysconfdir}/ppp/pap-secrets ${sysconfdir}/ppp/chap-secrets ${sysconfdir}/ppp/options"
86PACKAGES =+ "${PN}-oa ${PN}-oe ${PN}-radius ${PN}-winbind ${PN}-minconn ${PN}-password ${PN}-l2tp ${PN}-tools"
87FILES_${PN} = "${sysconfdir} ${bindir} ${sbindir}/chat ${sbindir}/pppd ${systemd_unitdir}/system/ppp@.service"
88FILES_${PN}-oa = "${libdir}/pppd/${PV}/pppoatm.so"
89FILES_${PN}-oe = "${sbindir}/pppoe-discovery ${libdir}/pppd/${PV}/rp-pppoe.so"
90FILES_${PN}-radius = "${libdir}/pppd/${PV}/radius.so ${libdir}/pppd/${PV}/radattr.so ${libdir}/pppd/${PV}/radrealms.so"
91FILES_${PN}-winbind = "${libdir}/pppd/${PV}/winbind.so"
92FILES_${PN}-minconn = "${libdir}/pppd/${PV}/minconn.so"
93FILES_${PN}-password = "${libdir}/pppd/${PV}/pass*.so"
94FILES_${PN}-l2tp = "${libdir}/pppd/${PV}/*l2tp.so"
95FILES_${PN}-tools = "${sbindir}/pppstats ${sbindir}/pppdump"
96SUMMARY_${PN}-oa = "Plugin for PPP for PPP-over-ATM support"
97SUMMARY_${PN}-oe = "Plugin for PPP for PPP-over-Ethernet support"
98SUMMARY_${PN}-radius = "Plugin for PPP for RADIUS support"
99SUMMARY_${PN}-winbind = "Plugin for PPP to authenticate against Samba or Windows"
100SUMMARY_${PN}-minconn = "Plugin for PPP to set a delay before the idle timeout applies"
101SUMMARY_${PN}-password = "Plugin for PPP to get passwords via a pipe"
102SUMMARY_${PN}-l2tp = "Plugin for PPP for l2tp support"
103SUMMARY_${PN}-tools = "Additional tools for the PPP package"
diff --git a/meta/recipes-connectivity/ppp/ppp_2.5.0.bb b/meta/recipes-connectivity/ppp/ppp_2.5.0.bb
new file mode 100644
index 0000000000..4b052f8ed9
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp_2.5.0.bb
@@ -0,0 +1,75 @@
1SUMMARY = "Point-to-Point Protocol (PPP) support"
2DESCRIPTION = "ppp (Paul's PPP Package) is an open source package which implements \
3the Point-to-Point Protocol (PPP) on Linux and Solaris systems."
4SECTION = "console/network"
5HOMEPAGE = "http://samba.org/ppp/"
6BUGTRACKER = "http://ppp.samba.org/cgi-bin/ppp-bugs"
7DEPENDS = "libpcap openssl virtual/crypt"
8LICENSE = "BSD-3-Clause & BSD-3-Clause-Attribution & GPL-2.0-or-later & LGPL-2.0-or-later & PD"
9LIC_FILES_CHKSUM = "file://pppd/ccp.c;beginline=1;endline=29;md5=e2c43fe6e81ff77d87dc9c290a424dea \
10 file://pppd/plugins/passprompt.c;beginline=1;endline=10;md5=3bcbcdbf0e369c9a3e0b8c8275b065d8 \
11 file://pppd/tdb.c;beginline=1;endline=27;md5=4ca3a9991b011038d085d6675ae7c4e6 \
12 file://chat/chat.c;beginline=1;endline=15;md5=0d374b8545ee5c62d7aff1acbd38add2"
13
14SRC_URI = "https://download.samba.org/pub/${BPN}/${BP}.tar.gz \
15 file://pon \
16 file://poff \
17 file://init \
18 file://ip-up \
19 file://ip-down \
20 file://08setupdns \
21 file://92removedns \
22 file://pap \
23 file://ppp_on_boot \
24 file://provider \
25 file://ppp@.service \
26 "
27
28SRC_URI[sha256sum] = "5cae0e8075f8a1755f16ca290eb44e6b3545d3f292af4da65ecffe897de636ff"
29
30inherit autotools systemd
31
32EXTRA_OECONF += "--with-openssl=${STAGING_EXECPREFIXDIR}"
33
34do_install:append () {
35 mkdir -p ${D}${bindir}/ ${D}${sysconfdir}/init.d
36 mkdir -p ${D}${sysconfdir}/ppp/ip-up.d/
37 mkdir -p ${D}${sysconfdir}/ppp/ip-down.d/
38 install -m 0755 ${WORKDIR}/pon ${D}${bindir}/pon
39 install -m 0755 ${WORKDIR}/poff ${D}${bindir}/poff
40 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/ppp
41 install -m 0755 ${WORKDIR}/ip-up ${D}${sysconfdir}/ppp/
42 install -m 0755 ${WORKDIR}/ip-down ${D}${sysconfdir}/ppp/
43 install -m 0755 ${WORKDIR}/08setupdns ${D}${sysconfdir}/ppp/ip-up.d/
44 install -m 0755 ${WORKDIR}/92removedns ${D}${sysconfdir}/ppp/ip-down.d/
45 mkdir -p ${D}${sysconfdir}/chatscripts
46 mkdir -p ${D}${sysconfdir}/ppp/peers
47 install -m 0755 ${WORKDIR}/pap ${D}${sysconfdir}/chatscripts
48 install -m 0755 ${WORKDIR}/ppp_on_boot ${D}${sysconfdir}/ppp/ppp_on_boot
49 install -m 0755 ${WORKDIR}/provider ${D}${sysconfdir}/ppp/peers/provider
50 install -d ${D}${systemd_system_unitdir}
51 install -m 0644 ${WORKDIR}/ppp@.service ${D}${systemd_system_unitdir}
52 sed -i -e 's,@SBINDIR@,${sbindir},g' \
53 ${D}${systemd_system_unitdir}/ppp@.service
54}
55
56CONFFILES:${PN} = "${sysconfdir}/ppp/pap-secrets ${sysconfdir}/ppp/chap-secrets ${sysconfdir}/ppp/options"
57PACKAGES =+ "${PN}-oa ${PN}-oe ${PN}-radius ${PN}-winbind ${PN}-minconn ${PN}-password ${PN}-l2tp ${PN}-tools"
58FILES:${PN} = "${sysconfdir} ${bindir} ${sbindir}/chat ${sbindir}/pppd ${systemd_system_unitdir}/ppp@.service"
59FILES:${PN}-oa = "${libdir}/pppd/${PV}/pppoatm.so"
60FILES:${PN}-oe = "${sbindir}/pppoe-discovery ${libdir}/pppd/${PV}/*pppoe.so"
61FILES:${PN}-radius = "${libdir}/pppd/${PV}/radius.so ${libdir}/pppd/${PV}/radattr.so ${libdir}/pppd/${PV}/radrealms.so"
62FILES:${PN}-winbind = "${libdir}/pppd/${PV}/winbind.so"
63FILES:${PN}-minconn = "${libdir}/pppd/${PV}/minconn.so"
64FILES:${PN}-password = "${libdir}/pppd/${PV}/pass*.so"
65FILES:${PN}-l2tp = "${libdir}/pppd/${PV}/*l2tp.so"
66FILES:${PN}-tools = "${sbindir}/pppstats ${sbindir}/pppdump"
67SUMMARY:${PN}-oa = "Plugin for PPP for PPP-over-ATM support"
68SUMMARY:${PN}-oe = "Plugin for PPP for PPP-over-Ethernet support"
69SUMMARY:${PN}-radius = "Plugin for PPP for RADIUS support"
70SUMMARY:${PN}-winbind = "Plugin for PPP to authenticate against Samba or Windows"
71SUMMARY:${PN}-minconn = "Plugin for PPP to set a delay before the idle timeout applies"
72SUMMARY:${PN}-password = "Plugin for PPP to get passwords via a pipe"
73SUMMARY:${PN}-l2tp = "Plugin for PPP for l2tp support"
74SUMMARY:${PN}-tools = "Additional tools for the PPP package"
75