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.

  • Hi,

    Can you share your application log? Do you see any errors which indicate that DNS information was not sent by the modem?

    Best regards,
    Dejan

  • Hi, 

    Here is the log before those changes in that commit. You can see that the reply to the configuration request contains two DNS servers.

    2025-07-14T11:44:10<dbg> net_l2_ppp: net_pkt_hexdump: 0x20095e48
                                         80 21 01 01 00 16 03 06  64 61 23 74 81 06 d9 0e |.!...... da#t....
                                         a0 82 83 06 d9 0e a4 23                          |.......#   

    Full log:

    2025-07-14T11:44:09<dbg> net_l2_ppp: ppp_fsm_input: (rx_q[0]): [LCP/0x20012208] LCP Configure-Req (1) id 2 payload len 0
    2025-07-14T11:44:09<dbg> net_l2_ppp: fsm_recv_configure_req: (rx_q[0]): [LCP/0x20012208] Current state ACK_RECEIVED (7)
    2025-07-14T11:44:09<dbg> net_l2_ppp: fsm_recv_configure_req: (rx_q[0]): [LCP/0x20012208] Sending Configure-Ack (2) id 2 to peer while in ACK_RECEIVED (7)
    2025-07-14T11:44:09<dbg> net_l2_ppp: ppp_send_pkt: (rx_q[0]): [LCP/0x20012208] Sending 6 bytes pkt 0x20095a08 (options len 0)
    2025-07-14T11:44:09<dbg> net_l2_ppp: ppp_change_state_debug: (rx_q[0]): [LCP/0x20012208] state ACK_RECEIVED (7) => OPENED (9) (fsm_recv_configure_req():653)
    2025-07-14T11:44:09<dbg> net_l2_ppp: ppp_link_established: (rx_q[0]): [0x200121d0] Link established
    2025-07-14T11:44:09<dbg> net_l2_ppp: ppp_change_phase_debug: (rx_q[0]): [0x200121d0] phase ESTABLISH (1) => AUTH (2) (do_auth():74)
    2025-07-14T11:44:09<dbg> net_l2_ppp: ppp_link_authenticated: (rx_q[0]): [0x200121d0] Link authenticated
    2025-07-14T11:44:09<dbg> net_l2_ppp: ppp_change_phase_debug: (rx_q[0]): [0x200121d0] phase AUTH (2) => NETWORK (3) (do_network():34)
    2025-07-14T11:44:09<dbg> net_l2_ppp: ppp_fsm_open: (rx_q[0]): [IPCP/0x200122e0] Current state INITIAL (0)
    2025-07-14T11:44:09<dbg> net_l2_ppp: ppp_change_state_debug: (rx_q[0]): [IPCP/0x200122e0] state INITIAL (0) => STARTING (1) (ppp_fsm_open():349)
    2025-07-14T11:44:09<dbg> net_l2_ppp: ppp_fsm_lower_up: (rx_q[0]): [IPCP/0x200122e0] Current state STARTING (1)
    2025-07-14T11:44:09<dbg> net_l2_ppp: fsm_send_configure_req: (rx_q[0]): [IPCP/0x200122e0] Sending Configure-Req (1) id 1 to peer while in STARTING (1)
    2025-07-14T11:44:09<dbg> net_l2_ppp: ppp_send_pkt: (rx_q[0]): [IPCP/0x200122e0] Sending 24 bytes pkt 0x20095a4c (options len 18)
    2025-07-14T11:44:09<dbg> net_l2_ppp: ppp_change_state_debug: (rx_q[0]): [IPCP/0x200122e0] state STARTING (1) => REQUEST_SENT (6) (ppp_fsm_lower_up():317)
    2025-07-14T11:44:09<dbg> net_l2_ppp: ppp_fsm_lower_up: (rx_q[0]): [PAP/0x200123b8] Current state INITIAL (0)
    2025-07-14T11:44:09<dbg> net_l2_ppp: ppp_change_state_debug: (rx_q[0]): [PAP/0x200123b8] state INITIAL (0) => CLOSED (2) (ppp_fsm_lower_up():312)
    2025-07-14T11:44:09<dbg> net_l2_ppp: net_pkt_hexdump: send L2
    2025-07-14T11:44:09<dbg> net_l2_ppp: net_pkt_hexdump: 0x20095a08
                                         c0 21 02 02 00 04                                |.!....
    2025-07-14T11:44:09<dbg> net_l2_ppp: net_pkt_hexdump: send L2
    2025-07-14T11:44:09<dbg> net_l2_ppp: net_pkt_hexdump: 0x20095a4c
                                         80 21 01 01 00 16                                |.!....
    2025-07-14T11:44:09<dbg> net_l2_ppp: net_pkt_hexdump: 0x20095a4c
                                         03 06 00 00 00 00 81 06  00 00 00 00 83 06 00 00 |........ ........
                                         00 00                                            |..
    2025-07-14T11:44:10<inf> adc: vbat = 3594, 3v6 = 3294
    2025-07-14T11:44:10<dbg> net_l2_ppp: net_pkt_hexdump: recv L2
    2025-07-14T11:44:10<dbg> net_l2_ppp: net_pkt_hexdump: 0x20095e48
                                         80 21 01 01 00 16 03 06  64 61 23 74 81 06 d9 0e |.!...... da#t....
                                         a0 82 83 06 d9 0e a4 23                          |.......#   

    Here is the log after those changes in the commit. The Serial LTE application do not send any DNS servers in the reply, just "00"

    2025-07-14T11:55:15<dbg> net_l2_ppp: net_pkt_hexdump: 0x20094788
                                         80 21 01 01 00 16 03 06  64 61 23 74 81 06 00 00 |.!...... da#t....
                                         00 00 83 06 00 00 00 00                          |........
    

    Full log:

    2025-07-14T11:55:15<dbg> net_l2_ppp: ppp_fsm_input: (rx_q[0]): [LCP/0x20010b48] LCP Configure-Req (1) id 2 payload len 0
    2025-07-14T11:55:15<dbg> net_l2_ppp: fsm_recv_configure_req: (rx_q[0]): [LCP/0x20010b48] Current state ACK_RECEIVED (7)
    2025-07-14T11:55:15<dbg> net_l2_ppp: fsm_recv_configure_req: (rx_q[0]): [LCP/0x20010b48] Sending Configure-Ack (2) id 2 to peer while in ACK_RECEIVED (7)
    2025-07-14T11:55:15<dbg> net_l2_ppp: ppp_send_pkt: (rx_q[0]): [LCP/0x20010b48] Sending 6 bytes pkt 0x20094348 (options len 0)
    2025-07-14T11:55:15<dbg> net_l2_ppp: ppp_change_state_debug: (rx_q[0]): [LCP/0x20010b48] state ACK_RECEIVED (7) => OPENED (9) (fsm_recv_configure_req():653)
    2025-07-14T11:55:15<dbg> net_l2_ppp: ppp_link_established: (rx_q[0]): [0x20010b10] Link established
    2025-07-14T11:55:15<dbg> net_l2_ppp: ppp_change_phase_debug: (rx_q[0]): [0x20010b10] phase ESTABLISH (1) => AUTH (2) (do_auth():74)
    2025-07-14T11:55:15<dbg> net_l2_ppp: ppp_link_authenticated: (rx_q[0]): [0x20010b10] Link authenticated
    2025-07-14T11:55:15<dbg> net_l2_ppp: ppp_change_phase_debug: (rx_q[0]): [0x20010b10] phase AUTH (2) => NETWORK (3) (do_network():34)
    2025-07-14T11:55:15<dbg> net_l2_ppp: ppp_fsm_open: (rx_q[0]): [IPCP/0x20010c20] Current state INITIAL (0)
    2025-07-14T11:55:15<dbg> net_l2_ppp: ppp_change_state_debug: (rx_q[0]): [IPCP/0x20010c20] state INITIAL (0) => STARTING (1) (ppp_fsm_open():349)
    2025-07-14T11:55:15<dbg> net_l2_ppp: ppp_fsm_lower_up: (rx_q[0]): [IPCP/0x20010c20] Current state STARTING (1)
    2025-07-14T11:55:15<dbg> net_l2_ppp: fsm_send_configure_req: (rx_q[0]): [IPCP/0x20010c20] Sending Configure-Req (1) id 1 to peer while in STARTING (1)
    2025-07-14T11:55:15<dbg> net_l2_ppp: ppp_send_pkt: (rx_q[0]): [IPCP/0x20010c20] Sending 24 bytes pkt 0x2009438c (options len 18)
    2025-07-14T11:55:15<dbg> net_l2_ppp: ppp_change_state_debug: (rx_q[0]): [IPCP/0x20010c20] state STARTING (1) => REQUEST_SENT (6) (ppp_fsm_lower_up():317)
    2025-07-14T11:55:15<dbg> net_l2_ppp: ppp_fsm_lower_up: (rx_q[0]): [PAP/0x20010cf8] Current state INITIAL (0)
    2025-07-14T11:55:15<dbg> net_l2_ppp: ppp_change_state_debug: (rx_q[0]): [PAP/0x20010cf8] state INITIAL (0) => CLOSED (2) (ppp_fsm_lower_up():312)
    2025-07-14T11:55:15<dbg> net_l2_ppp: net_pkt_hexdump: send L2
    2025-07-14T11:55:15<dbg> net_l2_ppp: net_pkt_hexdump: 0x20094348
                                         c0 21 02 02 00 04                                |.!....
    2025-07-14T11:55:15<dbg> net_l2_ppp: net_pkt_hexdump: send L2
    2025-07-14T11:55:15<dbg> net_l2_ppp: net_pkt_hexdump: 0x2009438c
                                         80 21 01 01 00 16                                |.!....
    2025-07-14T11:55:15<dbg> net_l2_ppp: net_pkt_hexdump: 0x2009438c
                                         03 06 00 00 00 00 81 06  00 00 00 00 83 06 00 00 |........ ........
                                         00 00                                            |..
    2025-07-14T11:55:15<dbg> net_l2_ppp: net_pkt_hexdump: recv L2
    2025-07-14T11:55:15<dbg> net_l2_ppp: net_pkt_hexdump: 0x20094788
                                         80 21 01 01 00 16 03 06  64 61 23 74 81 06 00 00 |.!...... da#t....
                                         00 00 83 06 00 00 00 00                          |........
    

    Can some engineers who are working on the Serial LTE application look into this?


    Thanks,

    Petr

Reply
  • Hi, 

    Here is the log before those changes in that commit. You can see that the reply to the configuration request contains two DNS servers.

    2025-07-14T11:44:10<dbg> net_l2_ppp: net_pkt_hexdump: 0x20095e48
                                         80 21 01 01 00 16 03 06  64 61 23 74 81 06 d9 0e |.!...... da#t....
                                         a0 82 83 06 d9 0e a4 23                          |.......#   

    Full log:

    2025-07-14T11:44:09<dbg> net_l2_ppp: ppp_fsm_input: (rx_q[0]): [LCP/0x20012208] LCP Configure-Req (1) id 2 payload len 0
    2025-07-14T11:44:09<dbg> net_l2_ppp: fsm_recv_configure_req: (rx_q[0]): [LCP/0x20012208] Current state ACK_RECEIVED (7)
    2025-07-14T11:44:09<dbg> net_l2_ppp: fsm_recv_configure_req: (rx_q[0]): [LCP/0x20012208] Sending Configure-Ack (2) id 2 to peer while in ACK_RECEIVED (7)
    2025-07-14T11:44:09<dbg> net_l2_ppp: ppp_send_pkt: (rx_q[0]): [LCP/0x20012208] Sending 6 bytes pkt 0x20095a08 (options len 0)
    2025-07-14T11:44:09<dbg> net_l2_ppp: ppp_change_state_debug: (rx_q[0]): [LCP/0x20012208] state ACK_RECEIVED (7) => OPENED (9) (fsm_recv_configure_req():653)
    2025-07-14T11:44:09<dbg> net_l2_ppp: ppp_link_established: (rx_q[0]): [0x200121d0] Link established
    2025-07-14T11:44:09<dbg> net_l2_ppp: ppp_change_phase_debug: (rx_q[0]): [0x200121d0] phase ESTABLISH (1) => AUTH (2) (do_auth():74)
    2025-07-14T11:44:09<dbg> net_l2_ppp: ppp_link_authenticated: (rx_q[0]): [0x200121d0] Link authenticated
    2025-07-14T11:44:09<dbg> net_l2_ppp: ppp_change_phase_debug: (rx_q[0]): [0x200121d0] phase AUTH (2) => NETWORK (3) (do_network():34)
    2025-07-14T11:44:09<dbg> net_l2_ppp: ppp_fsm_open: (rx_q[0]): [IPCP/0x200122e0] Current state INITIAL (0)
    2025-07-14T11:44:09<dbg> net_l2_ppp: ppp_change_state_debug: (rx_q[0]): [IPCP/0x200122e0] state INITIAL (0) => STARTING (1) (ppp_fsm_open():349)
    2025-07-14T11:44:09<dbg> net_l2_ppp: ppp_fsm_lower_up: (rx_q[0]): [IPCP/0x200122e0] Current state STARTING (1)
    2025-07-14T11:44:09<dbg> net_l2_ppp: fsm_send_configure_req: (rx_q[0]): [IPCP/0x200122e0] Sending Configure-Req (1) id 1 to peer while in STARTING (1)
    2025-07-14T11:44:09<dbg> net_l2_ppp: ppp_send_pkt: (rx_q[0]): [IPCP/0x200122e0] Sending 24 bytes pkt 0x20095a4c (options len 18)
    2025-07-14T11:44:09<dbg> net_l2_ppp: ppp_change_state_debug: (rx_q[0]): [IPCP/0x200122e0] state STARTING (1) => REQUEST_SENT (6) (ppp_fsm_lower_up():317)
    2025-07-14T11:44:09<dbg> net_l2_ppp: ppp_fsm_lower_up: (rx_q[0]): [PAP/0x200123b8] Current state INITIAL (0)
    2025-07-14T11:44:09<dbg> net_l2_ppp: ppp_change_state_debug: (rx_q[0]): [PAP/0x200123b8] state INITIAL (0) => CLOSED (2) (ppp_fsm_lower_up():312)
    2025-07-14T11:44:09<dbg> net_l2_ppp: net_pkt_hexdump: send L2
    2025-07-14T11:44:09<dbg> net_l2_ppp: net_pkt_hexdump: 0x20095a08
                                         c0 21 02 02 00 04                                |.!....
    2025-07-14T11:44:09<dbg> net_l2_ppp: net_pkt_hexdump: send L2
    2025-07-14T11:44:09<dbg> net_l2_ppp: net_pkt_hexdump: 0x20095a4c
                                         80 21 01 01 00 16                                |.!....
    2025-07-14T11:44:09<dbg> net_l2_ppp: net_pkt_hexdump: 0x20095a4c
                                         03 06 00 00 00 00 81 06  00 00 00 00 83 06 00 00 |........ ........
                                         00 00                                            |..
    2025-07-14T11:44:10<inf> adc: vbat = 3594, 3v6 = 3294
    2025-07-14T11:44:10<dbg> net_l2_ppp: net_pkt_hexdump: recv L2
    2025-07-14T11:44:10<dbg> net_l2_ppp: net_pkt_hexdump: 0x20095e48
                                         80 21 01 01 00 16 03 06  64 61 23 74 81 06 d9 0e |.!...... da#t....
                                         a0 82 83 06 d9 0e a4 23                          |.......#   

    Here is the log after those changes in the commit. The Serial LTE application do not send any DNS servers in the reply, just "00"

    2025-07-14T11:55:15<dbg> net_l2_ppp: net_pkt_hexdump: 0x20094788
                                         80 21 01 01 00 16 03 06  64 61 23 74 81 06 00 00 |.!...... da#t....
                                         00 00 83 06 00 00 00 00                          |........
    

    Full log:

    2025-07-14T11:55:15<dbg> net_l2_ppp: ppp_fsm_input: (rx_q[0]): [LCP/0x20010b48] LCP Configure-Req (1) id 2 payload len 0
    2025-07-14T11:55:15<dbg> net_l2_ppp: fsm_recv_configure_req: (rx_q[0]): [LCP/0x20010b48] Current state ACK_RECEIVED (7)
    2025-07-14T11:55:15<dbg> net_l2_ppp: fsm_recv_configure_req: (rx_q[0]): [LCP/0x20010b48] Sending Configure-Ack (2) id 2 to peer while in ACK_RECEIVED (7)
    2025-07-14T11:55:15<dbg> net_l2_ppp: ppp_send_pkt: (rx_q[0]): [LCP/0x20010b48] Sending 6 bytes pkt 0x20094348 (options len 0)
    2025-07-14T11:55:15<dbg> net_l2_ppp: ppp_change_state_debug: (rx_q[0]): [LCP/0x20010b48] state ACK_RECEIVED (7) => OPENED (9) (fsm_recv_configure_req():653)
    2025-07-14T11:55:15<dbg> net_l2_ppp: ppp_link_established: (rx_q[0]): [0x20010b10] Link established
    2025-07-14T11:55:15<dbg> net_l2_ppp: ppp_change_phase_debug: (rx_q[0]): [0x20010b10] phase ESTABLISH (1) => AUTH (2) (do_auth():74)
    2025-07-14T11:55:15<dbg> net_l2_ppp: ppp_link_authenticated: (rx_q[0]): [0x20010b10] Link authenticated
    2025-07-14T11:55:15<dbg> net_l2_ppp: ppp_change_phase_debug: (rx_q[0]): [0x20010b10] phase AUTH (2) => NETWORK (3) (do_network():34)
    2025-07-14T11:55:15<dbg> net_l2_ppp: ppp_fsm_open: (rx_q[0]): [IPCP/0x20010c20] Current state INITIAL (0)
    2025-07-14T11:55:15<dbg> net_l2_ppp: ppp_change_state_debug: (rx_q[0]): [IPCP/0x20010c20] state INITIAL (0) => STARTING (1) (ppp_fsm_open():349)
    2025-07-14T11:55:15<dbg> net_l2_ppp: ppp_fsm_lower_up: (rx_q[0]): [IPCP/0x20010c20] Current state STARTING (1)
    2025-07-14T11:55:15<dbg> net_l2_ppp: fsm_send_configure_req: (rx_q[0]): [IPCP/0x20010c20] Sending Configure-Req (1) id 1 to peer while in STARTING (1)
    2025-07-14T11:55:15<dbg> net_l2_ppp: ppp_send_pkt: (rx_q[0]): [IPCP/0x20010c20] Sending 24 bytes pkt 0x2009438c (options len 18)
    2025-07-14T11:55:15<dbg> net_l2_ppp: ppp_change_state_debug: (rx_q[0]): [IPCP/0x20010c20] state STARTING (1) => REQUEST_SENT (6) (ppp_fsm_lower_up():317)
    2025-07-14T11:55:15<dbg> net_l2_ppp: ppp_fsm_lower_up: (rx_q[0]): [PAP/0x20010cf8] Current state INITIAL (0)
    2025-07-14T11:55:15<dbg> net_l2_ppp: ppp_change_state_debug: (rx_q[0]): [PAP/0x20010cf8] state INITIAL (0) => CLOSED (2) (ppp_fsm_lower_up():312)
    2025-07-14T11:55:15<dbg> net_l2_ppp: net_pkt_hexdump: send L2
    2025-07-14T11:55:15<dbg> net_l2_ppp: net_pkt_hexdump: 0x20094348
                                         c0 21 02 02 00 04                                |.!....
    2025-07-14T11:55:15<dbg> net_l2_ppp: net_pkt_hexdump: send L2
    2025-07-14T11:55:15<dbg> net_l2_ppp: net_pkt_hexdump: 0x2009438c
                                         80 21 01 01 00 16                                |.!....
    2025-07-14T11:55:15<dbg> net_l2_ppp: net_pkt_hexdump: 0x2009438c
                                         03 06 00 00 00 00 81 06  00 00 00 00 83 06 00 00 |........ ........
                                         00 00                                            |..
    2025-07-14T11:55:15<dbg> net_l2_ppp: net_pkt_hexdump: recv L2
    2025-07-14T11:55:15<dbg> net_l2_ppp: net_pkt_hexdump: 0x20094788
                                         80 21 01 01 00 16 03 06  64 61 23 74 81 06 00 00 |.!...... da#t....
                                         00 00 83 06 00 00 00 00                          |........
    

    Can some engineers who are working on the Serial LTE application look into this?


    Thanks,

    Petr

Children
No Data
Related