diff options
author | Thomas Haller <thaller@redhat.com> | 2023-06-07 08:51:54 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2023-06-14 14:27:25 +0200 |
commit | 84e21d8bbcbe14b3325fde51a91d0e16c803612f (patch) | |
tree | 21fd705ccf09f305a905ade60947cf7089dc95fe | |
parent | 3e66c0bde1472489dfafe53f25fbe252d5a4bcad (diff) |
ppp: fix plugin name for "rp-pppoe.so" with ppp 2.5
Between ppp 2.4.8 and 2.4.9, "rp-pppoe.so" was renamed to "pppoe.so" (and a
symlink created). Between 2.4.9 and 2.5.0, the symlink was dropped.
See-also: https://github.com/ppp-project/ppp/commit/b2c36e6c0e1655aea9b1b0a03a8160f42a26c884
I guess, NetworkManager always meant to use ppp's "(rp-)pppoe.so"
plugin, and never the library from the rp-pppoe project.
If a user actually wants to use the plugin from rp-pppoe project, then
this is going to break.
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1312
Fixes: afe80171b24d ('ppp: move ppp code to "nm-pppd-compat.c"')
-rw-r--r-- | src/core/ppp/nm-ppp-manager.c | 4 | ||||
-rw-r--r-- | src/core/ppp/nm-ppp-status.h | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/core/ppp/nm-ppp-manager.c b/src/core/ppp/nm-ppp-manager.c index bb043a7e41..fbc5d075a0 100644 --- a/src/core/ppp/nm-ppp-manager.c +++ b/src/core/ppp/nm-ppp-manager.c @@ -843,7 +843,7 @@ create_pppd_cmd_line(NMPPPManager *self, const char *pppoe_service; nm_strv_ptrarray_add_string_dup(cmd, "plugin"); - nm_strv_ptrarray_add_string_dup(cmd, "rp-pppoe.so"); + nm_strv_ptrarray_add_string_dup(cmd, NM_PPPOE_PLUGIN_NAME); nm_strv_ptrarray_add_string_concat(cmd, "nic-", priv->parent_iface); @@ -872,7 +872,7 @@ create_pppd_cmd_line(NMPPPManager *self, } else if (!strcmp(protocol, NM_SETTING_ADSL_PROTOCOL_PPPOE)) { nm_strv_ptrarray_add_string_dup(cmd, "plugin"); - nm_strv_ptrarray_add_string_dup(cmd, "rp-pppoe.so"); + nm_strv_ptrarray_add_string_dup(cmd, NM_PPPOE_PLUGIN_NAME); nm_strv_ptrarray_add_string_dup(cmd, priv->parent_iface); } diff --git a/src/core/ppp/nm-ppp-status.h b/src/core/ppp/nm-ppp-status.h index 57b48fe922..a2576e9cc0 100644 --- a/src/core/ppp/nm-ppp-status.h +++ b/src/core/ppp/nm-ppp-status.h @@ -29,4 +29,10 @@ typedef enum { NM_PPP_STATUS_INTERN_DEAD, } NMPPPStatus; +/*****************************************************************************/ + +/* The plugin name "(rp-)pppoe.so" depends on the ppp version. */ + +#define NM_PPPOE_PLUGIN_NAME (NM_PPP_VERSION_2_5_OR_NEWER ? "pppoe.so" : "rp-pppoe.so") + #endif /* __NM_PPP_STATUS_H__ */ |