Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #94 (private IP querying) #100

Closed
wants to merge 1 commit into from

Conversation

jeannustre
Copy link

Changes from DataDog/dd-sdk-ios#830

Also added 'GENERATE_INFOPLIST_FILE = YES;' to Tests target in order for tests to run.

Changes from DataDog/dd-sdk-ios#830
Also added 'GENERATE_INFOPLIST_FILE = YES;' to Tests target in order for tests to run.

Signed-off-by: jean <[email protected]>
@Reflejo
Copy link
Contributor

Reflejo commented Aug 22, 2022 via email

@jeannustre
Copy link
Author

I'm getting the system prompt asking for local network access with the default configuration, using Clock.sync() with no parameters, so that would be time.apple.com only.

@Reflejo
Copy link
Contributor

Reflejo commented Aug 23, 2022 via email

@jeannustre
Copy link
Author

My use case is the same as issue #94 : in an iOS app, using just Clock.sync() seems to trigger a system pop-up requesting access to the local network under certain conditions.

I have had it happen some time ago on my device but did not take note of my network configuration, sorry. I have been receiving user reports about it but did not reproduce it myself since.

Reading up more on DataDog's repo, I see that their fix I made a PR with is not working entirely on their end, sadly. But they have investigated the matter a lot more than I, maybe the issue there will be interesting to you.

@jeannustre jeannustre closed this Mar 8, 2023
@zettlunic
Copy link

Hey folks! We're seeing similar reports from our users. What came to my mind is that time.apple.com might be resolved to something weird (cached?) for certain networks or mobile data providers. Anyways, we'll run a fork including this fix + using a different NTP host. I can update here if this reduces the occurrences of hitting the local network prompt.

Cheers!

@jeannustre
Copy link
Author

Hi @zettlunic, did this seem to help ? We are also considering using another NTP host (pool.ntp.org) to see if the issue still occurs.

@Reflejo
Copy link
Contributor

Reflejo commented Apr 5, 2023

It's still totally possible to get to this situation if the NTP server for some reason resolves to a private ip range. Like a local gateway serving as a dnsd can do that. Some wifi networks do that for redirecting to a landing, etc.

@zettlunic
Copy link

Hi @zettlunic, did this seem to help ? We are also considering using another NTP host (pool.ntp.org) to see if the issue still occurs.

@jeannustre unfortunately it did not. Even resolving pool.ntp.org lead to the prompt. See https://developer.apple.com/forums/thread/709691 for more details, I've also filed a feedback report (FB12047743) which hasn't been responded to.

@Reflejo
Copy link
Contributor

Reflejo commented Jun 20, 2023

As I mentioned before. I can definitely see how this happens. This is how it can happen:

  • You connect to a WiFi network
  • Through DHCP you get assigned dns IPs to a local gateway (say 192.168.1.1)
  • While resolving pool.ntp.org, the gateway points to 192.168.1.1
    • This could happen either because it's running an ntp server or more likely because you are on a guest network and it's trying to present you with a login wall

I guess a way this could be solved is to have a defaultNTPIPWhileOnLAN sort of fallback?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants