summaryrefslogtreecommitdiff
path: root/src/resolver.c
AgeCommit message (Collapse)AuthorFilesLines
2018-01-23Updated connman to version 1.35Seonah Moon1-24/+54
Change-Id: I13526fbf80296a79be15548fc226a308941ac9ec Signed-off-by: Taesub Kim <taesub.kim@samsung.com>
2018-01-08Imported Upstream version 1.35upstream/1.35Seonah Moon1-35/+63
Change-Id: I174854914d9fd06a813270b57d1f7bc2bac63c6a Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
2017-03-14Apply DNS configuration methodsubmit/tizen/20170322.011410accepted/tizen/wearable/20170322.235735accepted/tizen/unified/20170322.235830accepted/tizen/tv/20170322.235708accepted/tizen/mobile/20170322.235633accepted/tizen/ivi/20170322.235801accepted/tizen/common/20170322.153711Seonah Moon1-0/+12
Change-Id: If16e739fde7e9d736c66015ab1efa982e49d3482 Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
2016-06-17[SPIN] Fix the connman bugs.Niraj Kumar Goit1-0/+5
- Fixed NTP service's DNS resolving failure in Hive project. - Do not turn "wlan0" interface down in cleanup_devices(). - Set resource limits "RLIMIT_NOFILE" for a process. - After appending a file, fflush and fsync all modified in-core data of the file. Change-Id: I2767b3302d6204d066fe2075027828ff209d0ee0 Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
2016-04-26Imported Upstream version 1.29upstream/1.29taesubkim1-8/+0
Change-Id: I2958446c35966d9ed72df0120b80561be7d89f54 Signed-off-by: Taesub Kim <taesub.kim@samsung.com>
2015-08-07Base Code merged to SPIN 2.4submit/tizen/20150810.034432hyunuktak1-32/+2
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com> Change-Id: I84a42375b5c59739e4caca1f726699ea7647ef17
2015-07-28Modified smack label for resolv.conf filesubmit/tizen/20150728.100704taesub.kim1-0/+9
Change-Id: Ifd271983fdd1752bad4840f29964f5c103738aba Signed-off-by: Taesub Kim <taesub.kim@samsung.com>
2014-07-17Imported Upstream version 1.24upstream/1.24Zhang zhengguang1-28/+90
2012-11-22core: Use interface index instead of interface namePatrik Flykt1-73/+60
Service and network code use only interface indexes. Convert the rest of the code using interface names to use interface indexes instead. The files affected are: include/resolver.h src/connman.h src/dnsproxy.c src/resolver.c src/rtnl.c src/service.c src/tethering.c As the network and service code used interface indexes, the interface name had to be looked up via a SIOCGIFNAME ioctl when needed. If a service was removed due to the interface and network being taken down, the lookup wouldn't work. This caused DNS servers to be left behind with broken sockets since removing the DNS servers was done using the interface name.
2012-09-26resolver: Make sure we do not use already removed timerJukka Rissanen1-0/+1
2012-09-26resolver: Do not touch IPv4 servers in redo caseJukka Rissanen1-0/+13
The name server refresh should be only done for IPv6 nameservers.
2012-09-04Use g_slist_prepend() where appropriatePatrik Flykt1-3/+3
Convert usage of g_slist_append() to g_slist_prepend() where appropriate. gdbus, dnsproxy, resolver, rtnl, session and session unit test have ordering requirements and thus not touched.
2012-05-28resolver: Clean up remove functionPatrik Flykt1-6/+3
A search domain will have it's server attribute set to NULL, thus remove that explicit check. Also when comparing entry elements to the given attributes, consider NULL being equal to NULL.
2012-05-28resolver: Simplify code to return if a resolver entry existsPatrik Flykt1-9/+6
2012-05-22resolver: Send RS before RDNSS lifetime expiresElena Tebesoi1-4/+61
Implemented feature from RFC 6106 section '5.1. Recursive DNS Server Option': "Lifetime 32-bit unsigned integer. ... Hosts MAY send a Router Solicitation to ensure the RDNSS information is fresh before the interval expires." Host will send RS when a certain threshold of RDNSS lifetime is reached. Values which can be adjusted: - lifetime threshold - set to 80% from lifetime - number of retries in case RA is not received - set to 0 - time between retries, in case RA is not received - set to 3 seconds
2012-05-22resolver: Fixed cleanup of Resolver timerElena Tebesoi1-0/+7
When connman is restarted, DNS servers are removed and added again with function __connman_resolver_redo_servers(). While removing a DNS entry, one should also remove the resolver timer registered for it. Not doing so, causes the timeout handler resolver_expire_cb to fire without being explicitly set.
2012-05-15resolver: Do not try to update service if server is not setJukka Rissanen1-1/+1
2012-05-15resolver: Allow update to domain if server is not setJukka Rissanen1-1/+1
2012-05-15resolver: Follow connman coding styleJukka Rissanen1-4/+4
2012-04-29core: Update copyright informationMarcel Holtmann1-1/+1
2012-04-24resolver: Use proper IPv6 source address when sending DNS queriesJukka Rissanen1-0/+33
This fix is for following scenario: - New interface is coming up. - There is radvd in the connected network and it is advertising IPv6 addresses and DNS servers. - Kernel receives router advertisement and picks up the DNS server information which is then routed via netlink to rtnl.c:rtnl_newnduseropt() which then creates DNS listener. - Kernel activates DAD (duplicate address detection). - As the DAD takes some time we now have interface up and it only has link local IPv6 address defined. - The DNS listener is now using link local source addresses when sending queries instead of proper autoconfigured addresses. - When DAD is finished, the interface will have autoconfigured addresses assigned and corresponding netlink message will cause function rtnl.c:process_newaddr() to be called. - If all this happens, then we re-create DNS listener in dnsproxy.c so that listener will have a proper (autoconfigured) source address when sending DNS packets.
2012-04-12resolver: Append fallback nameserversPatrik Flykt1-26/+9
Append fallback nameservers, if any. Remove functions for adding removing public nameservers since they are not used anymore.
2012-02-13resolver: Domain name was not setJukka Rissanen1-1/+1
When service sets the domain name, the server is NULL. We must allow this as otherwise dnsproxy will not be able to append domain name into DNS queries. Fixes BMC#24712
2011-12-16resolver: Fix memory leak when resolver is stoppedJukka Rissanen1-0/+32
2011-11-28service: Support automatically added nameserversJukka Rissanen1-1/+52
IPv6 autoconfigured nameservers can be added to resolver via netlink messages in rtnl.c. Because of this they are not seen in service object so we need to get those auto added nameserver to be added in service.c so that service can show them to user if necessary. Fixes BMC#24196
2011-10-26core: Fix compilation in MeeGoJukka Rissanen1-0/+1
The _GNU_SOURCE needs to be defined so that O_CLOEXEC symbols can be found in system header files. The source does not compile without the patch in MeeGo 1.2
2011-10-25core: Add O_CLOEXEC to open()Daniel Wagner1-1/+1
Make sure all file descriptor are closed.
2011-04-18resolver: Fix some minor whitespace issuesMarcel Holtmann1-13/+12
2011-01-31dnsproxy: Fallback to resolv.conf if dnsproxy failsDaniel Wagner1-1/+13
In case dnsproxy can't create the socket listener we should fall back to resolv.conf. Reported by Kalle Valo <kalle.valo@canonical.com>
2011-01-26resolver: Only support resolv.conf and dnsproxyDaniel Wagner1-245/+155
Remove resolver module support.
2010-12-07resolver: Add support for multiple search domainsHenri Bragge1-4/+27
Domains are appended to entry list just like nameservers, and finally exported to /etc/resolv.conf. Domains are written to resolv.conf in reverse order so that the most recently appended domain will have the highest priority. Search domains should only be useful for resolvfile_resolver and should be ignored by dnsproxy_resolver.
2010-12-03resolver: Handle temporary nameservers with automatic expiryDavid Woodhouse1-5/+65
We'll need this for servers discovered by RDNSS in IPv6 RA
2010-12-02Remove selftest file and optionSamuel Ortiz1-43/+0
2010-11-26Remove moblin.org domain from resolver selftestMarcel Holtmann1-1/+1
2010-09-25Remove EDNS0 optionSamuel Ortiz1-2/+1
Many routers block EDNS0 DNS requests and that leads to a non working DNS resolver for ConnMan. This option can now be removed and have dnsproxy fallling back to DNS over TCP for big DNS replies. The optimal solution would be to keep this option and disable it on the fly for nameserver paths rejecting EDNS0 packets. Unfortunately ConnMan is not able to detect those paths at the moment and so simply falls back to DNS over TCP.
2010-07-26Add a resolver flush methodSamuel Ortiz1-0/+21
The flush method sends any pending resolving requests. A resolver can queue requests to some pending list when e.g. it knows ConnMan is offline.
2010-05-08Minor coding style updateMarcel Holtmann1-5/+5
2010-05-08Add support multiple nameservers in /etc/resolv.confForest Bond1-17/+94
Nameservers are appended to a local entry list. The MAXNS most recently appended nameservers are written to /etc/resolv.conf in reverse order (the most recently appended entry becomes the primary nameserver).
2010-01-01Update copyright informationMarcel Holtmann1-1/+1
2009-12-24Fix permissions of newly created /etc/resolv.confMarcel Holtmann1-4/+20
2009-12-18Store flag for public DNS serversMarcel Holtmann1-12/+25
2009-12-18Ignore DNS servers without an interface for nowMarcel Holtmann1-0/+3
2009-12-14Add support for using public DNS serversMarcel Holtmann1-1/+79
2009-12-14Tell resolver to enable EDNS0 supportMarcel Holtmann1-0/+1
With EDNS0 enabled it is possible to receive larger DNS responses over UDP without the requirement for using TCP. Potentially this could cause interop issues with some weird DNS servers, but it seems that also other operating systems enable this by default.
2009-11-26Fix segmentation fault on resolver shutdownMarcel Holtmann1-1/+1
2009-05-30Don't add useless domain and search entries to resolv.confMarcel Holtmann1-2/+0
2009-04-13Fix handling of DHCP results with no nameserverMarcel Holtmann1-0/+3
2009-03-25Fix wrong error return valueMarcel Holtmann1-1/+1
2009-03-25Add proper comment to generated /etc/resolv.conf fileMarcel Holtmann1-1/+4
2009-01-03Make /etc/resolv.conf modification part of the daemonMarcel Holtmann1-0/+62