summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/connman/connman/0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2023-09-06 18:56:19 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-09-07 14:36:30 +0100
commitdee8fc6a9757752ea58466a8ec5eaf25275928dc (patch)
tree712bee9bdeb9b2e56c8487f8981c6a94ce67cca1 /meta/recipes-connectivity/connman/connman/0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch
parent84ba56a144b296e7e8e2f9c7e5c972a57d7d2002 (diff)
downloadpoky-dee8fc6a9757752ea58466a8ec5eaf25275928dc.tar.gz
connman: update 1.41 -> 1.42
Drop backports. 0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch is partially dropped, as upstream hasn't included the newly added header into the tarball (issue addressed after the release). (From OE-Core rev: eeb686876dc560b5f0fab6f37a2def3d78bb55db) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/connman/connman/0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch')
-rw-r--r--meta/recipes-connectivity/connman/connman/0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch128
1 files changed, 3 insertions, 125 deletions
diff --git a/meta/recipes-connectivity/connman/connman/0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch b/meta/recipes-connectivity/connman/connman/0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch
index 83343fdda5..9e5ac8da15 100644
--- a/meta/recipes-connectivity/connman/connman/0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch
+++ b/meta/recipes-connectivity/connman/connman/0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch
@@ -1,4 +1,4 @@
1From 5f373f373f5baccc282dce257b7b16c8bb4a82c4 Mon Sep 17 00:00:00 2001 1From af55a6a414d32c12f9ef3cab778385a361e1ad6d Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Eivind=20N=C3=A6ss?= <eivnaes@yahoo.com> 2From: =?UTF-8?q?Eivind=20N=C3=A6ss?= <eivnaes@yahoo.com>
3Date: Sat, 25 Mar 2023 20:51:52 +0000 3Date: Sat, 25 Mar 2023 20:51:52 +0000
4Subject: [PATCH] vpn: Adding support for latest pppd 2.5.0 release 4Subject: [PATCH] vpn: Adding support for latest pppd 2.5.0 release
@@ -11,82 +11,12 @@ Adding a libppp-compat.h file to mask for any differences in the version.
11 11
12Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=a48864a2e5d2a725dfc6eef567108bc13b43857f] 12Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=a48864a2e5d2a725dfc6eef567108bc13b43857f]
13Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> 13Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
14
14--- 15---
15 configure.ac | 42 ++++++++-----
16 scripts/libppp-compat.h | 127 ++++++++++++++++++++++++++++++++++++++++ 16 scripts/libppp-compat.h | 127 ++++++++++++++++++++++++++++++++++++++++
17 scripts/libppp-plugin.c | 15 +++-- 17 1 file changed, 127 insertions(+)
18 3 files changed, 161 insertions(+), 23 deletions(-)
19 create mode 100644 scripts/libppp-compat.h 18 create mode 100644 scripts/libppp-compat.h
20 19
21diff --git a/configure.ac b/configure.ac
22index a573cef..f34bb38 100644
23--- a/configure.ac
24+++ b/configure.ac
25@@ -135,14 +135,6 @@ AC_ARG_ENABLE(l2tp,
26 AC_HELP_STRING([--enable-l2tp], [enable l2tp support]),
27 [enable_l2tp=${enableval}], [enable_l2tp="no"])
28 if (test "${enable_l2tp}" != "no"); then
29- if (test -z "${path_pppd}"); then
30- AC_PATH_PROG(PPPD, [pppd], [/usr/sbin/pppd], $PATH:/sbin:/usr/sbin)
31- else
32- PPPD="${path_pppd}"
33- AC_SUBST(PPPD)
34- fi
35- AC_CHECK_HEADERS(pppd/pppd.h, dummy=yes,
36- AC_MSG_ERROR(ppp header files are required))
37 if (test -z "${path_l2tp}"); then
38 AC_PATH_PROG(L2TP, [xl2tpd], [/usr/sbin/xl2tpd], $PATH:/sbin:/usr/sbin)
39 else
40@@ -160,6 +152,18 @@ AC_ARG_ENABLE(pptp,
41 AC_HELP_STRING([--enable-pptp], [enable pptp support]),
42 [enable_pptp=${enableval}], [enable_pptp="no"])
43 if (test "${enable_pptp}" != "no"); then
44+ if (test -z "${path_pptp}"); then
45+ AC_PATH_PROG(PPTP, [pptp], [/usr/sbin/pptp], $PATH:/sbin:/usr/sbin)
46+ else
47+ PPTP="${path_pptp}"
48+ AC_SUBST(PPTP)
49+ fi
50+fi
51+AM_CONDITIONAL(PPTP, test "${enable_pptp}" != "no")
52+AM_CONDITIONAL(PPTP_BUILTIN, test "${enable_pptp}" = "builtin")
53+
54+if (test "${enable_pptp}" != "no" || test "${enable_l2tp}" != "no"); then
55+
56 if (test -z "${path_pppd}"); then
57 AC_PATH_PROG(PPPD, [pppd], [/usr/sbin/pppd], $PATH:/sbin:/usr/sbin)
58 else
59@@ -168,15 +172,23 @@ if (test "${enable_pptp}" != "no"); then
60 fi
61 AC_CHECK_HEADERS(pppd/pppd.h, dummy=yes,
62 AC_MSG_ERROR(ppp header files are required))
63- if (test -z "${path_pptp}"); then
64- AC_PATH_PROG(PPTP, [pptp], [/usr/sbin/pptp], $PATH:/sbin:/usr/sbin)
65- else
66- PPTP="${path_pptp}"
67- AC_SUBST(PPTP)
68+ AC_CHECK_HEADERS([pppd/chap.h pppd/chap-new.h pppd/chap_ms.h])
69+
70+ PKG_CHECK_EXISTS([pppd],
71+ [AS_VAR_SET([pppd_pkgconfig_support],[yes])])
72+
73+ PPPD_VERSION=2.4.9
74+ if test x"$pppd_pkgconfig_support" = xyes; then
75+ PPPD_VERSION=`$PKG_CONFIG --modversion pppd`
76 fi
77+
78+ AC_DEFINE_UNQUOTED([PPP_VERSION(x,y,z)],
79+ [((x & 0xFF) << 16 | (y & 0xFF) << 8 | (z & 0xFF) << 0)],
80+ [Macro to help determine the particular version of pppd])
81+ PPP_VERSION=$(echo $PPPD_VERSION | sed -e "s/\./\,/g")
82+ AC_DEFINE_UNQUOTED(WITH_PPP_VERSION, PPP_VERSION($PPP_VERSION),
83+ [The real version of pppd represented as an int])
84 fi
85-AM_CONDITIONAL(PPTP, test "${enable_pptp}" != "no")
86-AM_CONDITIONAL(PPTP_BUILTIN, test "${enable_pptp}" = "builtin")
87
88 AC_CHECK_HEADERS(resolv.h, dummy=yes,
89 AC_MSG_ERROR(resolver header files are required))
90diff --git a/scripts/libppp-compat.h b/scripts/libppp-compat.h 20diff --git a/scripts/libppp-compat.h b/scripts/libppp-compat.h
91new file mode 100644 21new file mode 100644
92index 0000000..eee1d09 22index 0000000..eee1d09
@@ -220,55 +150,3 @@ index 0000000..eee1d09
220+ 150+
221+#endif /* #if WITH_PPP_VERSION < PPP_VERSION(2,5,0) */ 151+#endif /* #if WITH_PPP_VERSION < PPP_VERSION(2,5,0) */
222+#endif /* #if__LIBPPP_COMPAT_H__ */ 152+#endif /* #if__LIBPPP_COMPAT_H__ */
223diff --git a/scripts/libppp-plugin.c b/scripts/libppp-plugin.c
224index 0dd8b47..61641b5 100644
225--- a/scripts/libppp-plugin.c
226+++ b/scripts/libppp-plugin.c
227@@ -29,14 +29,13 @@
228 #include <sys/types.h>
229 #include <sys/stat.h>
230 #include <fcntl.h>
231-#include <pppd/pppd.h>
232-#include <pppd/fsm.h>
233-#include <pppd/ipcp.h>
234 #include <netinet/in.h>
235 #include <arpa/inet.h>
236
237 #include <dbus/dbus.h>
238
239+#include "libppp-compat.h"
240+
241 #define INET_ADDRES_LEN (INET_ADDRSTRLEN + 5)
242 #define INET_DNS_LEN (2*INET_ADDRSTRLEN + 9)
243
244@@ -47,7 +46,7 @@ static char *path;
245 static DBusConnection *connection;
246 static int prev_phase;
247
248-char pppd_version[] = VERSION;
249+char pppd_version[] = PPPD_VERSION;
250
251 int plugin_init(void);
252
253@@ -170,7 +169,7 @@ static void ppp_up(void *data, int arg)
254 DBUS_TYPE_STRING_AS_STRING DBUS_TYPE_STRING_AS_STRING
255 DBUS_DICT_ENTRY_END_CHAR_AS_STRING, &dict);
256
257- append(&dict, "INTERNAL_IFNAME", ifname);
258+ append(&dict, "INTERNAL_IFNAME", ppp_ifname());
259
260 inet_ntop(AF_INET, &ipcp_gotoptions[0].ouraddr, buf, INET_ADDRSTRLEN);
261 append(&dict, "INTERNAL_IP4_ADDRESS", buf);
262@@ -309,9 +308,9 @@ int plugin_init(void)
263 chap_check_hook = ppp_have_secret;
264 pap_check_hook = ppp_have_secret;
265
266- add_notifier(&ip_up_notifier, ppp_up, NULL);
267- add_notifier(&phasechange, ppp_phase_change, NULL);
268- add_notifier(&exitnotify, ppp_exit, connection);
269+ ppp_add_notify(NF_IP_UP, ppp_up, NULL);
270+ ppp_add_notify(NF_PHASE_CHANGE, ppp_phase_change, NULL);
271+ ppp_add_notify(NF_EXIT, ppp_exit, connection);
272
273 return 0;
274 }