Serial LTE modem: No DNS servers are sent to the PPP client

Hello,

There were some recent changes in the Nordic PDN library - function pdn_dynamic_info_get that led to the changes in slm_ppp.c and the way the application gets MTU and DNS information. Because of these changes,the application stopped sending the DNS server from the network over PPP to the client, even though it's enabled in the configuration.

Could you confirm this behavior, or am I missing something?

Here is part of the original code and the modified code below.

static int ppp_start_internal(void)
{
	int ret;
	unsigned int mtu;
	struct ppp_context *const ctx = net_if_l2_data(ppp_iface);

	if (!configure_ppp_link_ip_addresses(ctx)) {
		return -EADDRNOTAVAIL;
	}

	ret = pdn_dynamic_params_get(PDP_CID, &ctx->ipcp.my_options.dns1_address,
				     &ctx->ipcp.my_options.dns2_address, &mtu);
	if (ret) {
		return ret;
	}

	if (mtu) {
		/* Set the PPP MTU to that of the LTE link. */
		mtu = MIN(mtu, sizeof(ppp_data_buf));
	} else {
		LOG_DBG("Could not retrieve MTU, using fallback value.");
		mtu = CONFIG_SLM_PPP_FALLBACK_MTU;
		BUILD_ASSERT(sizeof(ppp_data_buf) >= CONFIG_SLM_PPP_FALLBACK_MTU);
	}

	net_if_set_mtu(ppp_iface, mtu);
	LOG_DBG("MTU set to %u.", mtu);

static void ppp_set_mtu(void)
{
	const unsigned int mtu = ppp_retrieve_mtu();

	net_if_set_mtu(ppp_iface, mtu);
	LOG_DBG("MTU set to %u.", mtu);
}

static int ppp_start(void)
{
	if (ppp_state == PPP_STATE_RUNNING) {
		LOG_INF("PPP already running");
		return 0;
	}
	ppp_state = PPP_STATE_STARTING;

	int ret;
	struct ppp_context *const ctx = net_if_l2_data(ppp_iface);

	if (!configure_ppp_link_ip_addresses(ctx)) {
		ret = -EADDRNOTAVAIL;
		goto error;
	}

	ppp_set_mtu();

Thanks,

Petr

Parents
  • Hi,

    There were some recent changes in the Nordic PDN library - function pdn_dynamic_info_get that led to the changes in slm_ppp.c and the way the application gets MTU and DNS information.

    How recent have changes been made? Can you provide additional details about recent changes? 

    Here is part of the original code and the modified code below.

    Can you specify what exactly is shown in each of 2 code blocks?

    Because of these changes,the application stopped sending the DNS server from the network over PPP to the client, even though it's enabled in the configuration.

    Can you provide more information about your application?

    Best regards,
    Dejan


  • Hi, 


    How recent have changes been made? Can you provide additional details about recent changes? 

    Those changes have been made in nrfconnect/sdk-nrf commit ddfb6df8ab08d034440b5792ed792f8d9c305ab3 .

    https://github.com/nrfconnect/sdk-nrf/commit/ddfb6df8ab08d034440b5792ed792f8d9c305ab3

    Can you specify what exactly is shown in each of 2 code blocks?

    I tried to show the difference, but that wasn't a good idea, sorry. The commit is self-explanatory.

    Can you provide more information about your application?

    I'm using your nRF9160 with the Serial LTE modem application as an external modem controlled with the main MCU through PPP/CMUX.

    Until that changes, the modem was sending the DNS server obtained from the LTE network during the PPP setup phase, but now it has stopped.

Reply Children
No Data
Related