platform/upstream/connman.git
13 years agortnl: Register all RDNSS search domains
Samuel Ortiz [Tue, 21 Dec 2010 15:57:14 +0000 (16:57 +0100)]
rtnl: Register all RDNSS search domains

13 years agortnl: Add support for RFC6106 DNSSL
David Woodhouse [Fri, 17 Dec 2010 22:31:53 +0000 (22:31 +0000)]
rtnl: Add support for RFC6106 DNSSL

13 years agortnl: Refactor RDNSS support so we can support DNSSL
David Woodhouse [Fri, 17 Dec 2010 22:31:30 +0000 (22:31 +0000)]
rtnl: Refactor RDNSS support so we can support DNSSL

Rather than registering the new nameserver as we hit the RDNSS option,
gather all the information first and then register the nameservers
after the loop.
That way, we can gather the search domains while we're looping, and
provide them when we register the nameservers.

13 years agoconnection: Add gateway host routes for non NULL gateways
Samuel Ortiz [Tue, 21 Dec 2010 11:50:31 +0000 (12:50 +0100)]
connection: Add gateway host routes for non NULL gateways

13 years agodhcp: Add IPv4LL support
Julien Massot [Mon, 20 Dec 2010 16:24:02 +0000 (16:24 +0000)]
dhcp: Add IPv4LL support

13 years agogdhcp: Add netmask getter
Julien Massot [Mon, 20 Dec 2010 16:24:01 +0000 (16:24 +0000)]
gdhcp: Add netmask getter

13 years agoopenvpn: Identation fixes
Samuel Ortiz [Tue, 21 Dec 2010 00:41:22 +0000 (01:41 +0100)]
openvpn: Identation fixes

13 years agoopenvpn: Move foreign_option_ parse code into its own function
Daniel Wagner [Mon, 20 Dec 2010 12:21:11 +0000 (13:21 +0100)]
openvpn: Move foreign_option_ parse code into its own function

Do not clutter the ov_notify loop with parsing code.

13 years agoopenvpn: Use ifconfig_remote as peer address
Daniel Wagner [Fri, 17 Dec 2010 14:52:04 +0000 (15:52 +0100)]
openvpn: Use ifconfig_remote as peer address

route_vpn_gateway is not in all configuration setup
the peer address.

13 years agoopenvpn: Append routes
Daniel Wagner [Fri, 17 Dec 2010 14:52:03 +0000 (15:52 +0100)]
openvpn: Append routes

13 years agoopenvpn: Add pushed routes
Daniel Wagner [Fri, 17 Dec 2010 14:52:02 +0000 (15:52 +0100)]
openvpn: Add pushed routes

We should add the routing entries pushed by the OpenVPN server.

13 years agoopenvpn: Pass in additional arguments
Daniel Wagner [Fri, 17 Dec 2010 14:52:01 +0000 (15:52 +0100)]
openvpn: Pass in additional arguments

Pass into the OpenVPN plugin:
     - protocol
     - port
     - auth_user_pass
     - tls-remote
     - cipher
     - auth
     - comp-lzo

13 years agoinet: Add connman_inet_[add|del]_network_route()
Daniel Wagner [Fri, 17 Dec 2010 14:52:00 +0000 (15:52 +0100)]
inet: Add connman_inet_[add|del]_network_route()

connman_inet_[add|del]_host_route() are now wrappers
around connman_inet_[add|del]_network_route()

13 years agoipconfig: Set method to OFF when the stored method is unknown
Samuel Ortiz [Fri, 17 Dec 2010 18:51:35 +0000 (19:51 +0100)]
ipconfig: Set method to OFF when the stored method is unknown

13 years agoservice: Set ipconfig structure to NULL if ipconfig_disable fails
Samuel Ortiz [Fri, 17 Dec 2010 17:38:24 +0000 (18:38 +0100)]
service: Set ipconfig structure to NULL if ipconfig_disable fails

13 years agoipconfig: Remove unused ipconfig_clone routine
Samuel Ortiz [Fri, 17 Dec 2010 17:08:45 +0000 (18:08 +0100)]
ipconfig: Remove unused ipconfig_clone routine

13 years agoopenconnect: Remove unused code
Daniel Wagner [Fri, 17 Dec 2010 12:02:20 +0000 (13:02 +0100)]
openconnect: Remove unused code

13 years agodnsproxy: Listen on IN6ADDR_ANY not Legacy INADDR_ANY
David Woodhouse [Thu, 16 Dec 2010 12:57:16 +0000 (12:57 +0000)]
dnsproxy: Listen on IN6ADDR_ANY not Legacy INADDR_ANY

We set the IPV6_V6ONLY sockopt so that Legacy IP connections also work.
Fall back to listening on INADDR_ANY if IPv6 family support isn't present.

13 years agodnsproxy: Fix {udp,tcp}_listener_event() to cope with requests over IPv6
David Woodhouse [Thu, 16 Dec 2010 12:56:59 +0000 (12:56 +0000)]
dnsproxy: Fix {udp,tcp}_listener_event() to cope with requests over IPv6

13 years agodnsproxy: Rename 'len' field in request_data
David Woodhouse [Thu, 16 Dec 2010 12:56:02 +0000 (12:56 +0000)]
dnsproxy: Rename 'len' field in request_data

Let's make it clear it's a sockaddr len.

13 years agoipconfig: Fix IPv6 config reference count initialization
Samuel Ortiz [Fri, 17 Dec 2010 14:21:27 +0000 (15:21 +0100)]
ipconfig: Fix IPv6 config reference count initialization

It should be set to 1 when created.

13 years agoofono: Delay ipconfig structure cleanup
Samuel Ortiz [Fri, 17 Dec 2010 11:14:30 +0000 (12:14 +0100)]
ofono: Delay ipconfig structure cleanup

Cleaning the structure before calling connman_network_set_connected(FALSE)
prevents the gateways from being properly freed.

13 years agoofono: Set regulatory domain from network MCC
Samuel Ortiz [Fri, 10 Dec 2010 23:44:00 +0000 (00:44 +0100)]
ofono: Set regulatory domain from network MCC

The regulatory domains can be set based on the GSM Mobile Country Code.

13 years agotechnology: Export set_regdom to plugins
Samuel Ortiz [Fri, 10 Dec 2010 20:13:04 +0000 (21:13 +0100)]
technology: Export set_regdom to plugins

The oFono plugin will be the first user.

13 years agowifi: Regulatory domain setting implementation
Samuel Ortiz [Thu, 9 Dec 2010 00:37:02 +0000 (01:37 +0100)]
wifi: Regulatory domain setting implementation

13 years agogsupplicant: Country setting implementation
Samuel Ortiz [Thu, 9 Dec 2010 00:33:40 +0000 (01:33 +0100)]
gsupplicant: Country setting implementation

This implements the Country wpa_supplicant global property setting, in
order to be able to set a regulatory domain.

13 years agogsupplicant: Support empty property set responses
Samuel Ortiz [Thu, 9 Dec 2010 00:31:54 +0000 (01:31 +0100)]
gsupplicant: Support empty property set responses

13 years agoTODO: Claim ownership of the available EAP tasks
Henri Bragge [Wed, 15 Dec 2010 12:23:41 +0000 (14:23 +0200)]
TODO: Claim ownership of the available EAP tasks

13 years agodoc: Fix the backtrace document
Samuel Ortiz [Wed, 15 Dec 2010 14:16:36 +0000 (15:16 +0100)]
doc: Fix the backtrace document

13 years agodoc: Typo fixes
Jean-Grégoire Foulon [Wed, 15 Dec 2010 09:15:53 +0000 (10:15 +0100)]
doc: Typo fixes

13 years agoiwmx: Fix build failure
Leena Gunda [Wed, 15 Dec 2010 04:00:19 +0000 (09:30 +0530)]
iwmx: Fix build failure

connman_network_set_method() has been replaced by an IPv4 or
an IPv6 version.

Fixes BMC#11315

13 years agonetwork: Don't set an IPv6 address if method is OFF or UNKNOWN
Samuel Ortiz [Wed, 15 Dec 2010 09:17:25 +0000 (10:17 +0100)]
network: Don't set an IPv6 address if method is OFF or UNKNOWN

13 years agoipconfig: Remove ipconfig_driver
Samuel Ortiz [Tue, 14 Dec 2010 18:22:36 +0000 (19:22 +0100)]
ipconfig: Remove ipconfig_driver

13 years agoipconfig: Remove connman_ipconfig_get_ipv6config
Samuel Ortiz [Tue, 14 Dec 2010 18:15:25 +0000 (19:15 +0100)]
ipconfig: Remove connman_ipconfig_get_ipv6config

13 years agoAUTHORS: Mention Jukka's contributions
Samuel Ortiz [Tue, 14 Dec 2010 18:06:40 +0000 (19:06 +0100)]
AUTHORS: Mention Jukka's contributions

13 years agoipconfig: Check for a valid IPv6 config before appending D-Bus data
Jukka Rissanen [Thu, 9 Dec 2010 11:11:54 +0000 (13:11 +0200)]
ipconfig: Check for a valid IPv6 config before appending D-Bus data

13 years agoipconfig: Check for a valid IPv4 config before appending D-Bus data
Jukka Rissanen [Thu, 9 Dec 2010 11:11:53 +0000 (13:11 +0200)]
ipconfig: Check for a valid IPv4 config before appending D-Bus data

13 years agoipconfig: Set the IPv6 gateway address only from an IPv6 config
Jukka Rissanen [Thu, 9 Dec 2010 11:11:52 +0000 (13:11 +0200)]
ipconfig: Set the IPv6 gateway address only from an IPv6 config

13 years agoipconfig: Return a valid IPv6 configuration
Jukka Rissanen [Thu, 9 Dec 2010 11:11:51 +0000 (13:11 +0200)]
ipconfig: Return a valid IPv6 configuration

13 years agoipconfig: Define 2 separate pointers for IPv4 and IPv6
Jukka Rissanen [Thu, 9 Dec 2010 11:11:50 +0000 (13:11 +0200)]
ipconfig: Define 2 separate pointers for IPv4 and IPv6

This patch does not yet enable IPv6 only network support but it is
required for later work.

13 years agoservice: __connman_service_notify() prototype change
Jukka Rissanen [Thu, 9 Dec 2010 11:11:49 +0000 (13:11 +0200)]
service: __connman_service_notify() prototype change

In preparation for the IPv6 only support, this makes the code more
readable.

13 years agoipconfig: Allow more than one IP address per device
Jukka Rissanen [Thu, 9 Dec 2010 11:11:48 +0000 (13:11 +0200)]
ipconfig: Allow more than one IP address per device

13 years agoipconfig: Do not add duplicate IP address to the address list
Jukka Rissanen [Thu, 9 Dec 2010 11:11:47 +0000 (13:11 +0200)]
ipconfig: Do not add duplicate IP address to the address list

13 years agonetwork: Remove ipconfig from the network structure
Jukka Rissanen [Thu, 9 Dec 2010 11:11:46 +0000 (13:11 +0200)]
network: Remove ipconfig from the network structure

This is not used at all.

13 years agoipconfig: Make sure ipconfig is not null before de referencing it
Jukka Rissanen [Thu, 9 Dec 2010 11:11:45 +0000 (13:11 +0200)]
ipconfig: Make sure ipconfig is not null before de referencing it

13 years agodhcp: Add function to clear DHCP configuration
Julien Massot [Fri, 10 Dec 2010 11:00:35 +0000 (11:00 +0000)]
dhcp: Add function to clear DHCP configuration

13 years agogdhcp: Add IPv4 Link-Local support
Julien Massot [Fri, 10 Dec 2010 11:00:33 +0000 (11:00 +0000)]
gdhcp: Add IPv4 Link-Local support

IPv4 Link-Local negociation starts on gdhcp client failure.

13 years agodevice: Reset device->connections and device->scanning on device enable
Mohamed Abbas [Thu, 9 Dec 2010 00:37:16 +0000 (16:37 -0800)]
device: Reset device->connections and device->scanning on device enable

Make sure we reset these value since the device just enabled.

13 years agogsupplicant: Dont allow scanning while associating
Mohamed Abbas [Mon, 13 Dec 2010 15:32:35 +0000 (16:32 +0100)]
gsupplicant: Dont allow scanning while associating

In gsupplicant defer any scanning if association is in progress.

13 years agonetwork: Keep device->connections counter in sync
Mohamed Abbas [Thu, 9 Dec 2010 00:37:12 +0000 (16:37 -0800)]
network: Keep device->connections counter in sync

Calling __connman_device_decrease_connections from set_connnected
can decrease the connections counter twice on disconnect.

13 years agoMention Julien's contributions
Samuel Ortiz [Fri, 10 Dec 2010 10:51:33 +0000 (11:51 +0100)]
Mention Julien's contributions

13 years agogdhcp: Fix server listener watch events list
Samuel Ortiz [Fri, 10 Dec 2010 10:50:19 +0000 (11:50 +0100)]
gdhcp: Fix server listener watch events list

Add G_IO_NVAL, G_IO_ERR and G_IO_HUP to the events list.

13 years agogdhcp: Fix client listener watch events list
Julien Massot [Fri, 10 Dec 2010 10:47:01 +0000 (11:47 +0100)]
gdhcp: Fix client listener watch events list

Add G_IO_NVAL, G_IO_ERR and G_IO_HUP to the events list.

13 years agogdhcp: Fix spelling mistake
Julien Massot [Fri, 10 Dec 2010 10:04:05 +0000 (10:04 +0000)]
gdhcp: Fix spelling mistake

13 years agotools: Rename stats-ringbuffer-dump to stats-tool
Daniel Wagner [Fri, 10 Dec 2010 08:53:58 +0000 (09:53 +0100)]
tools: Rename stats-ringbuffer-dump to stats-tool

Due to new functionality added to the stats-ringbuffer-dump tool
it is now called stats-tool.

Besides to dump statistic ring buffer files it also allows to create
them for testing.

Furthermore, it create history files now too.

13 years agostats: Sum stats ring buffer up info history file
Daniel Wagner [Thu, 9 Dec 2010 12:49:33 +0000 (13:49 +0100)]
stats: Sum stats ring buffer up info history file

When the ring buffer (SERVICE_NAME.data file) is full then it
is summarized into a history (SERVICE_NAME.history) file.

The history file has the same format as the data file.

13 years agoconfigure: Decrease default size of stats files
Daniel Wagner [Mon, 6 Dec 2010 17:12:21 +0000 (18:12 +0100)]
configure: Decrease default size of stats files

13 years agogdbus: fix accessing freed callback data
Johan Hedberg [Thu, 9 Dec 2010 19:52:54 +0000 (21:52 +0200)]
gdbus: fix accessing freed callback data

cb->disc_func or cb->conn_func could remove the callback so this needs
to be checked for before continuing processing.

13 years agodhcp: Handle proxy PAC option correctly
David Woodhouse [Tue, 7 Dec 2010 23:29:49 +0000 (23:29 +0000)]
dhcp: Handle proxy PAC option correctly

We're requesting the unofficial proxy option (252) but then throwing
away the response because we don't recognise the type for it.

This fixes proxy detection via DHCP.

13 years agortnl: Call __connman_technology_add_interface() after rtnl->newlink()
Martin Xu [Thu, 9 Dec 2010 15:10:54 +0000 (16:10 +0100)]
rtnl: Call __connman_technology_add_interface() after rtnl->newlink()

The device is created and the underlying technology attached from
the rtnl newlink hook, so __connman_technology_add_interface() needs
to be called after it.

13 years agotechnology: Add support for regulatory domain notification
Samuel Ortiz [Thu, 9 Dec 2010 00:28:15 +0000 (01:28 +0100)]
technology: Add support for regulatory domain notification

13 years agotechnology: Set technology driver to NULL when unregistering
Samuel Ortiz [Wed, 8 Dec 2010 18:39:58 +0000 (19:39 +0100)]
technology: Set technology driver to NULL when unregistering

13 years agoRevert "main: Stop rfkill after the plugins"
Samuel Ortiz [Wed, 8 Dec 2010 18:35:44 +0000 (19:35 +0100)]
Revert "main: Stop rfkill after the plugins"

This reverts commit b2a4246439738b5e9a262da77d56d99d348da36a.

13 years agogdbus: explicitly compare pointers to NULL
Lucas De Marchi [Sat, 27 Nov 2010 19:39:01 +0000 (17:39 -0200)]
gdbus: explicitly compare pointers to NULL

This patch was generated by the following semantic patch
(http://coccinelle.lip6.fr/)

// <smpl>
@fix disable is_null,isnt_null1@
expression *E;
@@

- !E
+ E == NULL
// </smpl>

13 years agotechnology: Fix technology refcount
Samuel Ortiz [Wed, 8 Dec 2010 15:52:19 +0000 (16:52 +0100)]
technology: Fix technology refcount

The blocked getter was bumping the technology refcount by calling
technology_get() instead of technology_find().

13 years agomain: Stop rfkill after the plugins
Samuel Ortiz [Wed, 8 Dec 2010 15:04:22 +0000 (16:04 +0100)]
main: Stop rfkill after the plugins

In order to catch rfkill device deletion and to propagate those events
to the technology layer properly.

13 years agodnsproxy: Stop polling a nameserver when connect fails
Samuel Ortiz [Wed, 8 Dec 2010 14:57:12 +0000 (15:57 +0100)]
dnsproxy: Stop polling a nameserver when connect fails

The server data structure also needs to be cleaned up.

13 years agoethernet: Add USB CDC tethering support
Martin Xu [Wed, 8 Dec 2010 11:27:13 +0000 (12:27 +0100)]
ethernet: Add USB CDC tethering support

13 years agoAdd CONNMAN_DEVICE_TYPE_GADGET and CONNMAN_SERVICE_TYPE_GADGET
Martin Xu [Wed, 8 Dec 2010 08:28:40 +0000 (16:28 +0800)]
Add CONNMAN_DEVICE_TYPE_GADGET and CONNMAN_SERVICE_TYPE_GADGET

13 years agoinet: Add connman_inet_[add|remove]_to_bridge() routines
Martin Xu [Wed, 8 Dec 2010 08:28:39 +0000 (16:28 +0800)]
inet: Add connman_inet_[add|remove]_to_bridge() routines

13 years agoFix SYSTEMD_UNITDIR typo
Ian Lee [Wed, 8 Dec 2010 00:13:12 +0000 (00:13 +0000)]
Fix SYSTEMD_UNITDIR typo

13 years agotethering: Set tethering_status earlier
Martin Xu [Fri, 3 Dec 2010 11:06:47 +0000 (19:06 +0800)]
tethering: Set tethering_status earlier

With synchronous technologies (e.g. ethernet),
connman_technology_tethering_notify() is called immediatly after
enabling or disabling tethering. If tethering_status is not properly
set, then that will fail.

13 years agodnsproxy: Support multiple search domain per service
Samuel Ortiz [Tue, 7 Dec 2010 15:52:48 +0000 (16:52 +0100)]
dnsproxy: Support multiple search domain per service

The server data structure now takes a domain list instead of a single
domain string.

13 years agoresolver: Add support for multiple search domains
Henri Bragge [Tue, 7 Dec 2010 08:49:38 +0000 (10:49 +0200)]
resolver: Add support for multiple search domains

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.

13 years agodnsproxy: Ignore adding and removing of NULL servers
Henri Bragge [Fri, 3 Dec 2010 12:42:30 +0000 (14:42 +0200)]
dnsproxy: Ignore adding and removing of NULL servers

13 years agogresolv: Destroy query after removing it from the resolv queue
Samuel Ortiz [Tue, 7 Dec 2010 11:16:57 +0000 (12:16 +0100)]
gresolv: Destroy query after removing it from the resolv queue

Fixes BMC#10958

13 years agogresolv: Remove ipv6 query from the resolv queue
Samuel Ortiz [Tue, 7 Dec 2010 11:15:43 +0000 (12:15 +0100)]
gresolv: Remove ipv6 query from the resolv queue

13 years agowifi: Fix technology driver name and type
Samuel Ortiz [Mon, 6 Dec 2010 23:14:23 +0000 (00:14 +0100)]
wifi: Fix technology driver name and type

13 years agoofono: Fix signal strength report
Samuel Ortiz [Fri, 3 Dec 2010 23:25:38 +0000 (00:25 +0100)]
ofono: Fix signal strength report

13 years agortnl: Receive notification of RDNSS from IPv6 router advertisements
David Woodhouse [Fri, 3 Dec 2010 01:20:31 +0000 (01:20 +0000)]
rtnl: Receive notification of RDNSS from IPv6 router advertisements

13 years agoresolver: Handle temporary nameservers with automatic expiry
David Woodhouse [Fri, 3 Dec 2010 01:20:13 +0000 (01:20 +0000)]
resolver: Handle temporary nameservers with automatic expiry

We'll need this for servers discovered by RDNSS in IPv6 RA

13 years agoRemove selftest file and option
Samuel Ortiz [Thu, 2 Dec 2010 16:56:16 +0000 (17:56 +0100)]
Remove selftest file and option

13 years agodnsproxy: Fix handling of IPv6 nameservers
David Woodhouse [Thu, 2 Dec 2010 14:16:51 +0000 (14:16 +0000)]
dnsproxy: Fix handling of IPv6 nameservers

13 years agoservice: Initiate scan when not retrying a failed connection
Samuel Ortiz [Thu, 2 Dec 2010 16:00:53 +0000 (17:00 +0100)]
service: Initiate scan when not retrying a failed connection

13 years agotest: simple-agent support for ReportError method call
Patrik Flykt [Thu, 2 Dec 2010 14:09:16 +0000 (16:09 +0200)]
test: simple-agent support for ReportError method call

simple-agent receives the ReportError method call and prompts whether to
retry the service.

13 years agoservice: Call __connman_agent_report_error when a service fails to connect
Patrik Flykt [Thu, 2 Dec 2010 14:09:15 +0000 (16:09 +0200)]
service: Call __connman_agent_report_error when a service fails to connect

When a service fails, call __connman_agent_report_error to send an
ReportError method call to the agent. Sending of ReportError is requested
only if the service was connected due to a D-Bus request. Thus automatic
connection creation will be done silently without invoking an agent.

13 years agoagent: Agent API ReportError method call
Patrik Flykt [Thu, 2 Dec 2010 14:09:14 +0000 (16:09 +0200)]
agent: Agent API ReportError method call

The __connman_agent_report_error function creates and sends a ReportError
method call to the registered agent. The agent can reply with D-Bus error
org.moblin.connman.Agent.Error.Retry if the same service is to be retried.

13 years agoservice: Create service_complete helper function
Patrik Flykt [Thu, 2 Dec 2010 14:09:13 +0000 (16:09 +0200)]
service: Create service_complete helper function

The service_complete helper function factors out reply sending to clients,
running autoconnect and updating service modification time.

13 years agodoc: Fix Agent API error definitions
Patrik Flykt [Thu, 2 Dec 2010 14:09:12 +0000 (16:09 +0200)]
doc: Fix Agent API error definitions

D-Bus errors renamed to org.moblin.connman.Agent.* since object paths are
not allowed to be used as error name components.

13 years agowifi: Register technology driver
Samuel Ortiz [Tue, 30 Nov 2010 19:12:34 +0000 (20:12 +0100)]
wifi: Register technology driver

13 years agotechnology: Add regulatory domain framework
Samuel Ortiz [Tue, 30 Nov 2010 19:11:20 +0000 (20:11 +0100)]
technology: Add regulatory domain framework

13 years agogresolv: Implement RFC3484 rule 9 (prefer longest matching prefix)
David Woodhouse [Thu, 2 Dec 2010 11:00:03 +0000 (11:00 +0000)]
gresolv: Implement RFC3484 rule 9 (prefer longest matching prefix)

13 years agogresolv: Add scope handling to RFC3484 sort
David Woodhouse [Thu, 2 Dec 2010 10:25:58 +0000 (10:25 +0000)]
gresolv: Add scope handling to RFC3484 sort

13 years agogresolv: First partial implementation for RFC3484 sorting
David Woodhouse [Thu, 2 Dec 2010 09:14:51 +0000 (09:14 +0000)]
gresolv: First partial implementation for RFC3484 sorting

13 years agogresolv: Calculate precedence/label/etc required for RFC3484 sorting
David Woodhouse [Thu, 2 Dec 2010 02:47:53 +0000 (02:47 +0000)]
gresolv: Calculate precedence/label/etc required for RFC3484 sorting

13 years agogresolv: Don't convert results to strings so early
David Woodhouse [Thu, 2 Dec 2010 00:25:30 +0000 (00:25 +0000)]
gresolv: Don't convert results to strings so early

We're going to want results in sockaddr form for sorting, so let's put
them directly into the array we'll want for the sort process, even though
we haven't actually implemented sorting yet.

We can ditch the support for arbitrary callbacks from the individual
queries, too; there's no need for that. The callback to user code comes
from the *lookup*, having combined the A and AAAA query results.

13 years agogresolv: Send A and AAAA queries, merge results for lookup callback
David Woodhouse [Wed, 1 Dec 2010 21:49:16 +0000 (21:49 +0000)]
gresolv: Send A and AAAA queries, merge results for lookup callback

13 years agogresolv: Start handling AAAA results in query
David Woodhouse [Wed, 1 Dec 2010 16:49:05 +0000 (16:49 +0000)]
gresolv: Start handling AAAA results in query

13 years agogresolv: Fix handling of IPv6 nameservers
David Woodhouse [Wed, 1 Dec 2010 16:40:52 +0000 (16:40 +0000)]
gresolv: Fix handling of IPv6 nameservers

If IPv6 nameservers were specified in /etc/resolv.conf, we would end up
sending NS queries to 0.0.0.0 because we weren't parsing the __res_state
structure correctly. We were assuming that all listed nameservers would
be Legacy IP.

Also fix connect_udp_channel() to generate the address correctly instead
of just asssuming Legacy IP.

13 years agogresolv: Handle POLLERR on DNS UDP socket
David Woodhouse [Wed, 1 Dec 2010 16:35:58 +0000 (16:35 +0000)]
gresolv: Handle POLLERR on DNS UDP socket

If we get an error on the UDP socket, we'll currently go into an endless
loop eating CPU with poll() returning POLLERR and us ignoring it.

This at least hooks things up so that our callback gets called, and we
stop looping. But the callback's handling of POLLERR isn't correct. It
should close the socket and open a new one. As it is, it's just going to
try to use the same broken socket again for the next request. But at least
with this patch it'll stop eating CPU.