summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-11-23plugin: Add VPN plugin that will interact with vpndJukka Rissanen2-0/+1167
2012-11-23provider: Support functions addedJukka Rissanen2-0/+67
2012-11-23provider: Remove functionality that is no longer usedJukka Rissanen2-890/+71
The VPN support functionality is moved into connman-vpnd.
2012-11-23provider: Add more driver interface functions needed by vpnd pluginJukka Rissanen1-0/+5
2012-11-23provider: Provider disconnect function made available to pluginJukka Rissanen4-7/+8
The VPN needs to be able to call the provider disconnect.
2012-11-23test: New VPN test script that connect to connman-vpndJukka Rissanen5-0/+182
2012-11-23test: Renamed old VPN scriptsJukka Rissanen3-3/+1
Renamed connect-vpn to connect-provider and disconnect-vpn to remove-provider In order to not confuse the user, change the name of the old vpn connect/disconnect script. Now the name of the script reflects the name of the manager dbus api. The connect-provider will use the old ConnectProvider manager dbus interface instead of directly connecting to connman-vpnd.
2012-11-23vpn: New vpn daemon that handles vpn connections and clientsJukka Rissanen27-234/+4510
2012-11-23log: Give program name and version in log initJukka Rissanen4-5/+7
This allows the correct output when the log functions are used from separate vpn daemon.
2012-11-23device: Move device creation func into device.cJukka Rissanen6-177/+182
The device creation function should be part of device.c and not inet.c. After this change the inet.c can be used by separate vpn daemon.
2012-11-23ipconfig: Move IP address API into separate ipaddress.c fileJukka Rissanen8-190/+266
Done so that connman_ipaddress_* functions can be used from separate vpn daemon.
2012-11-23doc: VPN daemon API descriptionsJukka Rissanen3-0/+275
2012-11-22core: Use interface index instead of interface namePatrik Flykt7-212/+198
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-11-19TODO: Add WiFi plugin data struct handling taskPatrik Flykt1-0/+13
2012-11-19dnsproxy: Use TCP connections only for the intended requestPatrik Flykt1-0/+5
The DNS proxy code creates and uses a TCP connection only for a single request at a time. A TCP DNS proxy is added to the end of the server list, but should not be used for generic requests as the connection will be closed down after the response to the initial request. Any other requests sent over the connection will silently disappear. Add a check to ignore TCP DNS servers for generic lookups.
2012-11-19dnsproxy: Check the result of socket creation when resolvingPatrik Flykt1-2/+6
If the socket creation failed, continue with the next server.
2012-11-19dnsproxy: Check GIO channel for NULL before usePatrik Flykt1-3/+7
Check GIO channel for NULL before using it. Also shut down the GIO channel so that already pending input will not use the free'd structure.
2012-11-16dnsproxy: Close the UDP socket on error condition.Forest Bond1-106/+124
The socket is created again on the next request. Previously, an error condition only caused the event watch to be removed and then added again on the next request to avoid processing spurious error events. But in some network environments, the error condition is caused by an overly aggressive firewall that rejects our UDP packets and sends an ICMP error packet indicating an unreachable host and/or port. In some of these cases we can recover by using a different UDP source port for outgoing requests (i.e. by closing and re-opening the socket).
2012-11-15ofono: Remove network if GPRS context is removedDaniel Wagner1-1/+3
Whenever the GPRS contextext is removed we need also to remove the network object. Following sequence was observed: cm_update_attached() /huawei_1 Attached 1 modem_changed() /huawei_1 Interfaces 0x07 Plugin creates network object and registers it at core cm_update_attached() /huawei_1 Attached 0 service.c:run_auto_connect() set_property() /huawei_1 path /huawei_1/context1 org.ofono.ConnectionContext.Active Obviously, the context is not attached at this point so we get an Failed to change property: /huawei_1/context1 org.ofono.ConnectionContext.Active: org.ofono.Error.NotAttached GPRS is not attached Fixes BMC#25725
2012-11-13iptables: A file descriptor cannot be a nagative integerDanny Jeongseok Seo1-1/+2
When a socket() has failed and a negative file descriptor has been set, close() cannot accept a negative number as a parameter.
2012-11-13manager: Fix negative error codeDanny Jeongseok Seo1-1/+1
Fix error code for __connman_error_failed
2012-11-13wifi: Handle D-Bus method call failurePatrik Flykt1-0/+8
If -ECONNABORTED is received from the gsupplicant network disconnect callback, it's an indication that the interface has already been removed from wpa_supplicant side. This can happen due to a race condition between rtnl and wpa_supplicant interface removal when a USB WiFi dongle is pulled out. The pointers given to the callback can no longer be trusted, don't touch them in the callback. The have been removed by other code at this point.
2012-11-13supplicant: Handle race condition on WiFi dongle removalPatrik Flykt1-4/+21
When a WiFi USB dongle is removed, both rtnl and wpa_supplicant will be telling that the device is gone. While disconnecting and removing an interface via gsupplicant, check that D-Bus doesn't give us an error indicating the interface is already unregistered from D-Bus. The gdb output looks like: (gdb) where #0 0x0042247c in network_connect (network=0x2) at plugins/wifi.c:1197 #1 0x004228f0 in disconnect_callback (result=<value optimized out>, interface=0x0, user_data=0x99) at plugins/wifi.c:1254 #2 0x0042b910 in network_remove_result (error=0x4d5458 "org.freedesktop.DBus.Error.UnknownMethod", iter=<value optimized out>, user_data=<value optimized out>) at gsupplicant/supplicant.c:3593 #3 0x0042ede0 in method_call_reply (call=0x4c6fd0, user_data=0x4d3be8) at gsupplicant/dbus.c:386 #4 0x2abfddb4 in complete_pending_call_and_unlock () from /usr/lib/libdbus-1.so.3 Also don't call the same callback twice.
2012-11-13bridge: Close socket on errorPatrik Flykt1-1/+3
2012-11-13gdhcp: Fix resource leakDanny Jeongseok Seo1-1/+1
The socket was not closed when the sendto failed.
2012-11-13gweb: Check null before referenceDanny Jeongseok Seo1-2/+2
2012-11-13inet: Fix resource leakDanny Jeongseok Seo1-3/+1
The socket was not closed when err < 0 is true.
2012-11-07wifi: Skip service if there is error while loading its settingsJukka Rissanen1-0/+4
If service settings cannot be loaded, then skip that service. Thanks for Felipe Tonello for reporting the issue.
2012-11-05README: Add information about network interface clearing at startupJukka Rissanen1-0/+5
2012-11-05session: Register session after policy plugin returned configDaniel Wagner1-75/+89
Move the configuration part of __connman_session_create() into session_create_cb(). With this change the policy plugin is able to do async work to retrieve a configuration.
2012-11-05session: Factor out user settings in __connman_session_create()Daniel Wagner1-23/+48
In order to be able to pass the user configuration provided through from the D-Bus Manager.SessionCreate() call to the callback we need to store the configuration into a local data data structure. This data structure can then be passed into the callback introduced later on.
2012-11-05session: Remove struct connman_session_bearerDaniel Wagner3-111/+35
Instead start using enum connman_service_type directly.
2012-11-05session: Handle no match case in parse_bearers()Daniel Wagner1-0/+9
2012-11-05session: parse_bearers() should check for invalid typesDaniel Wagner1-2/+9
2012-11-05session: Rename session_parse_allowed_bearers() to parse_bearers()Daniel Wagner1-5/+3
This function name was a source of confusion because in a later patch we introduce connman_session_parse_allowed_bearers() which will call parse_bearers(). With this change it should be more readable.
2012-11-05session: Remove match_all from connman_session_bearerDaniel Wagner2-36/+21
The match_all will be expressed through CONNMAN_SESSION_TYPE_UNKNOWN. The 'no match' case happens when allowed_bearers is NULL.
2012-11-05session: Remove name variable from connman_session_bearerDaniel Wagner2-8/+8
The string is only used when appending the bearer to the D-Bus message in append_allowed_bearers(). Let's use __connman_session_type2string() in append_allowed_bearers(). This saves a bit of memory.
2012-11-05session: Add callback to policy create()Daniel Wagner3-15/+40
Instead returning directly a config when create() is called in policy plugin, use a callback function for handing over a valid configuration from the plugin to the session core. This prepares support for asynchronous create call.
2012-11-05session: Policy register should check callback existenceDaniel Wagner1-0/+3
Let's ensure that the policy plugin has all necessary callbacks installed when connman_session_policy_register() is called. The rest of the code expects that the create() and destroy() callbacks exist whenever a plugin is used.
2012-11-05session: Pick directly first policy in listDaniel Wagner1-8/+3
There is no point in iterating over the list when we always pick the first element in the list.
2012-11-05session: Factor out memory release part of cleanup_sessionDaniel Wagner1-9/+14
We want to reuse this code snippet for the error case in __connman_session_create() too.
2012-11-05manager: Allow async CreateSession method callDaniel Wagner1-2/+6
The CreateSession D-Bus call should be marked as async call in order to allow the session core to defer the response.
2012-11-05storage: Add void if function does not have any argumentsDaniel Wagner2-7/+7
2012-11-02dhcp: Clear ipaddresses from ipconfig before starting DHCPJukka Rissanen1-0/+6
This is needed if manually configured addresses were used and later DHCP was taken into use. If the manually configured IP information (address, netmask and gateway) and the information given by DHCP is the same, DHCP will not set the IP address to the interface.
2012-11-02ipconfig: Add function to clear ipaddress informationJukka Rissanen2-0/+9
2012-10-29openvpn: Support '--tls-auth <file>' with optional '<direction>' argumentEmil Renner Berthing1-0/+14
Connman OpenVPN OpenVPN.TLSAuth --tls-auth <file> [<direction>] OpenVPN.TLSAuthDir optional <direction> argument to '--tls-auth' Since 'OpenVPN.TLSAuthDir' contains the optional <direction> argument for 'OpenVPN.TLSAuth', handle them separately. The special handling is identified by setting openvpn command line argument to NULL.
2012-10-29openvpn: Add more optionsEmil Renner Berthing1-0/+3
Connman OpenVPN OpenVPN.NSCertType --ns-cert-type <client|server> OpenVPN.AskPass --askpass <file> OpenVPN.AuthNoCache --auth-nocache
2012-10-26Release 1.91.9Marcel Holtmann2-1/+10
2012-10-26technology: Do not proceed with tethering if technology is not enabledTomasz Bursztyka1-0/+4
Fixes BMC#25846
2012-10-25systemd: prevent duplicate logging messages in journalMarti Raudsepp1-0/+1
By default, both stdout and syslog messages go to the systemd journal, which results in duplicate messages being logged. Thanks to Vinicius Costa Gomes for pointing out this problem.