summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2016-07-14 14:59:17 +0200
committerAleksander Morgado <aleksander@aleksander.es>2016-07-14 14:59:28 +0200
commit46b17908ce18e89280db3cb7fa0981ee4fec5a23 (patch)
tree930de7c2365f952e2370613e030ed182b98d2d7c
parent48f02107395986c31b95067b5f08de256dab3c18 (diff)
downloadModemManager-46b17908ce18e89280db3cb7fa0981ee4fec5a23.tar.gz
broadband-modem-qmi: fix dhcp/static IP setting when kernel data format updated
When the logic decided that we had to update the kernel data format to match the one configured in the WWAN network interface, we were not flagging the port LLP with the correct value, what resulted in NetworkManager trying to use dhclient on the raw-ip interface: dhclient[3257]: Unsupported device type 65534 for "wwan1" dhclient[3257]: dhclient[3257]: If you think you have received this message due to a bug rather dhclient[3257]: than a configuration issue please read the section on submitting dhclient[3257]: bugs on either our web page at www.isc.org or in the README file dhclient[3257]: before submitting a bug. These pages explain the proper dhclient[3257]: process and the information we find helpful for debugging.. dhclient[3257]: dhclient[3257]: exiting. Fix the internal LLP flag, so that Static IP addressing is requested for all raw-ip based interfaces.
-rw-r--r--src/mm-broadband-modem-qmi.c2
-rw-r--r--src/mm-port-qmi.c8
2 files changed, 6 insertions, 4 deletions
diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c
index ccdc11e67..dd217941c 100644
--- a/src/mm-broadband-modem-qmi.c
+++ b/src/mm-broadband-modem-qmi.c
@@ -329,7 +329,7 @@ modem_create_bearer (MMIfaceModem *self,
modem_create_bearer);
/* We just create a MMBearerQmi */
- mm_dbg ("Creating QMI bearer in QMI modem");
+ mm_dbg ("Creating QMI bearer (%s) in QMI modem", force_dhcp ? "DHCP" : "Static IP");
bearer = mm_bearer_qmi_new (MM_BROADBAND_MODEM_QMI (self), properties, force_dhcp);
g_simple_async_result_set_op_res_gpointer (result, bearer, g_object_unref);
g_simple_async_result_complete_in_idle (result);
diff --git a/src/mm-port-qmi.c b/src/mm-port-qmi.c
index 33519ee79..3252cab46 100644
--- a/src/mm-port-qmi.c
+++ b/src/mm-port-qmi.c
@@ -453,11 +453,13 @@ port_open_context_step (PortOpenContext *ctx)
case PORT_OPEN_STEP_SET_KERNEL_DATA_FORMAT:
/* Update the data format to be expected by the kernel */
mm_dbg ("Updating kernel data format: %s", qmi_wda_link_layer_protocol_get_string (ctx->llp));
- if (ctx->llp == QMI_WDA_LINK_LAYER_PROTOCOL_802_3)
+ if (ctx->llp == QMI_WDA_LINK_LAYER_PROTOCOL_802_3) {
ctx->kernel_data_format = QMI_DEVICE_EXPECTED_DATA_FORMAT_802_3;
- else if (ctx->llp == QMI_WDA_LINK_LAYER_PROTOCOL_RAW_IP)
+ ctx->self->priv->llp_is_raw_ip = FALSE;
+ } else if (ctx->llp == QMI_WDA_LINK_LAYER_PROTOCOL_RAW_IP) {
ctx->kernel_data_format = QMI_DEVICE_EXPECTED_DATA_FORMAT_RAW_IP;
- else
+ ctx->self->priv->llp_is_raw_ip = TRUE;
+ } else
g_assert_not_reached ();
/* Regardless of the output, we're done after this action */