summaryrefslogtreecommitdiff
path: root/plugins
AgeCommit message (Collapse)AuthorFilesLines
2012-12-05session_policy: Remove dummy pluginDaniel Wagner1-101/+0
The default configuration will be created by the core if no plugin is used. Therefore there is no need for this plugin.
2012-12-05session_policy_local: Rename session_policy_iviDaniel Wagner1-27/+27
On popular request the plugin is renamed. The plugin is reading local files and has nothing to do with IVI.
2012-12-05session_policy_ivi: Initialize variable and remove an unused oneDaniel Wagner1-2/+1
Remove unused 'err' variable and properly initialize 'ident' for error cases.
2012-11-26vpn: Cleanup properly if vpn connect failsJukka Rissanen1-2/+4
Make sure that user callback data is cleared correctly if vpn connect attempt fails.
2012-11-26vpn: Cleanup vpn connections when vpnd diesJukka Rissanen1-0/+2
2012-11-26vpn: Do not remove vpn connections hash when vpnd diesJukka Rissanen1-14/+9
We must keep the vpn connections hash alive as long as connman is running. We must not remove the hash when vpnd dies, otherwise we might feed null pointer to various glib hash functions.
2012-11-23session_policy_ivi: Implement policy load functionDaniel Wagner1-1/+105
If config file should also be parsed and the values then stored in the config object.
2012-11-23session_policy_ivi: Watch for changes on policy filesDaniel Wagner1-4/+92
Monitor changes on the config files. Either create, modify or destroy them according the events we get from the inotify interface.
2012-11-23session_policy_ivi: Add hash table to track identsDaniel Wagner1-0/+43
Introduce the second hash table which tracks the config object lifetime based on the file existens. The parsing of the file and creation of the config object is part of the next patch.
2012-11-23session_policy_ivi: Create session configDaniel Wagner1-3/+115
The policy data object is refcounted because the policy data object can be created either through the session core or from the file based policy. In order to avoid complex logic which tries to figure out when to is safe to destroy the object we just fall back to refcountig. polich_hash is the owner of the policy object. When a object is created it is stored there. The key is the identitfier. Since the session core does not know about the identifier we introduce an additional hash table which maps from session pointer to the policy object.
2012-11-23session_policy_ivi: Get SELinux context of session ownerDaniel Wagner1-1/+95
2012-11-23session_policy_ivi: Add policy plugin for IVIDaniel Wagner1-0/+91
Add only the empty 'framework'. In the following patches we add step by step the implementation.
2012-11-23vpn: Remove unused variableDaniel Wagner1-2/+0
2012-11-23provider: Add callback when creating vpn providerJukka Rissanen1-42/+126
Because the vpnd Create() in manager API only creates and does not connect the vpn, we must do the connect part after the vpn is created. This requires a callback which is called when the connection is established. Eventually this patch becomes obsolete because the CreateProvider() connman API is deprecated.
2012-11-23vpn: Hash provider data using the ident instead of pathJukka Rissanen1-39/+79
Needed as sometimes we do not know the path but know the ident.
2012-11-23vpn: Resolve vpn hostname if necessaryJukka Rissanen1-1/+105
2012-11-23provider: Refactor server and user route handlingJukka Rissanen1-25/+442
The server and user route handling is refactored in order to reflect the vpn dbus API changes. The routes are now array of dicts in dbus API.
2012-11-23plugin: Add VPN plugin that will interact with vpndJukka Rissanen1-0/+1164
2012-11-23vpn: New vpn daemon that handles vpn connections and clientsJukka Rissanen7-2403/+0
2012-11-23device: Move device creation func into device.cJukka Rissanen1-2/+2
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-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-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-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-05session: Remove struct connman_session_bearerDaniel Wagner1-9/+1
Instead start using enum connman_service_type directly.
2012-11-05session: Add callback to policy create()Daniel Wagner1-4/+10
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-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-16wifi: Do not start autoscan if interface was not readyTomasz Bursztyka1-1/+4
2012-10-16gsupplicant: Add a new state according to 'interface_disabled'Tomasz Bursztyka1-0/+3
When soft rfkill is on, wpa_supplicant sets the interface disabled and sends a state named 'interface_disabled'. Taking this information into account fixes the following issue: - disable wifi (user setting) and hard rfkill it - then un-hard rfkill it, whereafter rfkill states (soft/hard) will go like this: * from 1/1 to 0/0 * from 0/0 to 1/0 when 0/0 occurs, connman will request to enable wifi The problem with this is that enabling wifi takes quite some time and in between ConnMan will soft block wifi to disable it (according to previous user setting). Thus it will request to disable wifi but since enabling is still going on, this request won't do anything. Meanwhile wpa_supplicant will also catch the soft rfkill event and wpa_supplicant will set the state to 'interface_disabled', but since it's not handled properly by ConnMan, the wifi_enable() callback will be called and the function will assume wifi got enabled.
2012-10-02session: Move the default config create part back to coreDaniel Wagner1-11/+1
2012-09-27session_policy: Use bearer free functionDaniel Wagner1-10/+1
2012-09-27session: Remove unused functionsDaniel Wagner1-30/+0
Basic types are not used for the configuration anymore.
2012-09-27session_policy: Implement create() and destroy()Daniel Wagner1-0/+63
2012-09-27session: Use session pointer instead of string idDaniel Wagner1-4/+6
Instead of passing in some string to identify we can use the connman_session pointer. This allows us to keep the way sessions are identfied away from the core, e.g. using the D-Bus owner id or something else.
2012-09-27session: Add plugin priorityDaniel Wagner1-0/+1
Support several session configuration plugins at runtime. Set the default priority to low for the current policy plugin.
2012-09-27session: Rename session_config to session_policyDaniel Wagner1-10/+10
2012-09-24wifi: Fix tethering with kernel 3.5Artem Bityutskiy1-3/+0
Wifi tethering works with kernel 3.4, but not with 3.5. Bisecting showed that the following kernel patch causes the breakage: "3edaf3e mac80211: manage AP netdev carrier state". Running connman with debugging enabled showed that in case of 3.4 we have the following sequence of RTM_NEWLINK events from the kernel: 1. IFF_UP not set, ifi_change=1 2. IFF_UP,IFF_LOWER_UP, ifi_change=1 which makes connman do the following: connmand[210]: plugins/wifi.c:wifi_newlink() index 4 flags 4098 change 1 connmand[210]: plugins/wifi.c:wifi_newlink() interface down connmand[210]: plugins/wifi.c:wifi_newlink() index 4 flags 69635 change 1 connmand[210]: plugins/wifi.c:wifi_newlink() interface up connmand[210]: plugins/wifi.c:wifi_newlink() carrier on connmand[210]: plugins/wifi.c:handle_tethering() index 4 bridge tether However, in 3.5 we have the following sequents of events from the kernel: 1. IFF_UP, ifi_change=1 2. IFF_UP,IFF_LOWER_UP, ifi_change=0 which makes connman do the following: connmand[493]: plugins/wifi.c:wifi_newlink() index 4 flags 4099 change 1 connmand[493]: plugins/wifi.c:wifi_newlink() interface up connmand[493]: plugins/wifi.c:wifi_newlink() index 4 flags 69635 change 0 The root-cause for it is that connman handles the "ifi_change" flag incorrectly. Connman interprets it as "if non-zero, there was some change", which is wrong. According to RFC 3549, it is "reserved for future use. Must be set to 0xFFFFFFFF". Thus, just remove that check, which makes tethering work.
2012-09-14session: Fix configuration plugin buildDaniel Wagner1-2/+2
Instead of allow the user configuring which plugin should build and used via issuing 'configure --with-configplugin=foo' add explicit enable flags 'configure --enable-session-policy'. Also with this patch, the name is changed from session-default to session-policy.
2012-09-04Use g_slist_prepend() where appropriatePatrik Flykt2-2/+2
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-08-30session: Move RoamingPolicy to configuration pluginDaniel Wagner1-2/+5
The RoamingPolicy setting which should be set by the platform integrator and not by the application developper is moved the configuration plugin.
2012-08-30session: Move EmergencyCall to configuration pluginDaniel Wagner1-0/+2
Instead fallback using the configuration plugin for selecting the emergency application. Now we don't have to update all other sessions which makes the whole code logic more straight forward. If a session is marked as an emergency call and this application calls Connect()/Disconnect() it will succedd and block all other sessions when they try to call Connect() or Disconnect().
2012-08-30session: Move Priority to configuration pluginDaniel Wagner1-2/+7
The Priority setting which should be set by the platform integrator and not by the application developer is moved the configuration plugin.
2012-08-30session: Add configuration pluginDaniel Wagner1-0/+76
2012-08-24pptp: Fix PPTP option typoPatrik Flykt1-1/+1
Fixes BMC#25660
2012-08-23pptp: Get VPN gateway resolved IP addressJukka Rissanen1-1/+1
We should not use the Host variable from provider as it can contain a non-resolved address. Fixes BMC#25658
2012-08-23l2tp: Get VPN gateway resolved IP addressJukka Rissanen1-1/+1
We should not use the Host variable from provider as it can contain a non-resolved address.
2012-08-23vpn: Accept also "true" or "1" as a boolean valueJukka Rissanen3-3/+9
Currently user is able to set the boolean VPN config value only by setting the variable to "yes". This is not very intuitive so accept also the value of "true" or "1".
2012-08-23device: Refactor device scan functionJukka Rissanen2-84/+65
In wifi plugin this means that we combine three wifi scan functions (normal, fast, hidden) into one scan function.
2012-08-22wifi: Ignore duplicate hidden APsJukka Rissanen1-23/+46
We must not add duplicate entries to list of hidden AP. There can be more that one service file for each AP if we have multiple wifi cards in the system. Fixes BMC#24779
2012-08-22wifi: Always Scan hidden APsJukka Rissanen1-7/+0
We should scan hidden AP even if the AP is not marked as autoconnectable so that the user is able to connect to it manually.