mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 12:40:11 +01:00
keyfile: add required PPP setting for serial-based connections
This commit is contained in:
parent
8e6cf1e8ff
commit
5491f0c36e
1 changed files with 8 additions and 0 deletions
|
|
@ -33,6 +33,8 @@
|
|||
#include <nm-setting-wired.h>
|
||||
#include <nm-setting-wireless.h>
|
||||
#include <nm-setting-bluetooth.h>
|
||||
#include <nm-setting-serial.h>
|
||||
#include <nm-setting-ppp.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/ether.h>
|
||||
#include <string.h>
|
||||
|
|
@ -1035,6 +1037,12 @@ connection_from_file (const char *filename)
|
|||
}
|
||||
}
|
||||
|
||||
/* Serial connections require a PPP setting too */
|
||||
if (nm_connection_get_setting (connection, NM_TYPE_SETTING_SERIAL)) {
|
||||
if (!nm_connection_get_setting (connection, NM_TYPE_SETTING_PPP))
|
||||
nm_connection_add_setting (connection, nm_setting_ppp_new ());
|
||||
}
|
||||
|
||||
/* Handle vpn secrets after the 'vpn' setting was read */
|
||||
if (vpn_secrets) {
|
||||
NMSettingVPN *s_vpn;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue