From 46b17908ce18e89280db3cb7fa0981ee4fec5a23 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Thu, 14 Jul 2016 14:59:17 +0200 Subject: 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. --- src/mm-broadband-modem-qmi.c | 2 +- src/mm-port-qmi.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c index ccdc11e6..dd217941 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 33519ee7..3252cab4 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 */ -- cgit v1.2.3-70-g09d2