summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-04-26conf: Add description of PersistentTetheringModeJukka Rissanen1-0/+5
2013-04-26ethernet: Add tethering supportJukka Rissanen3-1/+133
2013-04-26rtnl: Interface was added to technology too earlyJukka Rissanen1-4/+12
The __connman_technology_add_interface() needs to be called after we have created the technology which is done by rtnl->newlink() callback. If this is done the old way, the ethernet devices will not get their interfaces set properly.
2013-04-26device: Add support functions needed by ethernet tetheringJukka Rissanen2-0/+46
2013-04-26main: Add support for AllowedTetheringTechnologies configuration variableJukka Rissanen1-0/+17
2013-04-26conf: Add description of AllowedTetheringTechnologiesJukka Rissanen1-0/+12
2013-04-23client: Trim off spaces from user inputPatrik Flykt1-8/+20
After splitting the input string into components, create a new array holding the non-zero substrings as input for the commands. Thus the input can start and end as well as divide its separate parts by any number spaces.
2013-04-23client: Add command completionPatrik Flykt3-0/+37
Add completion support for connmanctl commands.
2013-04-23client: Follow coding stylePatrik Flykt3-5/+6
Follow coding style and use __connmanctl prefix for the commands() function.
2013-04-23client: Add support for tetheringPatrik Flykt1-0/+175
Add tethering support. For WiFi also set the SSID and passphrase if they have been specified on the command line. Check that setting both SSID and passphrase succeed before trying to enable tethering. After successfully setting SSID and passphrase for WiFi, use the boolean value parsing helper function return value to decide whether WiFi tethering is to be enabled, disabled or not modified. Fixes BMC#25886
2013-04-18dbus: Add connman_dbus_get_connnection_unix_user()Daniel Wagner2-0/+101
The UID is fetched via org.freedesktop.DBus.GetConnectionUnixUser D-Bus method call.
2013-04-18dbus: Refactor callback helper structDaniel Wagner1-7/+8
The helper struct will be used by a new dbus function which uses a different callback signature. Therefore, we need to use a void pointer for storing the callback.
2013-04-18session: Do not fail when creating default policy configurationDaniel Wagner3-26/+5
Do not handle the small alloc failures because glib will abort when memory is tight anyway.
2013-04-18session: Change to "func_t" postfix to callback typedefDaniel Wagner3-8/+8
Streamline the callback typedefs with the rest of the code.
2013-04-18session_policy_local: Use callback helpersDaniel Wagner1-7/+9
Use the generic callback helpers to encapsulate struct create_data. In a later patch we will add some more data elemets to struct create_data. That is the reason why it is not remove here.
2013-04-18session_policy_local: Load policy when a new file is addedDaniel Wagner1-0/+7
When a file is added (not modified) we need to parse it as well
2013-04-18session_policy_local: Do not free policy on load errorDaniel Wagner1-2/+5
We should not unref the policy on parsing errors becase the policy lifetime is attached to the lifetime of the file. When the file is removed we remove it from the hash table.
2013-04-18session_policy_local: Empty policy list indicated no match allDaniel Wagner1-8/+3
Match all is expressed via CONNMAN_SERVICE_TYPE_UNKNOWN. An empty list means no match.
2013-04-18session_policy_local: Set default policy using common codeDaniel Wagner1-4/+2
Use connman_sessoin_set_default_config() instead of open coded version. This prepars the next fix.
2013-04-18session: Empty policy list indicated no match allDaniel Wagner1-1/+1
Match all is expressed via CONNMAN_SERVICE_TYPE_UNKNOWN. An empty list means no match.
2013-04-18session: Do not try to access already removed hashDaniel Wagner1-0/+3
Make sure we never try to cleanup when the hash table has been destroyed. In this case all resources have been freed already.
2013-04-18session: Reorder shutdown sequenceDaniel Wagner1-1/+1
By calling __connman_session_cleanup() before __connman_plugin_cleanup() we make sure all resources allocated can released in the correct order. The code assumes after an successful allocation, free will always work and therefore we double free allocated memory.
2013-04-15wifi: improve fix to avoid device double release on disableGrant Erickson1-35/+11
Per MEEGO-25999 <https://bugs.meego.com/show_bug.cgi?id=25999>, there exists a race between scan_callback and wifi_disable such that a care- fully-timed deassertion of the technology Powered property between throw_wifi_scan and scan_callback will lead to a device reference count underflow. A second Powered property false -> true -> false transition will then deallocate the device and Wi-Fi will no longer function until connman or the system is restarted. This patch improves upon and revises the prior patch to address this issue by recognizing that hidden networks involve a slightly different code path and timing and that both this and the prior case can be addressed by tracking the device scanning state and only releasing the device when the state is asserted.
2013-04-13tools: Rename dnsproxy-unit to dnsproxy-testJukka Rissanen3-4/+4
Rename the dnsproxy file as it is more of a test tool than a unit test.
2013-04-13tools: Make message buffers staticJukka Rissanen1-3/+3
2013-04-13service: Set state properly after disconnecting the associating serviceJukka Rissanen1-1/+3
This is related to fix d7d8f8bdb7c1ddae098893e10608fcb42034a9ff We did not set the state to idle after disconnecting the associating service. Fixes BMC#25981
2013-04-12wifi: avoid device double release on disableGrant Erickson1-2/+38
Per MEEGO-25999 <https://bugs.meego.com/show_bug.cgi?id=25999>, there exists a race between scan_callback and wifi_disable such that a care- fully-timed deassertion of the technology Powered property between throw_wifi_scan and scan_callback will lead to a device reference count underflow. A second Powered property false -> true -> false transition will then deallocate the device and Wi-Fi will no longer function until connman or the system is restarted. This patch addresses that race by tracking and observing the disabling state such that scan_callback ad wifi_disable can effectively negotiate which has performed the device release, thereby avoiding the double release and resulting underflow.
2013-04-08Release 1.131.13Marcel Holtmann2-1/+16
2013-04-08build: Add dnsproxy-unit to .gitignoreMarcel Holtmann1-0/+1
2013-04-08gdbus: Fix not calling property_changed callbackLuiz Augusto von Dentz1-13/+10
In case a property did not appear by the time proxy_added was called property_changed has to be called if it appear latter otherwise the application will be unaware of it.
2013-04-08gdbus: Use gcc builtin instead of g_atomicLucas De Marchi1-6/+6
g_atomic_* end up using G_STATIC_ASSERT, causing gcc 4.8 to yell due to -Wunused-local-typedefs. gdbus/client.c: In function ‘g_dbus_client_ref’: /usr/include/glib-2.0/glib/gmacros.h:162:53: error: typedef ‘_GStaticAssertCompileTimeAssertion_2’ locally defined but not used [-Werror=unused-local-typedefs] #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1]
2013-04-08vpn: Host IP address was not freedJukka Rissanen1-0/+1
The host ip address field is only used if user has given vpn server as a host name instead of host ip address.
2013-04-08vpn: Free ip address before allocating a new oneJukka Rissanen1-0/+1
Possible memory leak here as we might have ip address allocated already.
2013-04-08dnsproxy: Fix cached message length correctlyJukka Rissanen1-1/+5
We must copy the response buffer before fixing the packet length. Otherwise the packet length will go wrong if the request contained EDNS0 data.
2013-04-06client: Add --help, -h optionsPatrik Flykt1-1/+10
2013-04-05tools: Add unit test for dnsproxyJukka Rissanen2-1/+468
2013-04-05dnsproxy: Handle partial TCP messages from clientJukka Rissanen1-65/+410
We were not handling client sent partial TCP messages correctly. This meant that ConnMan would block if the client using TCP would not send full DNS request. When a new TCP client connects in tcp_listener_event(), a new TCP channel is created to handle a partial client message if all of the message is not already available. The partial TCP message is patched together in tcp_client_event(). When all of the TCP message has been received, the message is processed in read_tcp_data(). The client has to send the DNS request within two seconds before the connection is closed by ConnMan.
2013-04-05service: Drop unused argument in preferred_tech_list_get()Daniel Wagner1-2/+2
2013-04-05client: Fix help text, IPv4 setting uses netmaskPatrik Flykt1-1/+1
2013-04-05dnsproxy: Create cache if it is missing when doing lookupJukka Rissanen1-42/+56
2013-04-05dnsproxy: Fix memory leak when request timeoutsJukka Rissanen1-13/+13
2013-04-05dnsproxy: Avoid null pointer accessJukka Rissanen1-2/+2
2013-04-05dnsproxy: Do not add or remove ::1 serverJukka Rissanen1-0/+6
2013-04-05dnsproxy: Use ::1 when refreshing because of the address familyJukka Rissanen1-1/+1
2013-04-05dnsproxy: Add or remove ::1 to/from resolv.conf when necessaryJukka Rissanen1-9/+35
We add IPv6 loopback address to resolv.conf if we have created an IPv6 listening socket to port 53. Also remove ::1 from resolv.conf when deleting the proxy.
2013-04-05dnsproxy: Listen only on needed addressesJukka Rissanen1-91/+225
Do not bind to ANY address so that other DNS server applications can be used on the same host for interfaces that are not managed by ConnMan. This means that we only create DNS listeners on loopback and tethering interfaces.
2013-04-05inet: Get an address from a given interface and address familyJukka Rissanen2-0/+56
The returned address is used when we need to have a listening socket tied to specific interface and address, and do not want to bind to any address.
2013-04-04client: Move boolean parsing helper function to commands filePatrik Flykt3-27/+26
The helper function is not used elsewhere, thus move it.
2013-04-04client: Remove now obsolete functions and filesPatrik Flykt10-1237/+5
Remove now obsolete files from services. Remove data_manager, dbus and technology .h and .c files. Update Makefile.am accordingly.
2013-04-04client: Remove now obsolete functionPatrik Flykt1-6/+0