summaryrefslogtreecommitdiff
path: root/src/connection.c
AgeCommit message (Collapse)AuthorFilesLines
2018-01-23Updated connman to version 1.35Seonah Moon1-74/+19
Change-Id: I13526fbf80296a79be15548fc226a308941ac9ec Signed-off-by: Taesub Kim <taesub.kim@samsung.com>
2018-01-08Imported Upstream version 1.35upstream/1.35Seonah Moon1-74/+19
Change-Id: I174854914d9fd06a813270b57d1f7bc2bac63c6a Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
2017-04-25Added some logs for debuggingSeonah Moon1-0/+6
Change-Id: I3a133fa6aebd28dea42f7dfd9ecb42d04c45f291 Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
2016-06-17[SPIN] Fix the connman bugs.Niraj Kumar Goit1-0/+7
- Fixed NTP service's DNS resolving failure in Hive project. - Do not turn "wlan0" interface down in cleanup_devices(). - Set resource limits "RLIMIT_NOFILE" for a process. - After appending a file, fflush and fsync all modified in-core data of the file. Change-Id: I2767b3302d6204d066fe2075027828ff209d0ee0 Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
2016-06-14[SPIN] change the cellular activation logic.Niraj Kumar Goit1-0/+48
desc: with IPv6, current telephony plugin has not proper logic. set state and activation for cellular service logic is changed. it also affects normal cellular service connection. Change-Id: I48f214ceab2f0f7c6e3f8bead185cc8f1fd2a87a Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
2016-04-26Imported Upstream version 1.29upstream/1.29taesubkim1-8/+4
Change-Id: I2958446c35966d9ed72df0120b80561be7d89f54 Signed-off-by: Taesub Kim <taesub.kim@samsung.com>
2015-10-06Sync with Tizen 2.4(1.29.36)submit/tizen/20151020.082803accepted/tizen/wearable/20151020.111030accepted/tizen/tv/20151020.111019accepted/tizen/mobile/20151020.111002taesub.kim1-0/+9
Change-Id: I02fc50820cccc66aed702a97a9928981e73b43cf Signed-off-by: Taesub Kim <taesub.kim@samsung.com>
2015-08-07Base Code merged to SPIN 2.4submit/tizen/20150810.034432hyunuktak1-8/+4
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com> Change-Id: I84a42375b5c59739e4caca1f726699ea7647ef17
2014-10-29Imported Upstream version 1.26upstream/1.26Zhang zhengguang1-1/+1
2014-07-17Imported Upstream version 1.24upstream/1.24Zhang zhengguang1-174/+173
2012-08-15connection: Disconnect VPN when underlaying service disconnectsJukka Rissanen1-41/+63
Fixes BMC#25128
2012-08-09connection: Set VPN default route to the VPN interfaceJukka Rissanen1-16/+4
Do not bother setting individual routes for default gateway so for VPN we set the whole interface as a default gateway route.
2012-08-09connection: Add more debugging when setting VPN routesJukka Rissanen1-0/+7
2012-05-18connection: Refactor VPN route setupJukka Rissanen1-64/+72
2012-05-08connection: Fix possible NULL dereferenceAdrien Bustany1-15/+19
2012-05-08connection: Fix host route to VPN serverDaniel Wagner1-2/+13
The kernel will ignore host routes which are bogus. In case of a PtP connection such as PPP for cellular the gateway address should not be used.
2012-05-02connection: Set host route to VPN serverJukka Rissanen1-8/+24
This is needed so that we can access hosts behind the VPN. The route might already be setup if VPN server is the same as nameserver or similar.
2012-04-29core: Update copyright informationMarcel Holtmann1-1/+1
2012-04-12provider: Disconnect VPN when phy service is disconnectedJukka Rissanen1-0/+22
If the VPN is connected and the underlaying service is disconnected, then we must also disconnect the VPN if it is still connected.
2012-04-05connection: Add host route for VPN when setting default gatewayJukka Rissanen1-0/+4
This is needed so that VPN gets default route when moving services. That can happen if VPN did not had default route before.
2012-04-05connection: Remove wrong VPN routeJukka Rissanen1-10/+22
Before this patch the system created following routes for VPN Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.10.9 0.0.0.0 UG 0 0 0 vpn0 192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0 192.168.2.1 0.0.0.0 255.255.255.255 UH 0 0 0 vpn0 192.168.2.1 0.0.0.0 255.255.255.255 UH 0 0 0 wlan0 192.168.10.1 192.168.10.9 255.255.255.255 UGH 0 0 0 vpn0 192.168.10.9 0.0.0.0 255.255.255.255 UH 0 0 0 vpn0 Here the route to gateway in wlan0 192.168.2.1 via vpn0 is not correct and it will prevent connections to 192.168.2.1 The correct routes should be: Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.10.9 0.0.0.0 UG 0 0 0 vpn0 192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0 192.168.2.1 0.0.0.0 255.255.255.255 UH 0 0 0 wlan0 192.168.10.1 192.168.10.9 255.255.255.255 UGH 0 0 0 vpn0 192.168.10.9 0.0.0.0 255.255.255.255 UH 0 0 0 vpn0 Fixes MBC#25035
2012-04-05connection: Set additional point-to-point routeJukka Rissanen1-16/+40
This is useful if P-t-P link does not have a default route. Fixes BMC#25027
2012-04-05connection: Remove original default route only when neededJukka Rissanen1-2/+8
If the new VPN gateway has split routing set, then do not clear original default route because VPN will not set the default route. Without this check we would not get any proper default route set.
2012-04-05connection: Update service list orderJukka Rissanen1-0/+2
This is done as we might have changed the order of the services so force update of the service list.
2012-03-19connection: Try to avoid having two default gatewaysJukka Rissanen1-13/+131
It is possible that because the rtnl messages arrive asynchronously, we might end up having two default gateways that are both active at the same time. If that happens, we try to downgrade the one that is not yet active.
2012-03-19connection: Remove obsolete routes for VPNJukka Rissanen1-6/+0
2012-03-19connection: Check all active gateways in updateJukka Rissanen1-17/+34
There can be multiple active gateways in the system at the same time so we must check them all when updating gateway info.
2012-03-19connection: Get correct VPN phy link dataJukka Rissanen1-56/+93
VPN could be using wrong phy link data if there are multiple active links.
2012-03-19connection: Do not set host routes in VPN caseJukka Rissanen1-17/+0
These routes are not needed.
2012-03-19connection: Avoid stale memory accessJukka Rissanen1-1/+2
Get the active gateway pointer only after the gateway hash has been manipulated by add_gateway(). It is possible that we are accessing stale pointer otherwise.
2012-03-19service: Allow removing only certain type nameserversJukka Rissanen1-1/+1
When nameserver are removed by __connman_connection_gateway_remove() then remove only certain type nameserver (IPv4 or IPv6). This is needed so that we do not loose IPv4 routes if only IPv6 nameservers are to be removed. This is needed when there are multiple connected services.
2012-03-19connection: Remove nameserver routes only onceJukka Rissanen1-2/+0
2012-03-19connection: Trigger service updates only after setting gatewaysJukka Rissanen1-7/+15
This is needed so that gateways are set properly when service triggers online checks.
2012-03-19connection: Fix debugging printsJukka Rissanen1-3/+40
2012-01-20connection: Only take service ref when saving serviceJukka Rissanen1-9/+5
The fix b68795352dd5a9ac41eab31c765ade0c88329a6e was only partly working. We must only take the ref when we are saving stuff to hash (no need to take ref if we are only modifying value in the hash). This patch reverts the commit b68795
2012-01-13connection: Fix service refcountYu A Wang1-0/+8
Service may be refcount two times when add_gateway for both ipv4 and ipv6, we need to unref the service twice according when we have both ipv6 and ipv4 gateway
2011-12-01service: Recompute service state when moving it upTomasz Bursztyka1-2/+0
It should be possible to move down an online service to ready and the one which goes up might come up online after recomputing its state.
2011-09-12connection: Service was not ref counted properlyJukka Rissanen1-2/+4
The reference counting problems were clearly seen with VPN service.
2011-08-24connection: Default gateway is changed when reorganizing servicesJukka Rissanen1-2/+87
Fixes BMC#22540
2011-08-18connection: Fix IPv6 host route setting when using VPNJukka Rissanen1-1/+2
2011-08-18connection: Fix indentationJukka Rissanen1-4/+4
2011-08-17connection: Fix vpn on networks without gatewayYu A Wang1-2/+33
VPN establishment fails on gateway less networks, like for example ppp based cellular ones. To fix that, a host route to the VPN server is established.
2011-08-16connection: Set proper gateway for ppp linksYu A Wang1-0/+11
The default gateway for ppp connection should be 0.0.0.0 for ipv4 and :: for ipv6. This issue fixed before but removed by the commit 84a739d0082b89efa8cfbf376abe17937e4bc843
2011-07-08network: Let the gateway code handle the READY transitionSamuel Ortiz1-1/+2
For IPv4 (DHCP, fixed or manual), and for manual IPv6, the gateway handling code (connection.c) is the one responsible for moving to the READY state.
2011-07-07service: Use __connman_service_ipconfig_indicate_state()Daniel Wagner1-2/+4
2011-06-27connection: Separate IPv4 and IPv6 gateway and routing handling.Jukka Rissanen1-120/+375
2011-05-31service: Indicate IP Configuration Ready EventGrant Erickson1-2/+1
In the Connection Manager, completion of a valid IP configuration excites the service state machine to move from the "configuration" to the "ready" state. However, the existing implementation of IP configuration completion explicitly attempts to directly manipulate service state, rather than hinting at an excitation event. As a consequence, a late IP configuration completion after the service state machine has transitioned from "ready" to "online" can lead to an incorrect transition back to the "ready" state. This causes the connection count for the technology associated with that service to increment again, unnecessarily. This patch avoids this issue by providing a service object interface that simply hints that an IP configuration is complete for a given IP type, allowing the service object and its state machine to either hold fast in the present state, returning an advisory error or advancing, as before. All prior invocations of __connman_service_indicate_state outside of the service module for the CONNMAN_SERVICE_STATE_READY are replaced with calls to this new interface. Thanks to Daniel Wagner and Marcel Holtmann for offline IRC discussion that helped motivate this fix. * v2: Incorporated feedback from Samuel Ortiz about combining IPv4 and IPv6 states before checking state readiness.
2011-02-25connection: Do not move to DISCONNECT when removing a gatewaySamuel Ortiz1-8/+0
The state change should be handled by the caller.
2011-02-25network: Remove gateway when network disconnectsSamuel Ortiz1-0/+4
2011-02-22connection: Check gateway_hash value before call update_order()Martin Xu1-0/+3
When exit from ConnMan, __connman_connection_cleanup() is called before __connman_service_cleanup() which then calls update_order(). __connman_connection_cleanup() sets gateway_hash as NULL, so update_order() will access NULL hash and causes GLib-CRITICAL abort