summaryrefslogtreecommitdiff
path: root/plugins
AgeCommit message (Collapse)AuthorFilesLines
2013-01-30bluetooth: Register technology driverPatrik Flykt1-1/+31
2013-01-30bluetooth: Add new bluetooth pluginPatrik Flykt1-0/+49
2013-01-30bluetooth: Rename bluetooth plugin to bluetooth_legacyPatrik Flykt1-6/+9
Set the plugin priority to CONNMAN_PLUGIN_PRIORITY_LOW and the technology priority to -10. Update strings to "bluetooth_legacy" and use ordinary string instead of ident.
2013-01-30ofono: Use ordinary string instead of identPatrik Flykt1-1/+1
The string is only used for debugging purposes.
2013-01-30dundee: Use ordinary string instead of identPatrik Flykt1-1/+1
The string is only used for debugging purposes.
2013-01-04core: Remove WiMAX definitions from codePatrik Flykt1-1/+0
2013-01-04plugins: Remove WiMAX plugin filesPatrik Flykt3-1822/+0
2012-12-21session-policy-local: Check policy being non-NULL before usingPatrik Flykt1-1/+3
When running unit/test-session the following happens if SELinux is disabled but --enable-session-policy-local is specified for ./configure: connmand[6468]: src/session.c:__connman_session_create() owner :1.269 connmand[6468]: src/dbus.c:selinux_get_context_reply() Failed to retrieve SELinux context connmand[6468]: src/session.c:session_create_cb() session 0x2388dc0 config (nil) connmand[6468]: Aborting (signal 11) [src/connmand] connmand[6468]: ++++++++ backtrace ++++++++ connmand[6468]: #0 0x7f5b2b8184f0 in /lib/x86_64-linux-gnu/libc.so.6 connmand[6468]: #1 0x4379b4 in policy_local_destroy() at plugins/session_policy_local.c:245 connmand[6468]: #2 0x46703f in free_session() at src/session.c:258 connmand[6468]: #3 0x468603 in session_create_cb() at src/session.c:1710 connmand[6468]: #4 0x4377e7 in selinux_context_reply() at plugins/session_policy_local.c:201 connmand[6468]: #5 0x461366 in selinux_get_context_reply() at src/dbus.c:475 connmand[6468]: #6 0x7f5b2c66b1ca in /lib/x86_64-linux-gnu/libdbus-1.so.3 connmand[6468]: #7 0x7f5b2c66e293 in /lib/x86_64-linux-gnu/libdbus-1.so.3 connmand[6468]: #8 0x410aa8 in message_dispatch() at gdbus/mainloop.c:76 connmand[6468]: #9 0x7f5b2c8eeeeb in /lib/x86_64-linux-gnu/libglib-2.0.so.0 connmand[6468]: #10 0x7f5b2c8ee355 in /lib/x86_64-linux-gnu/libglib-2.0.so.0 connmand[6468]: #11 0x7f5b2c8ee688 in /lib/x86_64-linux-gnu/libglib-2.0.so.0 connmand[6468]: #12 0x7f5b2c8eea82 in /lib/x86_64-linux-gnu/libglib-2.0.so.0 connmand[6468]: #13 0x410592 in main() at src/main.c:672 connmand[6468]: #14 0x7f5b2b804ead in /lib/x86_64-linux-gnu/libc.so.6 connmand[6468]: +++++++++++++++++++++++++++
2012-12-14vpn: Clear pending connect flag on connect attemptPatrik Flykt1-0/+2
Fixes BMC#25894
2012-12-10vpn-plugin: Check completion of configure and connectPatrik Flykt1-16/+14
When creating a configuration, wait until both configuration and connection has been done. Otherwise NULL user data is passed to the callback which then cannot relay an error to the caller and the caller will get a timeout waiting for a reply from D-Bus.
2012-12-10vpn-plugin: Propagate most common errors to callback functionPatrik Flykt1-4/+14
Instead of always setting the create callback function error to -ECONNREFUSED, create a helper function to detect the two most often emitted errors.
2012-12-10session_policy_local: Create policy directory if necessaryDaniel Wagner1-0/+12
Create the policy directory as first thing. If we don't do this adding a watch on the non existing directory will fail and the whole plugin is not loaded. We need to figure out later how permissive the MODE of the directory should be. Currently, we play safe and have it tied down.
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.