[packages/NetworkManager-sstp] - added ppp2.5 patch (adapt to ppp 2.5.0 changes); release 2
qboosh
qboosh at pld-linux.org
Sat Sep 9 18:33:38 CEST 2023
commit 2dad14a7eb8102c07401ca2c767b7b76aef25e71
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Sep 9 18:06:49 2023 +0200
- added ppp2.5 patch (adapt to ppp 2.5.0 changes); release 2
NetworkManager-sstp-ppp2.5.patch | 89 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 89 insertions(+)
---
diff --git a/NetworkManager-sstp-ppp2.5.patch b/NetworkManager-sstp-ppp2.5.patch
new file mode 100644
index 0000000..329ae46
--- /dev/null
+++ b/NetworkManager-sstp-ppp2.5.patch
@@ -0,0 +1,89 @@
+--- NetworkManager-sstp-1.3.1/src/nm-sstp-pppd-plugin.c.orig 2022-09-19 18:37:25.000000000 +0200
++++ NetworkManager-sstp-1.3.1/src/nm-sstp-pppd-plugin.c 2023-09-09 17:37:46.859361818 +0200
+@@ -28,7 +28,8 @@
+ #include <pppd/eui64.h>
+ #include <pppd/ipcp.h>
+ #include <pppd/ipv6cp.h>
+-#include <pppd/chap-new.h>
++#include <pppd/upap.h>
++#include <pppd/chap.h>
+ #include <pppd/chap_ms.h>
+ #include <pppd/eap.h>
+
+@@ -200,7 +201,7 @@ nm_sstp_getsock(void)
+
+ /* Setup the address */
+ addr.sun_family = AF_UNIX;
+- snprintf(addr.sun_path, sizeof(addr.sun_path), "/var/run/sstpc/sstpc-%s", ipparam);
++ snprintf(addr.sun_path, sizeof(addr.sun_path), "/var/run/sstpc/sstpc-%s", ppp_ipparam());
+
+ /* Connect the socket */
+ ret = connect(sock, (struct sockaddr*) &addr, alen);
+@@ -373,7 +374,7 @@ nm_sstp_notify(void)
+ if (key_len > 0) {
+
+ sstp_api_attr_add(msg, SSTP_API_ATTR_MPPE_SEND, key_len, key);
+- if (debug) {
++ if (debug_on()) {
+ slprintf(key_buf, sizeof(key_buf)-1, "%0.*B", key_len, key);
+ _LOGI ("The MPPE-Send-Key: %s", key);
+ }
+@@ -384,7 +385,7 @@ nm_sstp_notify(void)
+ if (key_len > 0) {
+
+ sstp_api_attr_add(msg, SSTP_API_ATTR_MPPE_RECV, key_len, key);
+- if (debug) {
++ if (debug_on()) {
+ slprintf(key_buf, sizeof(key_buf)-1, "%0.*B", key_len, key);
+ _LOGI ("The MPPE-Recv-Key: %s", key);
+ }
+@@ -473,7 +474,7 @@ nm_ip4_add_route(GVariantBuilder *builde
+ static GVariant*
+ nm_ip4_get_params(void)
+ {
+- guint32 pppd_made_up_address = htonl (0x0a404040 + ifunit);
++ guint32 pppd_made_up_address = htonl (0x0a404040 + ppp_ifunit());
+ ipcp_options *opts = &ipcp_gotoptions[0];
+ ipcp_options *peer_opts = &ipcp_hisoptions[0];
+ GVariantBuilder builder;
+@@ -586,9 +587,9 @@ nm_send_config (void)
+
+ g_variant_builder_add (&builder, "{sv}",
+ NM_VPN_PLUGIN_CONFIG_TUNDEV,
+- g_variant_new_string (ifname));
++ g_variant_new_string (ppp_ifname()));
+
+- mtu = netif_get_mtu (ifunit);
++ mtu = ppp_get_mtu (ppp_ifunit());
+ g_variant_builder_add (&builder, "{sv}",
+ NM_VPN_PLUGIN_CONFIG_MTU,
+ g_variant_new_uint32 (mtu));
+@@ -919,12 +920,12 @@ plugin_init (void)
+ new_phase_hook = nm_new_phase;
+ #endif
+
+- add_notifier (&phasechange, nm_phasechange, NULL);
+- add_notifier (&exitnotify, nm_exit_notify, NULL);
+- add_notifier (&ip_up_notifier, nm_ip_up, NULL);
+- add_notifier (&ipv6_up_notifier, nm_ip6_up, NULL);
++ ppp_add_notify (NF_PHASE_CHANGE, nm_phasechange, NULL);
++ ppp_add_notify (NF_EXIT, nm_exit_notify, NULL);
++ ppp_add_notify (NF_IP_UP, nm_ip_up, NULL);
++ ppp_add_notify (NF_IPV6_UP, nm_ip6_up, NULL);
+ #ifdef USE_PPPD_AUTH_HOOK
+- add_notifier (&auth_up_notifier, nm_auth_notify, NULL);
++ ppp_add_notify (NF_AUTH_UP, nm_auth_notify, NULL);
+ #endif
+
+ gl.old_protrej = ipv6cp_protent.protrej;
+--- NetworkManager-sstp-1.3.1/configure.ac.orig 2022-09-19 18:37:25.000000000 +0200
++++ NetworkManager-sstp-1.3.1/configure.ac 2023-09-09 18:02:15.351406314 +0200
+@@ -59,7 +59,7 @@ AC_CACHE_CHECK([if pppd/mppe.h defines m
+ return 0;]])],
+ [ac_cv_working_mppe_h=yes],
+ [ac_cv_working_mppe_h=no])])
+-if test $ac_cv_working_mppe_h = xyes; then
++if test x$ac_cv_working_mppe_h = xyes; then
+ AC_DEFINE(HAVE_MPPE_KEYS_FUNCTIONS, 1,
+ [Define to 1 if you have <pppd/mppe.h> and it declares the mppe_keys_xyz() functions])
+ fi
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/NetworkManager-sstp.git/commitdiff/2dad14a7eb8102c07401ca2c767b7b76aef25e71
More information about the pld-cvs-commit
mailing list