{"action":"created","issue":{"url":"https://api.github.com/repos/tass-belgium/picotcp/issues/341","labels_url":"https://api.github.com/repos/tass-belgium/picotcp/issues/341/labels{/name}","comments_url":"https://api.github.com/repos/tass-belgium/picotcp/issues/341/comments","events_url":"https://api.github.com/repos/tass-belgium/picotcp/issues/341/events","html_url":"https://github.com/tass-belgium/picotcp/issues/341","id":119234074,"number":341,"title":"pico_sntp_sync() attempts to perform DNS resolution on IP addresses","user":{"login":"mateuszviste","id":9503501,"avatar_url":"https://avatars.githubusercontent.com/u/9503501?v=3","gravatar_id":"","url":"https://api.github.com/users/mateuszviste","html_url":"https://github.com/mateuszviste","followers_url":"https://api.github.com/users/mateuszviste/followers","following_url":"https://api.github.com/users/mateuszviste/following{/other_user}","gists_url":"https://api.github.com/users/mateuszviste/gists{/gist_id}","starred_url":"https://api.github.com/users/mateuszviste/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mateuszviste/subscriptions","organizations_url":"https://api.github.com/users/mateuszviste/orgs","repos_url":"https://api.github.com/users/mateuszviste/repos","events_url":"https://api.github.com/users/mateuszviste/events{/privacy}","received_events_url":"https://api.github.com/users/mateuszviste/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tass-belgium/picotcp/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-11-27T18:34:30Z","updated_at":"2016-01-25T20:37:23Z","closed_at":null,"body":"When I call ```pico_sntp_sync(\"1.2.3.4\", &cb_sntp)```, picoTCP tries to resolve \"1.2.3.4\" as a hostname, generating DNS requests. I do not believe this is right - rather ```pico_sntp_sync()``` should either accept an IP structure and let the application deal with DNS, or it should test the argument for being a valid IPv4 and/or IPv6 address before attempting any DNS resolution.\r\nSee tcpdump output below.\r\n\r\n```\r\n# tcpdump -ni tapdosemu port 123 or port 53\r\ntcpdump: verbose output suppressed, use -v or -vv for full protocol decode\r\nlistening on tapdosemu, link-type EN10MB (Ethernet), capture size 262144 bytes\r\n19:28:17.276176 IP 192.168.0.22.23756 > 192.168.0.1.53: 28637+ AAAA? 1.2.3.4. (30)\r\n19:28:17.276261 IP 192.168.0.22.4310 > 192.168.0.1.53: 19183+ A? 1.2.3.4. (30)\r\n19:28:17.276524 IP 192.168.0.1.53 > 192.168.0.22.23756: 28637 NXDomain 0/0/0 (30)\r\n19:28:17.276669 IP 192.168.0.1.53 > 192.168.0.22.4310: 19183* 1/0/0 A 1.2.3.4 (46)\r\n19:28:17.285585 IP 192.168.0.22.2553 > 1.2.3.4.123: NTPv4, Client, length 48\r\n^C\r\n5 packets captured\r\n```"},"comment":{"url":"https://api.github.com/repos/tass-belgium/picotcp/issues/comments/174655090","html_url":"https://github.com/tass-belgium/picotcp/issues/341#issuecomment-174655090","issue_url":"https://api.github.com/repos/tass-belgium/picotcp/issues/341","id":174655090,"user":{"login":"toonst","id":5477573,"avatar_url":"https://avatars.githubusercontent.com/u/5477573?v=3","gravatar_id":"","url":"https://api.github.com/users/toonst","html_url":"https://github.com/toonst","followers_url":"https://api.github.com/users/toonst/followers","following_url":"https://api.github.com/users/toonst/following{/other_user}","gists_url":"https://api.github.com/users/toonst/gists{/gist_id}","starred_url":"https://api.github.com/users/toonst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toonst/subscriptions","organizations_url":"https://api.github.com/users/toonst/orgs","repos_url":"https://api.github.com/users/toonst/repos","events_url":"https://api.github.com/users/toonst/events{/privacy}","received_events_url":"https://api.github.com/users/toonst/received_events","type":"User","site_admin":false},"created_at":"2016-01-25T20:37:23Z","updated_at":"2016-01-25T20:37:23Z","body":"Good point. Yes I think that would be the best way to do it while keeping the API. We certainly have to think about a deprecation strategy. This probably also applies to #318 ."}}