diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2020-05-31 17:52:33 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-06-04 13:27:30 +0100 |
commit | 79400a1042e24d38752ffdc1288aefe3415c6c11 (patch) | |
tree | 610d44ed42d2a0fb6fc717fdf60db05ec3c11884 /meta/recipes-connectivity | |
parent | 83ba71a3057dba1d8ac2f9c15663c9ba9ad833f4 (diff) | |
download | poky-79400a1042e24d38752ffdc1288aefe3415c6c11.tar.gz |
ppp: update 2.4.7 -> 2.4.8
Drop patches:
0001-ppp-Fix-compilation-errors-in-Makefile.patch - issue fixed upstream
0001-pppoe-include-netinet-in.h-before-linux-in.h.patch - backport
cifdefroute.patch - superseded by new default route metric option
ppp-2.4.7-DES-openssl.patch - openssl support added upstream
(From OE-Core rev: 406895464980f62744193841651c436c6e463a37)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity')
-rw-r--r-- | meta/recipes-connectivity/ppp/ppp/0001-Fix-build-with-musl.patch | 69 | ||||
-rw-r--r-- | meta/recipes-connectivity/ppp/ppp/0001-ppp-Fix-compilation-errors-in-Makefile.patch | 30 | ||||
-rw-r--r-- | meta/recipes-connectivity/ppp/ppp/0001-pppoe-include-netinet-in.h-before-linux-in.h.patch | 54 | ||||
-rw-r--r-- | meta/recipes-connectivity/ppp/ppp/cifdefroute.patch | 297 | ||||
-rw-r--r-- | meta/recipes-connectivity/ppp/ppp/makefile-remove-hard-usr-reference.patch | 32 | ||||
-rw-r--r-- | meta/recipes-connectivity/ppp/ppp/makefile.patch | 72 | ||||
-rw-r--r-- | meta/recipes-connectivity/ppp/ppp/ppp-2.4.7-DES-openssl.patch | 84 | ||||
-rw-r--r-- | meta/recipes-connectivity/ppp/ppp_2.4.8.bb (renamed from meta/recipes-connectivity/ppp/ppp_2.4.7.bb) | 10 |
8 files changed, 78 insertions, 570 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 index 763e374488..65291368bd 100644 --- a/meta/recipes-connectivity/ppp/ppp/0001-Fix-build-with-musl.patch +++ b/meta/recipes-connectivity/ppp/ppp/0001-Fix-build-with-musl.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 52a1e41d7541b2c936285844c59bd1be21797860 Mon Sep 17 00:00:00 2001 | 1 | From e50cdaed07e51f2508f94eb1f34fe43776e4ca78 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Fri, 29 May 2015 14:57:05 -0700 | 3 | Date: Fri, 29 May 2015 14:57:05 -0700 |
4 | Subject: [PATCH] Fix build with musl | 4 | Subject: [PATCH] Fix build with musl |
@@ -6,18 +6,16 @@ Subject: [PATCH] Fix build with musl | |||
6 | There are several assumption about glibc | 6 | There are several assumption about glibc |
7 | 7 | ||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
9 | --- | ||
10 | Upstream-Status: Pending | 9 | Upstream-Status: Pending |
11 | 10 | --- | |
12 | include/net/ppp_defs.h | 2 ++ | 11 | include/net/ppp_defs.h | 2 ++ |
13 | pppd/Makefile.linux | 2 +- | 12 | pppd/Makefile.linux | 2 +- |
14 | pppd/magic.h | 6 +++--- | 13 | pppd/plugins/rp-pppoe/config.h | 3 ++- |
15 | pppd/plugins/rp-pppoe/config.h | 5 ++++- | ||
16 | pppd/plugins/rp-pppoe/plugin.c | 1 - | 14 | pppd/plugins/rp-pppoe/plugin.c | 1 - |
17 | pppd/plugins/rp-pppoe/pppoe-discovery.c | 8 ++++---- | 15 | pppd/plugins/rp-pppoe/pppoe-discovery.c | 8 ++++---- |
18 | pppd/plugins/rp-pppoe/pppoe.h | 2 +- | 16 | pppd/plugins/rp-pppoe/pppoe.h | 2 +- |
19 | pppd/sys-linux.c | 3 ++- | 17 | pppd/sys-linux.c | 3 ++- |
20 | 8 files changed, 17 insertions(+), 12 deletions(-) | 18 | 7 files changed, 12 insertions(+), 9 deletions(-) |
21 | 19 | ||
22 | diff --git a/include/net/ppp_defs.h b/include/net/ppp_defs.h | 20 | diff --git a/include/net/ppp_defs.h b/include/net/ppp_defs.h |
23 | index b06eda5..dafa36c 100644 | 21 | index b06eda5..dafa36c 100644 |
@@ -33,11 +31,11 @@ index b06eda5..dafa36c 100644 | |||
33 | * The basic PPP frame. | 31 | * The basic PPP frame. |
34 | */ | 32 | */ |
35 | diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux | 33 | diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux |
36 | index 8ab2102..d7e2564 100644 | 34 | index 4e485a1..76411bc 100644 |
37 | --- a/pppd/Makefile.linux | 35 | --- a/pppd/Makefile.linux |
38 | +++ b/pppd/Makefile.linux | 36 | +++ b/pppd/Makefile.linux |
39 | @@ -126,7 +126,7 @@ LIBS += -lcrypt | 37 | @@ -131,7 +131,7 @@ LIBS += -lcrypt |
40 | #endif | 38 | endif |
41 | 39 | ||
42 | ifdef USE_LIBUTIL | 40 | ifdef USE_LIBUTIL |
43 | -CFLAGS += -DHAVE_LOGWTMP=1 | 41 | -CFLAGS += -DHAVE_LOGWTMP=1 |
@@ -45,24 +43,8 @@ index 8ab2102..d7e2564 100644 | |||
45 | LIBS += -lutil | 43 | LIBS += -lutil |
46 | endif | 44 | endif |
47 | 45 | ||
48 | diff --git a/pppd/magic.h b/pppd/magic.h | ||
49 | index c81213b..9d399e3 100644 | ||
50 | --- a/pppd/magic.h | ||
51 | +++ b/pppd/magic.h | ||
52 | @@ -42,8 +42,8 @@ | ||
53 | * $Id: magic.h,v 1.5 2003/06/11 23:56:26 paulus Exp $ | ||
54 | */ | ||
55 | |||
56 | -void magic_init __P((void)); /* Initialize the magic number generator */ | ||
57 | -u_int32_t magic __P((void)); /* Returns the next magic number */ | ||
58 | +void magic_init (void); /* Initialize the magic number generator */ | ||
59 | +u_int32_t magic (void); /* Returns the next magic number */ | ||
60 | |||
61 | /* Fill buffer with random bytes */ | ||
62 | -void random_bytes __P((unsigned char *buf, int len)); | ||
63 | +void random_bytes (unsigned char *buf, int len); | ||
64 | diff --git a/pppd/plugins/rp-pppoe/config.h b/pppd/plugins/rp-pppoe/config.h | 46 | diff --git a/pppd/plugins/rp-pppoe/config.h b/pppd/plugins/rp-pppoe/config.h |
65 | index 5703087..fff032e 100644 | 47 | index a708859..4a16a88 100644 |
66 | --- a/pppd/plugins/rp-pppoe/config.h | 48 | --- a/pppd/plugins/rp-pppoe/config.h |
67 | +++ b/pppd/plugins/rp-pppoe/config.h | 49 | +++ b/pppd/plugins/rp-pppoe/config.h |
68 | @@ -78,8 +78,9 @@ | 50 | @@ -78,8 +78,9 @@ |
@@ -76,18 +58,8 @@ index 5703087..fff032e 100644 | |||
76 | /* Define if you have the <net/if.h> header file. */ | 58 | /* Define if you have the <net/if.h> header file. */ |
77 | #define HAVE_NET_IF_H 1 | 59 | #define HAVE_NET_IF_H 1 |
78 | 60 | ||
79 | @@ -102,7 +103,9 @@ | ||
80 | #define HAVE_NETPACKET_PACKET_H 1 | ||
81 | |||
82 | /* Define if you have the <sys/cdefs.h> header file. */ | ||
83 | +#ifdef __GLIBC__ | ||
84 | #define HAVE_SYS_CDEFS_H 1 | ||
85 | +#endif | ||
86 | |||
87 | /* Define if you have the <sys/dlpi.h> header file. */ | ||
88 | /* #undef HAVE_SYS_DLPI_H */ | ||
89 | diff --git a/pppd/plugins/rp-pppoe/plugin.c b/pppd/plugins/rp-pppoe/plugin.c | 61 | diff --git a/pppd/plugins/rp-pppoe/plugin.c b/pppd/plugins/rp-pppoe/plugin.c |
90 | index a8c2bb4..ca34d79 100644 | 62 | index 44e0c31..93c0906 100644 |
91 | --- a/pppd/plugins/rp-pppoe/plugin.c | 63 | --- a/pppd/plugins/rp-pppoe/plugin.c |
92 | +++ b/pppd/plugins/rp-pppoe/plugin.c | 64 | +++ b/pppd/plugins/rp-pppoe/plugin.c |
93 | @@ -46,7 +46,6 @@ static char const RCSID[] = | 65 | @@ -46,7 +46,6 @@ static char const RCSID[] = |
@@ -99,10 +71,10 @@ index a8c2bb4..ca34d79 100644 | |||
99 | #include <linux/ppp_defs.h> | 71 | #include <linux/ppp_defs.h> |
100 | #include <linux/if_pppox.h> | 72 | #include <linux/if_pppox.h> |
101 | diff --git a/pppd/plugins/rp-pppoe/pppoe-discovery.c b/pppd/plugins/rp-pppoe/pppoe-discovery.c | 73 | diff --git a/pppd/plugins/rp-pppoe/pppoe-discovery.c b/pppd/plugins/rp-pppoe/pppoe-discovery.c |
102 | index 3d3bf4e..d42f619 100644 | 74 | index f19c6d8..f45df2c 100644 |
103 | --- a/pppd/plugins/rp-pppoe/pppoe-discovery.c | 75 | --- a/pppd/plugins/rp-pppoe/pppoe-discovery.c |
104 | +++ b/pppd/plugins/rp-pppoe/pppoe-discovery.c | 76 | +++ b/pppd/plugins/rp-pppoe/pppoe-discovery.c |
105 | @@ -27,10 +27,6 @@ | 77 | @@ -29,10 +29,6 @@ |
106 | #include <linux/if_packet.h> | 78 | #include <linux/if_packet.h> |
107 | #endif | 79 | #endif |
108 | 80 | ||
@@ -113,22 +85,11 @@ index 3d3bf4e..d42f619 100644 | |||
113 | #ifdef HAVE_ASM_TYPES_H | 85 | #ifdef HAVE_ASM_TYPES_H |
114 | #include <asm/types.h> | 86 | #include <asm/types.h> |
115 | #endif | 87 | #endif |
116 | @@ -47,6 +43,10 @@ | ||
117 | #include <net/if_arp.h> | ||
118 | #endif | ||
119 | |||
120 | +#ifndef __GLIBC__ | ||
121 | +#define error(x...) fprintf(stderr, x) | ||
122 | +#endif | ||
123 | + | ||
124 | char *xstrdup(const char *s); | ||
125 | void usage(void); | ||
126 | |||
127 | diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h | 88 | diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h |
128 | index 9ab2eee..75b9004 100644 | 89 | index a4e7d5c..de191c8 100644 |
129 | --- a/pppd/plugins/rp-pppoe/pppoe.h | 90 | --- a/pppd/plugins/rp-pppoe/pppoe.h |
130 | +++ b/pppd/plugins/rp-pppoe/pppoe.h | 91 | +++ b/pppd/plugins/rp-pppoe/pppoe.h |
131 | @@ -92,7 +92,7 @@ typedef unsigned long UINT32_t; | 92 | @@ -90,7 +90,7 @@ typedef unsigned long UINT32_t; |
132 | #ifdef HAVE_SYS_SOCKET_H | 93 | #ifdef HAVE_SYS_SOCKET_H |
133 | #include <sys/socket.h> | 94 | #include <sys/socket.h> |
134 | #endif | 95 | #endif |
@@ -138,7 +99,7 @@ index 9ab2eee..75b9004 100644 | |||
138 | #endif | 99 | #endif |
139 | #endif | 100 | #endif |
140 | diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c | 101 | diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c |
141 | index a105505..49b0273 100644 | 102 | index a0531e9..84ee394 100644 |
142 | --- a/pppd/sys-linux.c | 103 | --- a/pppd/sys-linux.c |
143 | +++ b/pppd/sys-linux.c | 104 | +++ b/pppd/sys-linux.c |
144 | @@ -112,7 +112,7 @@ | 105 | @@ -112,7 +112,7 @@ |
@@ -159,5 +120,5 @@ index a105505..49b0273 100644 | |||
159 | /* | 120 | /* |
160 | * This is in linux/include/net/ipv6.h. | 121 | * This is in linux/include/net/ipv6.h. |
161 | -- | 122 | -- |
162 | 2.1.4 | 123 | 2.17.1 |
163 | 124 | ||
diff --git a/meta/recipes-connectivity/ppp/ppp/0001-ppp-Fix-compilation-errors-in-Makefile.patch b/meta/recipes-connectivity/ppp/ppp/0001-ppp-Fix-compilation-errors-in-Makefile.patch deleted file mode 100644 index ea4969b366..0000000000 --- a/meta/recipes-connectivity/ppp/ppp/0001-ppp-Fix-compilation-errors-in-Makefile.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From ba0f6058d1f25b2b60fc31ab2656bf12a71ffdab Mon Sep 17 00:00:00 2001 | ||
2 | From: Lu Chong <Chong.Lu@windriver.com> | ||
3 | Date: Tue, 5 Nov 2013 17:32:56 +0800 | ||
4 | Subject: [PATCH] ppp: Fix compilation errors in Makefile | ||
5 | |||
6 | Make can't exit while compilation error occurs in subdir for plugins building. | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Lu Chong <Chong.Lu@windriver.com> | ||
11 | --- | ||
12 | pppd/plugins/Makefile.linux | 1 +- | ||
13 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
14 | |||
15 | diff --git a/pppd/plugins/Makefile.linux b/pppd/plugins/Makefile.linux | ||
16 | index 0a7ec7b..2a2c15a 100644 | ||
17 | --- a/pppd/plugins/Makefile.linux | ||
18 | +++ b/pppd/plugins/Makefile.linux | ||
19 | @@ -20,7 +20,7 @@ include .depend | ||
20 | endif | ||
21 | |||
22 | all: $(PLUGINS) | ||
23 | - for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d all; done | ||
24 | + for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d all || exit 1; done | ||
25 | |||
26 | %.so: %.c | ||
27 | $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^ | ||
28 | -- | ||
29 | 1.7.9.5 | ||
30 | |||
diff --git a/meta/recipes-connectivity/ppp/ppp/0001-pppoe-include-netinet-in.h-before-linux-in.h.patch b/meta/recipes-connectivity/ppp/ppp/0001-pppoe-include-netinet-in.h-before-linux-in.h.patch deleted file mode 100644 index 9362d12648..0000000000 --- a/meta/recipes-connectivity/ppp/ppp/0001-pppoe-include-netinet-in.h-before-linux-in.h.patch +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | From 50a2997b256e0e0ef7a46fae133f56f60fce539c Mon Sep 17 00:00:00 2001 | ||
2 | From: Lubomir Rintel <lkundrak@v3.sk> | ||
3 | Date: Mon, 9 Jan 2017 13:34:23 +0000 | ||
4 | Subject: [PATCH] pppoe: include netinet/in.h before linux/in.h | ||
5 | |||
6 | This fixes builds with newer kernels. Basically, <netinet/in.h> needs to be | ||
7 | included before <linux/in.h> otherwise the earlier, unaware of the latter, | ||
8 | tries to redefine symbols and structures. Also, <linux/if_pppox.h> doesn't work | ||
9 | alone anymore, since it pulls the headers in the wrong order, so we better | ||
10 | include <netinet/in.h> early. | ||
11 | |||
12 | Upstream-Status: Backport | ||
13 | [https://github.com/paulusmack/ppp/commit/50a2997b256e0e0ef7a46fae133f56f60fce539c] | ||
14 | |||
15 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
16 | --- | ||
17 | pppd/plugins/rp-pppoe/pppoe.h | 7 ++++--- | ||
18 | 1 file changed, 4 insertions(+), 3 deletions(-) | ||
19 | |||
20 | diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h | ||
21 | index 9ab2eee..c4aaa6e 100644 | ||
22 | --- a/pppd/plugins/rp-pppoe/pppoe.h | ||
23 | +++ b/pppd/plugins/rp-pppoe/pppoe.h | ||
24 | @@ -47,6 +47,10 @@ | ||
25 | #include <sys/socket.h> | ||
26 | #endif | ||
27 | |||
28 | +/* This has to be included before Linux 4.8's linux/in.h | ||
29 | + * gets dragged in. */ | ||
30 | +#include <netinet/in.h> | ||
31 | + | ||
32 | /* Ugly header files on some Linux boxes... */ | ||
33 | #if defined(HAVE_LINUX_IF_H) | ||
34 | #include <linux/if.h> | ||
35 | @@ -84,8 +88,6 @@ typedef unsigned long UINT32_t; | ||
36 | #include <linux/if_ether.h> | ||
37 | #endif | ||
38 | |||
39 | -#include <netinet/in.h> | ||
40 | - | ||
41 | #ifdef HAVE_NETINET_IF_ETHER_H | ||
42 | #include <sys/types.h> | ||
43 | |||
44 | @@ -98,7 +100,6 @@ typedef unsigned long UINT32_t; | ||
45 | #endif | ||
46 | |||
47 | |||
48 | - | ||
49 | /* Ethernet frame types according to RFC 2516 */ | ||
50 | #define ETH_PPPOE_DISCOVERY 0x8863 | ||
51 | #define ETH_PPPOE_SESSION 0x8864 | ||
52 | -- | ||
53 | 2.7.4 | ||
54 | |||
diff --git a/meta/recipes-connectivity/ppp/ppp/cifdefroute.patch b/meta/recipes-connectivity/ppp/ppp/cifdefroute.patch deleted file mode 100644 index 7dd69d8f4d..0000000000 --- a/meta/recipes-connectivity/ppp/ppp/cifdefroute.patch +++ /dev/null | |||
@@ -1,297 +0,0 @@ | |||
1 | This patch comes from OpenEmbedded. | ||
2 | The original patch is from Debian / SuSE to implement replacedefaultroute | ||
3 | Rebased it to fit ppp-2.4.5. Dongxiao Xu <dongxiao.xu@intel.com> | ||
4 | |||
5 | Upstream-Status: Inappropriate [debian/suse patches] | ||
6 | |||
7 | Index: ppp-2.4.7/pppd/ipcp.c | ||
8 | =================================================================== | ||
9 | --- ppp-2.4.7.orig/pppd/ipcp.c | ||
10 | +++ ppp-2.4.7/pppd/ipcp.c | ||
11 | @@ -198,6 +198,16 @@ static option_t ipcp_option_list[] = { | ||
12 | "disable defaultroute option", OPT_ALIAS | OPT_A2CLR, | ||
13 | &ipcp_wantoptions[0].default_route }, | ||
14 | |||
15 | +#ifdef __linux__ | ||
16 | + { "replacedefaultroute", o_bool, | ||
17 | + &ipcp_wantoptions[0].replace_default_route, | ||
18 | + "Replace default route", 1 | ||
19 | + }, | ||
20 | + { "noreplacedefaultroute", o_bool, | ||
21 | + &ipcp_allowoptions[0].replace_default_route, | ||
22 | + "Never replace default route", OPT_A2COPY, | ||
23 | + &ipcp_wantoptions[0].replace_default_route }, | ||
24 | +#endif | ||
25 | { "proxyarp", o_bool, &ipcp_wantoptions[0].proxy_arp, | ||
26 | "Add proxy ARP entry", OPT_ENABLE|1, &ipcp_allowoptions[0].proxy_arp }, | ||
27 | { "noproxyarp", o_bool, &ipcp_allowoptions[0].proxy_arp, | ||
28 | @@ -271,7 +281,7 @@ struct protent ipcp_protent = { | ||
29 | ip_active_pkt | ||
30 | }; | ||
31 | |||
32 | -static void ipcp_clear_addrs __P((int, u_int32_t, u_int32_t)); | ||
33 | +static void ipcp_clear_addrs __P((int, u_int32_t, u_int32_t, bool)); | ||
34 | static void ipcp_script __P((char *, int)); /* Run an up/down script */ | ||
35 | static void ipcp_script_done __P((void *)); | ||
36 | |||
37 | @@ -1761,7 +1771,12 @@ ip_demand_conf(u) | ||
38 | if (!sifnpmode(u, PPP_IP, NPMODE_QUEUE)) | ||
39 | return 0; | ||
40 | if (wo->default_route) | ||
41 | +#ifndef __linux__ | ||
42 | if (sifdefaultroute(u, wo->ouraddr, wo->hisaddr)) | ||
43 | +#else | ||
44 | + if (sifdefaultroute(u, wo->ouraddr, wo->hisaddr, | ||
45 | + wo->replace_default_route)) | ||
46 | +#endif | ||
47 | default_route_set[u] = 1; | ||
48 | if (wo->proxy_arp) | ||
49 | if (sifproxyarp(u, wo->hisaddr)) | ||
50 | @@ -1849,7 +1864,8 @@ ipcp_up(f) | ||
51 | */ | ||
52 | if (demand) { | ||
53 | if (go->ouraddr != wo->ouraddr || ho->hisaddr != wo->hisaddr) { | ||
54 | - ipcp_clear_addrs(f->unit, wo->ouraddr, wo->hisaddr); | ||
55 | + ipcp_clear_addrs(f->unit, wo->ouraddr, wo->hisaddr, | ||
56 | + wo->replace_default_route); | ||
57 | if (go->ouraddr != wo->ouraddr) { | ||
58 | warn("Local IP address changed to %I", go->ouraddr); | ||
59 | script_setenv("OLDIPLOCAL", ip_ntoa(wo->ouraddr), 0); | ||
60 | @@ -1874,7 +1890,12 @@ ipcp_up(f) | ||
61 | |||
62 | /* assign a default route through the interface if required */ | ||
63 | if (ipcp_wantoptions[f->unit].default_route) | ||
64 | +#ifndef __linux__ | ||
65 | if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr)) | ||
66 | +#else | ||
67 | + if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr, | ||
68 | + wo->replace_default_route)) | ||
69 | +#endif | ||
70 | default_route_set[f->unit] = 1; | ||
71 | |||
72 | /* Make a proxy ARP entry if requested. */ | ||
73 | @@ -1924,7 +1945,12 @@ ipcp_up(f) | ||
74 | |||
75 | /* assign a default route through the interface if required */ | ||
76 | if (ipcp_wantoptions[f->unit].default_route) | ||
77 | +#ifndef __linux__ | ||
78 | if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr)) | ||
79 | +#else | ||
80 | + if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr, | ||
81 | + wo->replace_default_route)) | ||
82 | +#endif | ||
83 | default_route_set[f->unit] = 1; | ||
84 | |||
85 | /* Make a proxy ARP entry if requested. */ | ||
86 | @@ -2002,7 +2028,7 @@ ipcp_down(f) | ||
87 | sifnpmode(f->unit, PPP_IP, NPMODE_DROP); | ||
88 | sifdown(f->unit); | ||
89 | ipcp_clear_addrs(f->unit, ipcp_gotoptions[f->unit].ouraddr, | ||
90 | - ipcp_hisoptions[f->unit].hisaddr); | ||
91 | + ipcp_hisoptions[f->unit].hisaddr, 0); | ||
92 | } | ||
93 | |||
94 | /* Execute the ip-down script */ | ||
95 | @@ -2018,12 +2044,21 @@ ipcp_down(f) | ||
96 | * proxy arp entries, etc. | ||
97 | */ | ||
98 | static void | ||
99 | -ipcp_clear_addrs(unit, ouraddr, hisaddr) | ||
100 | +ipcp_clear_addrs(unit, ouraddr, hisaddr, replacedefaultroute) | ||
101 | int unit; | ||
102 | u_int32_t ouraddr; /* local address */ | ||
103 | u_int32_t hisaddr; /* remote address */ | ||
104 | + bool replacedefaultroute; | ||
105 | { | ||
106 | - if (proxy_arp_set[unit]) { | ||
107 | + /* If replacedefaultroute, sifdefaultroute will be called soon | ||
108 | + * with replacedefaultroute set and that will overwrite the current | ||
109 | + * default route. This is the case only when doing demand, otherwise | ||
110 | + * during demand, this cifdefaultroute would restore the old default | ||
111 | + * route which is not what we want in this case. In the non-demand | ||
112 | + * case, we'll delete the default route and restore the old if there | ||
113 | + * is one saved by an sifdefaultroute with replacedefaultroute. | ||
114 | + */ | ||
115 | + if (!replacedefaultroute && default_route_set[unit]) { | ||
116 | cifproxyarp(unit, hisaddr); | ||
117 | proxy_arp_set[unit] = 0; | ||
118 | } | ||
119 | Index: ppp-2.4.7/pppd/ipcp.h | ||
120 | =================================================================== | ||
121 | --- ppp-2.4.7.orig/pppd/ipcp.h | ||
122 | +++ ppp-2.4.7/pppd/ipcp.h | ||
123 | @@ -70,6 +70,7 @@ typedef struct ipcp_options { | ||
124 | bool old_addrs; /* Use old (IP-Addresses) option? */ | ||
125 | bool req_addr; /* Ask peer to send IP address? */ | ||
126 | bool default_route; /* Assign default route through interface? */ | ||
127 | + bool replace_default_route; /* Replace default route through interface? */ | ||
128 | bool proxy_arp; /* Make proxy ARP entry for peer? */ | ||
129 | bool neg_vj; /* Van Jacobson Compression? */ | ||
130 | bool old_vj; /* use old (short) form of VJ option? */ | ||
131 | Index: ppp-2.4.7/pppd/pppd.8 | ||
132 | =================================================================== | ||
133 | --- ppp-2.4.7.orig/pppd/pppd.8 | ||
134 | +++ ppp-2.4.7/pppd/pppd.8 | ||
135 | @@ -121,6 +121,13 @@ the gateway, when IPCP negotiation is su | ||
136 | This entry is removed when the PPP connection is broken. This option | ||
137 | is privileged if the \fInodefaultroute\fR option has been specified. | ||
138 | .TP | ||
139 | +.B replacedefaultroute | ||
140 | +This option is a flag to the defaultroute option. If defaultroute is | ||
141 | +set and this flag is also set, pppd replaces an existing default route | ||
142 | +with the new default route. | ||
143 | + | ||
144 | + | ||
145 | +.TP | ||
146 | .B disconnect \fIscript | ||
147 | Execute the command specified by \fIscript\fR, by passing it to a | ||
148 | shell, after | ||
149 | @@ -734,7 +741,12 @@ disable both forms of hardware flow cont | ||
150 | .TP | ||
151 | .B nodefaultroute | ||
152 | Disable the \fIdefaultroute\fR option. The system administrator who | ||
153 | -wishes to prevent users from creating default routes with pppd | ||
154 | +wishes to prevent users from adding a default route with pppd | ||
155 | +can do so by placing this option in the /etc/ppp/options file. | ||
156 | +.TP | ||
157 | +.B noreplacedefaultroute | ||
158 | +Disable the \fIreplacedefaultroute\fR option. The system administrator who | ||
159 | +wishes to prevent users from replacing a default route with pppd | ||
160 | can do so by placing this option in the /etc/ppp/options file. | ||
161 | .TP | ||
162 | .B nodeflate | ||
163 | Index: ppp-2.4.7/pppd/pppd.h | ||
164 | =================================================================== | ||
165 | --- ppp-2.4.7.orig/pppd/pppd.h | ||
166 | +++ ppp-2.4.7/pppd/pppd.h | ||
167 | @@ -665,7 +665,11 @@ int sif6addr __P((int, eui64_t, eui64_t | ||
168 | int cif6addr __P((int, eui64_t, eui64_t)); | ||
169 | /* Remove an IPv6 address from i/f */ | ||
170 | #endif | ||
171 | +#ifndef __linux__ | ||
172 | int sifdefaultroute __P((int, u_int32_t, u_int32_t)); | ||
173 | +#else | ||
174 | +int sifdefaultroute __P((int, u_int32_t, u_int32_t, bool replace_default_rt)); | ||
175 | +#endif | ||
176 | /* Create default route through i/f */ | ||
177 | int cifdefaultroute __P((int, u_int32_t, u_int32_t)); | ||
178 | /* Delete default route through i/f */ | ||
179 | Index: ppp-2.4.7/pppd/sys-linux.c | ||
180 | =================================================================== | ||
181 | --- ppp-2.4.7.orig/pppd/sys-linux.c | ||
182 | +++ ppp-2.4.7/pppd/sys-linux.c | ||
183 | @@ -207,6 +207,8 @@ static unsigned char inbuf[512]; /* buff | ||
184 | static int if_is_up; /* Interface has been marked up */ | ||
185 | static int if6_is_up; /* Interface has been marked up for IPv6, to help differentiate */ | ||
186 | static int have_default_route; /* Gateway for default route added */ | ||
187 | +static struct rtentry old_def_rt; /* Old default route */ | ||
188 | +static int default_rt_repl_rest; /* replace and restore old default rt */ | ||
189 | static u_int32_t proxy_arp_addr; /* Addr for proxy arp entry added */ | ||
190 | static char proxy_arp_dev[16]; /* Device for proxy arp entry */ | ||
191 | static u_int32_t our_old_addr; /* for detecting address changes */ | ||
192 | @@ -1545,6 +1547,9 @@ static int read_route_table(struct rtent | ||
193 | p = NULL; | ||
194 | } | ||
195 | |||
196 | + SET_SA_FAMILY (rt->rt_dst, AF_INET); | ||
197 | + SET_SA_FAMILY (rt->rt_gateway, AF_INET); | ||
198 | + | ||
199 | SIN_ADDR(rt->rt_dst) = strtoul(cols[route_dest_col], NULL, 16); | ||
200 | SIN_ADDR(rt->rt_gateway) = strtoul(cols[route_gw_col], NULL, 16); | ||
201 | SIN_ADDR(rt->rt_genmask) = strtoul(cols[route_mask_col], NULL, 16); | ||
202 | @@ -1614,20 +1619,51 @@ int have_route_to(u_int32_t addr) | ||
203 | /******************************************************************** | ||
204 | * | ||
205 | * sifdefaultroute - assign a default route through the address given. | ||
206 | - */ | ||
207 | - | ||
208 | -int sifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway) | ||
209 | -{ | ||
210 | - struct rtentry rt; | ||
211 | - | ||
212 | - if (defaultroute_exists(&rt) && strcmp(rt.rt_dev, ifname) != 0) { | ||
213 | - if (rt.rt_flags & RTF_GATEWAY) | ||
214 | - error("not replacing existing default route via %I", | ||
215 | - SIN_ADDR(rt.rt_gateway)); | ||
216 | - else | ||
217 | - error("not replacing existing default route through %s", | ||
218 | - rt.rt_dev); | ||
219 | - return 0; | ||
220 | + * | ||
221 | + * If the global default_rt_repl_rest flag is set, then this function | ||
222 | + * already replaced the original system defaultroute with some other | ||
223 | + * route and it should just replace the current defaultroute with | ||
224 | + * another one, without saving the current route. Use: demand mode, | ||
225 | + * when pppd sets first a defaultroute it it's temporary ppp0 addresses | ||
226 | + * and then changes the temporary addresses to the addresses for the real | ||
227 | + * ppp connection when it has come up. | ||
228 | + */ | ||
229 | + | ||
230 | +int sifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway, bool replace) | ||
231 | +{ | ||
232 | + struct rtentry rt, tmp_rt; | ||
233 | + struct rtentry *del_rt = NULL; | ||
234 | + | ||
235 | + if (default_rt_repl_rest) { | ||
236 | + /* We have already reclaced the original defaultroute, if we | ||
237 | + * are called again, we will delete the current default route | ||
238 | + * and set the new default route in this function. | ||
239 | + * - this is normally only the case the doing demand: */ | ||
240 | + if (defaultroute_exists( &tmp_rt )) | ||
241 | + del_rt = &tmp_rt; | ||
242 | + } else if ( defaultroute_exists( &old_def_rt ) && | ||
243 | + strcmp( old_def_rt.rt_dev, ifname ) != 0) { | ||
244 | + /* We did not yet replace an existing default route, let's | ||
245 | + * check if we should save and replace a default route: | ||
246 | + */ | ||
247 | + u_int32_t old_gateway = SIN_ADDR(old_def_rt.rt_gateway); | ||
248 | + if (old_gateway != gateway) { | ||
249 | + if (!replace) { | ||
250 | + error("not replacing default route to %s [%I]", | ||
251 | + old_def_rt.rt_dev, old_gateway); | ||
252 | + return 0; | ||
253 | + } else { | ||
254 | + // we need to copy rt_dev because we need it permanent too: | ||
255 | + char * tmp_dev = malloc(strlen(old_def_rt.rt_dev)+1); | ||
256 | + strcpy(tmp_dev, old_def_rt.rt_dev); | ||
257 | + old_def_rt.rt_dev = tmp_dev; | ||
258 | + | ||
259 | + notice("replacing old default route to %s [%I]", | ||
260 | + old_def_rt.rt_dev, old_gateway); | ||
261 | + default_rt_repl_rest = 1; | ||
262 | + del_rt = &old_def_rt; | ||
263 | + } | ||
264 | + } | ||
265 | } | ||
266 | |||
267 | memset (&rt, 0, sizeof (rt)); | ||
268 | @@ -1646,6 +1682,12 @@ int sifdefaultroute (int unit, u_int32_t | ||
269 | error("default route ioctl(SIOCADDRT): %m"); | ||
270 | return 0; | ||
271 | } | ||
272 | + if (default_rt_repl_rest && del_rt) | ||
273 | + if (ioctl(sock_fd, SIOCDELRT, del_rt) < 0) { | ||
274 | + if ( ! ok_error ( errno )) | ||
275 | + error("del old default route ioctl(SIOCDELRT): %m(%d)", errno); | ||
276 | + return 0; | ||
277 | + } | ||
278 | |||
279 | have_default_route = 1; | ||
280 | return 1; | ||
281 | @@ -1681,6 +1723,16 @@ int cifdefaultroute (int unit, u_int32_t | ||
282 | return 0; | ||
283 | } | ||
284 | } | ||
285 | + if (default_rt_repl_rest) { | ||
286 | + notice("restoring old default route to %s [%I]", | ||
287 | + old_def_rt.rt_dev, SIN_ADDR(old_def_rt.rt_gateway)); | ||
288 | + if (ioctl(sock_fd, SIOCADDRT, &old_def_rt) < 0) { | ||
289 | + if ( ! ok_error ( errno )) | ||
290 | + error("restore default route ioctl(SIOCADDRT): %m(%d)", errno); | ||
291 | + return 0; | ||
292 | + } | ||
293 | + default_rt_repl_rest = 0; | ||
294 | + } | ||
295 | |||
296 | return 1; | ||
297 | } | ||
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 index 8a69396cc7..614a474c37 100644 --- a/meta/recipes-connectivity/ppp/ppp/makefile-remove-hard-usr-reference.patch +++ b/meta/recipes-connectivity/ppp/ppp/makefile-remove-hard-usr-reference.patch | |||
@@ -1,3 +1,8 @@ | |||
1 | From 505705d0e1b55ce3fdc10d0e5eab5488f869adb6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Andreas Oberritter <obi@opendreambox.org> | ||
3 | Date: Thu, 1 Jul 2010 14:34:12 +0800 | ||
4 | Subject: [PATCH] ppp: Upgraded to version 2.4.5 | ||
5 | |||
1 | The patch comes from OpenEmbedded. | 6 | The patch comes from OpenEmbedded. |
2 | Rebased for ppp-2.4.5. Dongxiao Xu <dongxiao.xu@intel.com> | 7 | Rebased for ppp-2.4.5. Dongxiao Xu <dongxiao.xu@intel.com> |
3 | 8 | ||
@@ -6,24 +11,15 @@ Signed-off-by: Andreas Oberritter <obi@opendreambox.org> | |||
6 | 11 | ||
7 | Upstream-Status: Inappropriate [configuration] | 12 | Upstream-Status: Inappropriate [configuration] |
8 | 13 | ||
9 | Index: ppp-2.4.7/pppd/Makefile.linux | 14 | --- |
10 | =================================================================== | 15 | pppd/Makefile.linux | 4 ++-- |
11 | --- ppp-2.4.7.orig/pppd/Makefile.linux | 16 | 1 file changed, 2 insertions(+), 2 deletions(-) |
12 | +++ ppp-2.4.7/pppd/Makefile.linux | 17 | |
13 | @@ -120,10 +120,10 @@ CFLAGS += -DHAS_SHADOW | 18 | diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux |
14 | #LIBS += -lshadow $(LIBS) | 19 | index 4e485a1..44c4193 100644 |
15 | endif | 20 | --- a/pppd/Makefile.linux |
16 | 21 | +++ b/pppd/Makefile.linux | |
17 | -ifneq ($(wildcard /usr/include/crypt.h),) | 22 | @@ -188,10 +188,10 @@ LIBS += -ldl |
18 | +#ifneq ($(wildcard /usr/include/crypt.h),) | ||
19 | CFLAGS += -DHAVE_CRYPT_H=1 | ||
20 | LIBS += -lcrypt | ||
21 | -endif | ||
22 | +#endif | ||
23 | |||
24 | ifdef USE_LIBUTIL | ||
25 | CFLAGS += -DHAVE_LOGWTMP=1 | ||
26 | @@ -177,10 +177,10 @@ LIBS += -ldl | ||
27 | endif | 23 | endif |
28 | 24 | ||
29 | ifdef FILTER | 25 | ifdef FILTER |
diff --git a/meta/recipes-connectivity/ppp/ppp/makefile.patch b/meta/recipes-connectivity/ppp/ppp/makefile.patch index 2d09baf5d0..25b8ded441 100644 --- a/meta/recipes-connectivity/ppp/ppp/makefile.patch +++ b/meta/recipes-connectivity/ppp/ppp/makefile.patch | |||
@@ -1,12 +1,27 @@ | |||
1 | From f7fb1d1abfa6d208fb40fca1602e0c488108f1b5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Richard Purdie <richard@openedhand.com> | ||
3 | Date: Wed, 31 Aug 2005 10:45:47 +0000 | ||
4 | Subject: [PATCH] Initial population | ||
5 | |||
1 | The patch comes from OpenEmbedded | 6 | The patch comes from OpenEmbedded |
2 | Rebased for ppp-2.4.5. Dongxiao Xu <dongxiao.xu@intel.com> | 7 | Rebased for ppp-2.4.5. Dongxiao Xu <dongxiao.xu@intel.com> |
3 | 8 | ||
4 | Upstream-Status: Inappropriate [configuration] | 9 | Upstream-Status: Inappropriate [configuration] |
5 | 10 | ||
6 | diff -ruN ppp-2.4.5-orig/chat/Makefile.linux ppp-2.4.5/chat/Makefile.linux | 11 | --- |
7 | --- ppp-2.4.5-orig/chat/Makefile.linux 2010-06-30 15:51:12.050166398 +0800 | 12 | chat/Makefile.linux | 2 +- |
8 | +++ ppp-2.4.5/chat/Makefile.linux 2010-06-30 15:51:30.450118446 +0800 | 13 | pppd/Makefile.linux | 4 ++-- |
9 | @@ -25,7 +25,7 @@ | 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 | |||
20 | diff --git a/chat/Makefile.linux b/chat/Makefile.linux | ||
21 | index 0732ec8..f082dab 100644 | ||
22 | --- a/chat/Makefile.linux | ||
23 | +++ b/chat/Makefile.linux | ||
24 | @@ -25,7 +25,7 @@ chat.o: chat.c | ||
10 | 25 | ||
11 | install: chat | 26 | install: chat |
12 | mkdir -p $(BINDIR) $(MANDIR) | 27 | mkdir -p $(BINDIR) $(MANDIR) |
@@ -15,10 +30,11 @@ diff -ruN ppp-2.4.5-orig/chat/Makefile.linux ppp-2.4.5/chat/Makefile.linux | |||
15 | $(INSTALL) -c -m 644 chat.8 $(MANDIR) | 30 | $(INSTALL) -c -m 644 chat.8 $(MANDIR) |
16 | 31 | ||
17 | clean: | 32 | clean: |
18 | diff -ruN ppp-2.4.5-orig/pppd/Makefile.linux ppp-2.4.5/pppd/Makefile.linux | 33 | diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux |
19 | --- ppp-2.4.5-orig/pppd/Makefile.linux 2010-06-30 15:51:12.043682063 +0800 | 34 | index 9664f70..4e485a1 100644 |
20 | +++ ppp-2.4.5/pppd/Makefile.linux 2010-06-30 15:52:11.214170607 +0800 | 35 | --- a/pppd/Makefile.linux |
21 | @@ -99,7 +99,7 @@ | 36 | +++ b/pppd/Makefile.linux |
37 | @@ -107,7 +107,7 @@ ifdef USE_SRP | ||
22 | CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include | 38 | CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include |
23 | LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto | 39 | LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto |
24 | TARGETS += srp-entry | 40 | TARGETS += srp-entry |
@@ -27,7 +43,7 @@ diff -ruN ppp-2.4.5-orig/pppd/Makefile.linux ppp-2.4.5/pppd/Makefile.linux | |||
27 | MANPAGES += srp-entry.8 | 43 | MANPAGES += srp-entry.8 |
28 | EXTRACLEAN += srp-entry.o | 44 | EXTRACLEAN += srp-entry.o |
29 | NEEDDES=y | 45 | NEEDDES=y |
30 | @@ -200,7 +200,7 @@ | 46 | @@ -219,7 +219,7 @@ all: $(TARGETS) |
31 | install: pppd | 47 | install: pppd |
32 | mkdir -p $(BINDIR) $(MANDIR) | 48 | mkdir -p $(BINDIR) $(MANDIR) |
33 | $(EXTRAINSTALL) | 49 | $(EXTRAINSTALL) |
@@ -36,10 +52,11 @@ diff -ruN ppp-2.4.5-orig/pppd/Makefile.linux ppp-2.4.5/pppd/Makefile.linux | |||
36 | if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \ | 52 | if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \ |
37 | chmod o-rx,u+s $(BINDIR)/pppd; fi | 53 | chmod o-rx,u+s $(BINDIR)/pppd; fi |
38 | $(INSTALL) -c -m 444 pppd.8 $(MANDIR) | 54 | $(INSTALL) -c -m 444 pppd.8 $(MANDIR) |
39 | diff -ruN ppp-2.4.5-orig/pppd/plugins/radius/Makefile.linux ppp-2.4.5/pppd/plugins/radius/Makefile.linux | 55 | diff --git a/pppd/plugins/radius/Makefile.linux b/pppd/plugins/radius/Makefile.linux |
40 | --- ppp-2.4.5-orig/pppd/plugins/radius/Makefile.linux 2010-06-30 15:51:12.047676187 +0800 | 56 | index e702263..af57ae3 100644 |
41 | +++ ppp-2.4.5/pppd/plugins/radius/Makefile.linux 2010-06-30 15:53:47.750182267 +0800 | 57 | --- a/pppd/plugins/radius/Makefile.linux |
42 | @@ -36,11 +36,11 @@ | 58 | +++ b/pppd/plugins/radius/Makefile.linux |
59 | @@ -36,11 +36,11 @@ all: $(PLUGIN) | ||
43 | 60 | ||
44 | install: all | 61 | install: all |
45 | $(INSTALL) -d -m 755 $(LIBDIR) | 62 | $(INSTALL) -d -m 755 $(LIBDIR) |
@@ -55,11 +72,12 @@ diff -ruN ppp-2.4.5-orig/pppd/plugins/radius/Makefile.linux ppp-2.4.5/pppd/plugi | |||
55 | + $(INSTALL) -m 444 pppd-radattr.8 $(MANDIR) | 72 | + $(INSTALL) -m 444 pppd-radattr.8 $(MANDIR) |
56 | 73 | ||
57 | radius.so: radius.o libradiusclient.a | 74 | radius.so: radius.o libradiusclient.a |
58 | $(CC) -o radius.so -shared radius.o libradiusclient.a | 75 | $(CC) $(LDFLAGS) -o radius.so -shared radius.o libradiusclient.a |
59 | diff -ruN ppp-2.4.5-orig/pppd/plugins/rp-pppoe/Makefile.linux ppp-2.4.5/pppd/plugins/rp-pppoe/Makefile.linux | 76 | diff --git a/pppd/plugins/rp-pppoe/Makefile.linux b/pppd/plugins/rp-pppoe/Makefile.linux |
60 | --- ppp-2.4.5-orig/pppd/plugins/rp-pppoe/Makefile.linux 2010-06-30 15:51:12.047676187 +0800 | 77 | index 749ccc2..2c93f4a 100644 |
61 | +++ ppp-2.4.5/pppd/plugins/rp-pppoe/Makefile.linux 2010-06-30 15:53:15.454486877 +0800 | 78 | --- a/pppd/plugins/rp-pppoe/Makefile.linux |
62 | @@ -43,9 +43,9 @@ | 79 | +++ b/pppd/plugins/rp-pppoe/Makefile.linux |
80 | @@ -43,9 +43,9 @@ rp-pppoe.so: plugin.o discovery.o if.o common.o | ||
63 | 81 | ||
64 | install: all | 82 | install: all |
65 | $(INSTALL) -d -m 755 $(LIBDIR) | 83 | $(INSTALL) -d -m 755 $(LIBDIR) |
@@ -71,20 +89,22 @@ diff -ruN ppp-2.4.5-orig/pppd/plugins/rp-pppoe/Makefile.linux ppp-2.4.5/pppd/plu | |||
71 | 89 | ||
72 | clean: | 90 | clean: |
73 | rm -f *.o *.so pppoe-discovery | 91 | rm -f *.o *.so pppoe-discovery |
74 | diff -ruN ppp-2.4.5-orig/pppdump/Makefile.linux ppp-2.4.5/pppdump/Makefile.linux | 92 | diff --git a/pppdump/Makefile.linux b/pppdump/Makefile.linux |
75 | --- ppp-2.4.5-orig/pppdump/Makefile.linux 2010-06-30 15:51:12.058183383 +0800 | 93 | index cdf7ac4..0457561 100644 |
76 | +++ ppp-2.4.5/pppdump/Makefile.linux 2010-06-30 15:52:25.762183537 +0800 | 94 | --- a/pppdump/Makefile.linux |
77 | @@ -17,5 +17,5 @@ | 95 | +++ b/pppdump/Makefile.linux |
96 | @@ -17,5 +17,5 @@ clean: | ||
78 | 97 | ||
79 | install: | 98 | install: |
80 | mkdir -p $(BINDIR) $(MANDIR) | 99 | mkdir -p $(BINDIR) $(MANDIR) |
81 | - $(INSTALL) -s -c pppdump $(BINDIR) | 100 | - $(INSTALL) -s -c pppdump $(BINDIR) |
82 | + $(INSTALL) -c pppdump $(BINDIR) | 101 | + $(INSTALL) -c pppdump $(BINDIR) |
83 | $(INSTALL) -c -m 444 pppdump.8 $(MANDIR) | 102 | $(INSTALL) -c -m 444 pppdump.8 $(MANDIR) |
84 | diff -ruN ppp-2.4.5-orig/pppstats/Makefile.linux ppp-2.4.5/pppstats/Makefile.linux | 103 | diff --git a/pppstats/Makefile.linux b/pppstats/Makefile.linux |
85 | --- ppp-2.4.5-orig/pppstats/Makefile.linux 2010-06-30 15:51:12.058183383 +0800 | 104 | index 71afbe6..1819370 100644 |
86 | +++ ppp-2.4.5/pppstats/Makefile.linux 2010-06-30 15:52:42.486341081 +0800 | 105 | --- a/pppstats/Makefile.linux |
87 | @@ -22,7 +22,7 @@ | 106 | +++ b/pppstats/Makefile.linux |
107 | @@ -22,7 +22,7 @@ all: pppstats | ||
88 | 108 | ||
89 | install: pppstats | 109 | install: pppstats |
90 | -mkdir -p $(MANDIR) | 110 | -mkdir -p $(MANDIR) |
diff --git a/meta/recipes-connectivity/ppp/ppp/ppp-2.4.7-DES-openssl.patch b/meta/recipes-connectivity/ppp/ppp/ppp-2.4.7-DES-openssl.patch deleted file mode 100644 index e53f240543..0000000000 --- a/meta/recipes-connectivity/ppp/ppp/ppp-2.4.7-DES-openssl.patch +++ /dev/null | |||
@@ -1,84 +0,0 @@ | |||
1 | Used openssl for the DES instead of the libcrypt / glibc | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
6 | |||
7 | Index: ppp-2.4.7/pppd/Makefile.linux | ||
8 | =================================================================== | ||
9 | --- ppp-2.4.7.orig/pppd/Makefile.linux | ||
10 | +++ ppp-2.4.7/pppd/Makefile.linux | ||
11 | @@ -38,7 +38,7 @@ LIBS = | ||
12 | # Uncomment the next 2 lines to include support for Microsoft's | ||
13 | # MS-CHAP authentication protocol. Also, edit plugins/radius/Makefile.linux. | ||
14 | CHAPMS=y | ||
15 | -USE_CRYPT=y | ||
16 | +#USE_CRYPT=y | ||
17 | # Don't use MSLANMAN unless you really know what you're doing. | ||
18 | #MSLANMAN=y | ||
19 | # Uncomment the next line to include support for MPPE. CHAPMS (above) must | ||
20 | @@ -132,7 +132,7 @@ endif | ||
21 | |||
22 | ifdef NEEDDES | ||
23 | ifndef USE_CRYPT | ||
24 | -LIBS += -ldes $(LIBS) | ||
25 | +LIBS += -lcrypto | ||
26 | else | ||
27 | CFLAGS += -DUSE_CRYPT=1 | ||
28 | endif | ||
29 | Index: ppp-2.4.7/pppd/pppcrypt.c | ||
30 | =================================================================== | ||
31 | --- ppp-2.4.7.orig/pppd/pppcrypt.c | ||
32 | +++ ppp-2.4.7/pppd/pppcrypt.c | ||
33 | @@ -64,7 +64,7 @@ u_char *des_key; /* OUT 64 bit DES key w | ||
34 | des_key[7] = Get7Bits(key, 49); | ||
35 | |||
36 | #ifndef USE_CRYPT | ||
37 | - des_set_odd_parity((des_cblock *)des_key); | ||
38 | + DES_set_odd_parity((DES_cblock *)des_key); | ||
39 | #endif | ||
40 | } | ||
41 | |||
42 | @@ -158,25 +158,25 @@ u_char *clear; /* OUT 8 octets */ | ||
43 | } | ||
44 | |||
45 | #else /* USE_CRYPT */ | ||
46 | -static des_key_schedule key_schedule; | ||
47 | +static DES_key_schedule key_schedule; | ||
48 | |||
49 | bool | ||
50 | DesSetkey(key) | ||
51 | u_char *key; | ||
52 | { | ||
53 | - des_cblock des_key; | ||
54 | + DES_cblock des_key; | ||
55 | MakeKey(key, des_key); | ||
56 | - des_set_key(&des_key, key_schedule); | ||
57 | + DES_set_key(&des_key, &key_schedule); | ||
58 | return (1); | ||
59 | } | ||
60 | |||
61 | bool | ||
62 | -DesEncrypt(clear, key, cipher) | ||
63 | +DesEncrypt(clear, cipher) | ||
64 | u_char *clear; /* IN 8 octets */ | ||
65 | u_char *cipher; /* OUT 8 octets */ | ||
66 | { | ||
67 | - des_ecb_encrypt((des_cblock *)clear, (des_cblock *)cipher, | ||
68 | - key_schedule, 1); | ||
69 | + DES_ecb_encrypt((DES_cblock *)clear, (DES_cblock *)cipher, | ||
70 | + &key_schedule, 1); | ||
71 | return (1); | ||
72 | } | ||
73 | |||
74 | @@ -185,8 +185,8 @@ DesDecrypt(cipher, clear) | ||
75 | u_char *cipher; /* IN 8 octets */ | ||
76 | u_char *clear; /* OUT 8 octets */ | ||
77 | { | ||
78 | - des_ecb_encrypt((des_cblock *)cipher, (des_cblock *)clear, | ||
79 | - key_schedule, 0); | ||
80 | + DES_ecb_encrypt((DES_cblock *)cipher, (DES_cblock *)clear, | ||
81 | + &key_schedule, 0); | ||
82 | return (1); | ||
83 | } | ||
84 | |||
diff --git a/meta/recipes-connectivity/ppp/ppp_2.4.7.bb b/meta/recipes-connectivity/ppp/ppp_2.4.8.bb index 60c56dd0bd..f9c60d6bad 100644 --- a/meta/recipes-connectivity/ppp/ppp_2.4.7.bb +++ b/meta/recipes-connectivity/ppp/ppp_2.4.8.bb | |||
@@ -13,7 +13,6 @@ LIC_FILES_CHKSUM = "file://pppd/ccp.c;beginline=1;endline=29;md5=e2c43fe6e81ff77 | |||
13 | 13 | ||
14 | SRC_URI = "https://download.samba.org/pub/${BPN}/${BP}.tar.gz \ | 14 | SRC_URI = "https://download.samba.org/pub/${BPN}/${BP}.tar.gz \ |
15 | file://makefile.patch \ | 15 | file://makefile.patch \ |
16 | file://cifdefroute.patch \ | ||
17 | file://pppd-resolv-varrun.patch \ | 16 | file://pppd-resolv-varrun.patch \ |
18 | file://makefile-remove-hard-usr-reference.patch \ | 17 | file://makefile-remove-hard-usr-reference.patch \ |
19 | file://pon \ | 18 | file://pon \ |
@@ -27,20 +26,17 @@ SRC_URI = "https://download.samba.org/pub/${BPN}/${BP}.tar.gz \ | |||
27 | file://pap \ | 26 | file://pap \ |
28 | file://ppp_on_boot \ | 27 | file://ppp_on_boot \ |
29 | file://provider \ | 28 | file://provider \ |
30 | file://0001-ppp-Fix-compilation-errors-in-Makefile.patch \ | ||
31 | file://ppp@.service \ | 29 | file://ppp@.service \ |
32 | file://fix-CVE-2015-3310.patch \ | 30 | file://fix-CVE-2015-3310.patch \ |
33 | file://0001-pppoe-include-netinet-in.h-before-linux-in.h.patch \ | ||
34 | file://0001-ppp-Remove-unneeded-include.patch \ | 31 | file://0001-ppp-Remove-unneeded-include.patch \ |
35 | file://ppp-2.4.7-DES-openssl.patch \ | ||
36 | file://0001-pppd-Fix-bounds-check-in-EAP-code.patch \ | 32 | file://0001-pppd-Fix-bounds-check-in-EAP-code.patch \ |
37 | " | 33 | " |
38 | 34 | ||
39 | SRC_URI_append_libc-musl = "\ | 35 | SRC_URI_append_libc-musl = "\ |
40 | file://0001-Fix-build-with-musl.patch \ | 36 | file://0001-Fix-build-with-musl.patch \ |
41 | " | 37 | " |
42 | SRC_URI[md5sum] = "78818f40e6d33a1d1de68a1551f6595a" | 38 | SRC_URI[md5sum] = "2ca8342b9804be15103fd3f687af701c" |
43 | SRC_URI[sha256sum] = "02e0a3dd3e4799e33103f70ec7df75348c8540966ee7c948e4ed8a42bbccfb30" | 39 | SRC_URI[sha256sum] = "f6bf89beae26b2943dff8f1003533d6a5a4909a0fa6edfbec44fe039bbe61bc6" |
44 | 40 | ||
45 | inherit autotools-brokensep systemd | 41 | inherit autotools-brokensep systemd |
46 | 42 | ||