nRF9160 DNS cache & TTL

We are using the nRF9160 with a cellular service provider that has quite a strict firewall policy. There are rejected connections and we suspect a problem with cached DNS lookups in the nRF91.

To be more specific, the firewall at the provider does white-listing based on FQDNs. If a mobile device performs a DNS lookup, then a subsequent connection to the IP address in the DNS response will be allowed by the firewall, but only according to the time-to-live. If no lookup is made or the TTL of an earlier lookup has expired, the connection is blocked.

According to the provider's investigation, the nRF91 does not issue another DNS lookup every time we call nrf_getaddrinfo, even if the TTL has elapsed.

This is with modem firmware 1.3.5. The 1.3.6 release notes do not mention anything specific to DNS, so we haven't tried that.

Is it correct that the nRF91 caches DNS responses for longer than the TTL permits?

Is there a way to change this behavior and force it to respect the TTL?

Is there a way to disable, clear, or dump the DNS cache?

Parents Reply Children
  • Okay, good to know, thanks.

    What we could also see in pcap captures is that the NRF91 performs an IPV6 DNS request and gets a response with only CNAME record, and it does not perform an IPV4 DNS request. This might be an indication that the modem implementation mixes IPV6 and IPV4 responses, which is wrong.

    But we've just done some IPV4-only tests where the same (or similar?) issue occurs - we still need to look at the captures. I haven't activated modem traces yet.

Related