Skip to content

Commit

Permalink
network: better default settings for cellular connections (#330)
Browse files Browse the repository at this point in the history
* network/mobile: remove serial config

This is based on assumptions and is unnecessary for most modems.
For almost a decade, the NM applet has not done this, see:

https://gitlab.gnome.org/GNOME/network-manager-applet/-/commit/604d7db2ca49a44fb095c787793ba3afcb50fdd9

* network/mobile: allow dual stack cellular connections

Copied from:
https://gitlab.gnome.org/GNOME/network-manager-applet/-/commit/6701ae6fece2ec8f8597ea837d890fdbfe82aadc
  • Loading branch information
okaestne authored May 8, 2024
1 parent 496012a commit 27c7bb2
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions panels/network/network-dialogs.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,14 +337,13 @@ cdma_mobile_wizard_done (NMAMobileWizard *wizard,
NULL);
nm_connection_add_setting (connection, setting);

/* Serial setting */
setting = nm_setting_serial_new ();
g_object_set (setting,
NM_SETTING_SERIAL_BAUD, 115200,
NM_SETTING_SERIAL_BITS, 8,
NM_SETTING_SERIAL_PARITY, 'n',
NM_SETTING_SERIAL_STOPBITS, 1,
NULL);
/* Default to IPv4 & IPv6 'automatic' addressing */
setting = nm_setting_ip4_config_new ();
g_object_set (setting, NM_SETTING_IP_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL);
nm_connection_add_setting (connection, setting);

setting = nm_setting_ip6_config_new ();
g_object_set (setting, NM_SETTING_IP_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_AUTO, NULL);
nm_connection_add_setting (connection, setting);

nm_connection_add_setting (connection, nm_setting_ppp_new ());
Expand Down Expand Up @@ -400,14 +399,13 @@ gsm_mobile_wizard_done (NMAMobileWizard *wizard,
NULL);
nm_connection_add_setting (connection, setting);

/* Serial setting */
setting = nm_setting_serial_new ();
g_object_set (setting,
NM_SETTING_SERIAL_BAUD, 115200,
NM_SETTING_SERIAL_BITS, 8,
NM_SETTING_SERIAL_PARITY, 'n',
NM_SETTING_SERIAL_STOPBITS, 1,
NULL);
/* Default to IPv4 & IPv6 'automatic' addressing */
setting = nm_setting_ip4_config_new ();
g_object_set (setting, NM_SETTING_IP_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL);
nm_connection_add_setting (connection, setting);

setting = nm_setting_ip6_config_new ();
g_object_set (setting, NM_SETTING_IP_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_AUTO, NULL);
nm_connection_add_setting (connection, setting);

nm_connection_add_setting (connection, nm_setting_ppp_new ());
Expand Down

0 comments on commit 27c7bb2

Please sign in to comment.