platform/upstream/connman.git
3 years agoFix NULL pointer dereference 94/263394/2
Jaehyun Kim [Thu, 2 Sep 2021 01:26:57 +0000 (10:26 +0900)]
Fix NULL pointer dereference

Thread 1 (LWP 13957):
>0  count_assoc_reject (key=0x0, value=0x0, user_data=0xbe0a3928) at src/service.c:843 --> connman (rpm)
>1  0xb6654674 in g_hash_table_foreach (hash_table=0x533200, func=0x4700ad <count_assoc_reject>, user_data=user_data@entry=0xbe0a3928) at ../glib/ghash.c:2056 --> libglib (rpm)
>2  0x0047bf9a in update_assoc_reject (service=0x4fb2a0, service=0x4fb2a0) at src/service.c:857 --> connman (rpm)
>3  __connman_service_update_from_network (network=network@entry=0x50d6a0) at src/service.c:11004 --> connman (rpm)
>4  0x0046a9f4 in connman_network_set_group (network=network@entry=0x50d6a0, group=group@entry=0x560ff8 "") at src/network.c:1587 --> connman (rpm)
>5  0x0044f12c in network_added (supplicant_network=0x51d430) at plugins/wifi.c:5031 --> connman (rpm)
>6  0x004516ba in callback_network_added (network=<optimized out>) at gsupplicant/supplicant.c:828 --> connman (rpm)
>7  scan_network_update (iter=<optimized out>, user_data=0x4f0380) at gsupplicant/supplicant.c:3790 --> connman (rpm)

Change-Id: I2f6e86c492dbc621b1c9f48506e8a89326568664
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
3 years agoUse SNR and estimated throughput for BSS scoring 08/262708/1
Jaehyun Kim [Wed, 18 Aug 2021 08:02:06 +0000 (17:02 +0900)]
Use SNR and estimated throughput for BSS scoring

Change-Id: Ie80ad47361166cd3b22a430111dda5c91791dca2
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
3 years agoAdded a dbus property 'TimeUpdated' 47/261447/2 accepted/tizen/unified/20210726.135508 submit/tizen/20210723.060030
Jaehyun Kim [Mon, 19 Jul 2021 07:36:36 +0000 (16:36 +0900)]
Added a dbus property 'TimeUpdated'

A property has been added to indicate
whether the time has been updated by NTP.

Change-Id: I86b8a0c2df377168f98656618efd82bb7da91800
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
3 years agoUse the last updated MAC address before turning on wifi 52/260852/2 accepted/tizen/unified/20210708.131505 submit/tizen/20210706.115004
Jaehyun Kim [Mon, 5 Jul 2021 13:46:19 +0000 (22:46 +0900)]
Use the last updated MAC address before turning on wifi

MAC randomization does not work properly when there are multiple wifi interfaces
or in some devices that do not create a .mac.info file.
So, to solve this problem, a permanent MAC address that is set before wifi up is used.

If a permanent MAC address is in built-in physical device,
it's hardly get it at an initial creation.
So, if there is a MAC address updated from netlink before wifi is on, it is used.
* MAC randomization works only when wifi is turned on.

Change-Id: Ia7a9ad0affaa6deca974199100a56e7378b6c195
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
3 years agoFix memory leaks and dereference without null check 35/259635/1 accepted/tizen/unified/20210616.132525 submit/tizen/20210615.081101
Jaehyun Kim [Thu, 10 Jun 2021 09:20:00 +0000 (18:20 +0900)]
Fix memory leaks and dereference without null check

Change-Id: I7accd1386302c26e5bdfa8aee224fe60defc50af
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
3 years agoCheck the reply of SignalPoll method correctly 34/259634/1
Jaehyun Kim [Thu, 10 Jun 2021 09:17:25 +0000 (18:17 +0900)]
Check the reply of SignalPoll method correctly

Change-Id: Id48cb699743e62484fac775c7348c34f1e80ac8f
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
3 years agoAdded dbus method 'GetConnectedService' 15/258415/7 accepted/tizen/unified/20210601.135338 submit/tizen/20210528.085525
Jaehyun Kim [Mon, 17 May 2021 07:20:43 +0000 (16:20 +0900)]
Added dbus method 'GetConnectedService'

CAPI is fetching the full list of services
and looking for the service that is connected,
but this is an inefficient way,
so a dbus method to provide that information is added in connman.

Change-Id: I825682b3a1c01de3926145df499321ef161c4af7
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
3 years agoRemove wrong rules from connman dbus conf 81/258481/1
Nishant Chaprana [Tue, 18 May 2021 09:39:46 +0000 (15:09 +0530)]
Remove wrong rules from connman dbus conf

MacPolicy, PreassocMacPolicy and RandomMacLifetime are properties
of technology interface and method rules cannot be applied for them.

Change-Id: I5dd381d1fac44f23f62f5cf1a1b9cccf859ffec8
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
3 years agoAdd TIZEN_EXT macro to Tizen specific code 80/258480/1
Nishant Chaprana [Tue, 18 May 2021 09:38:42 +0000 (15:08 +0530)]
Add TIZEN_EXT macro to Tizen specific code

Change-Id: I322c8866eee025d868593a5110186fe581b3d939
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
3 years agoAdded support to get country-code. 72/258472/1
Niraj Kumar Goit [Tue, 18 May 2021 07:54:27 +0000 (13:24 +0530)]
Added support to get country-code.

Change-Id: I880450f406c48490f5952452f0e586ca4d0d3c9e
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
3 years agoAdded support to set country-code. 37/258237/1
Niraj Kumar Goit [Wed, 12 May 2021 14:26:20 +0000 (19:56 +0530)]
Added support to set country-code.

Change-Id: I6919f3ca4a794eeee7d75a3824c0fc3a22031d06
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
3 years agoModified to handle WPA3/WPA2 mixed mode as WPA3-SAE 20/258020/1 submit/tizen/20210512.013459 submit/tizen/20210513.084419
Jaehyun Kim [Fri, 7 May 2021 13:39:18 +0000 (22:39 +0900)]
Modified to handle WPA3/WPA2 mixed mode as WPA3-SAE

Change-Id: Ib9d5240a4673f08f65dd13db3eb59bbb1b4da80d
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
3 years agoSend Mac policy parameters in CreateInterface dbus call. 86/257686/1 accepted/tizen/unified/20210506.103545 submit/tizen/20210503.112345
Nishant Chaprana [Thu, 29 Apr 2021 10:01:45 +0000 (15:31 +0530)]
Send Mac policy parameters in CreateInterface dbus call.

This patch will send mac policy parameters in CreateInteraface dbus call
and will make 3 dbus calls to set mac policy parameters when interface is
already created in wpa_supplicant.

Change-Id: Icd7ce43d1b67fe5211ab15d2ab20fd47038907f1
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
3 years agoFix Wi-Fi activation issue in TM1 23/257323/2 submit/tizen/20210427.065300
Nishant Chaprana [Tue, 27 Apr 2021 04:22:32 +0000 (09:52 +0530)]
Fix Wi-Fi activation issue in TM1

Increased timeout to 10 seconds in case of device activation
This is required because the Mac Randomizaiton parameters need
to be set by dbus calls, to retains previous boot settings.

The timeout value is already less because wifi_manager_activate() API
has 120 seconds timeout to turn on the device, however current timeout
emits failure callback post 4 seconds, when -EINPROGRESS is returned
from device plugin.

Change-Id: I92041dbd9898f1f6b0a59f895bcd06fb5f6e1e91
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
3 years agoFix autoconnect issue at reboot in TW3 81/256581/5 submit/tizen/20210421.161229
Nishant Chaprana [Wed, 7 Apr 2021 11:21:44 +0000 (16:51 +0530)]
Fix autoconnect issue at reboot in TW3

Change-Id: I7104f40a29f5e45cd2b6ba0391f36d7c37bfa0a2
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
3 years agoAdd setter/getter for handling MAC randomization policy 63/255263/15
Nishant Chaprana [Thu, 18 Mar 2021 06:08:16 +0000 (11:38 +0530)]
Add setter/getter for handling MAC randomization policy

Change-Id: I978ab95f02d04574efc7c3455b71f72841956c36
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
3 years agoFix NULL pointer dereference 03/256003/2
Nishant Chaprana [Fri, 26 Mar 2021 08:38:15 +0000 (14:08 +0530)]
Fix NULL pointer dereference

Core was generated by `/usr/bin/connmand -n --nobacktrace --noplugin vpn'.
Program terminated with signal SIGSEGV, Segmentation fault.
>0  connman_device_get_last_connected_ident (device=0x0) at src/device.c:842
842 return device->last_connected_ident;
(gdb) bt
>0  connman_device_get_last_connected_ident (device=0x0) at src/device.c:842
>1  0x0098ec70 in calculate_score_last_connected (service=0x1ef9eb8) at src/service.c:7900
>2  calculate_score (service=0x1ef9eb8) at src/service.c:7994
>3  calculate_score (service=0x1ef9eb8) at src/service.c:7977
>4  0x0098eed8 in service_compare (a=0x1ef9eb8, b=0x1f010a0) at src/service.c:8138

Change-Id: I7e412f68f71472e28669941b9346ba73281ccd39
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
3 years agoUse dbus_free for deallocation, when allocated with dbus_malloc0 12/255412/3
Nishant Chaprana [Thu, 18 Mar 2021 04:46:52 +0000 (10:16 +0530)]
Use dbus_free for deallocation, when allocated with dbus_malloc0

Change-Id: I003118f70353bf949f050a6e863c9152be8b6e8e
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
3 years agoMerge "Error checking in passphrase decryption method." into tizen accepted/tizen/unified/20210225.130544 submit/tizen/20210224.083420
Jaehyun Kim [Wed, 24 Feb 2021 08:31:21 +0000 (08:31 +0000)]
Merge "Error checking in passphrase decryption method." into tizen

3 years agoMerge "Fix svace 'UNREACHABLE_CODE.NO_PATH' warnings" into tizen
Jaehyun Kim [Wed, 24 Feb 2021 08:30:41 +0000 (08:30 +0000)]
Merge "Fix svace 'UNREACHABLE_CODE.NO_PATH' warnings" into tizen

3 years agoFix svace 'UNREACHABLE_CODE.NO_PATH' warnings 49/253449/1
Nishant Chaprana [Wed, 10 Feb 2021 05:39:40 +0000 (11:09 +0530)]
Fix svace 'UNREACHABLE_CODE.NO_PATH' warnings

Change-Id: Ibefe7a09903f2d05e7aa12e9262f820d4e7feb71
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
3 years agoChange systemd-devel package name 56/252956/1 accepted/tizen/unified/20210217.120449 submit/tizen/20210217.025918
INSUN PYO [Wed, 3 Feb 2021 08:48:16 +0000 (17:48 +0900)]
Change systemd-devel package name

Change-Id: I0c553dd40bda63b08846e66bbcdd9955d882ef41

3 years agoError checking in passphrase decryption method. 03/252403/1
Niraj Kumar Goit [Wed, 27 Jan 2021 13:44:08 +0000 (19:14 +0530)]
Error checking in passphrase decryption method.

If Dbus fails to append argument in dbus-message,
do not call a dbus method to decrypt passphrase.

Change-Id: Ic3b63ea9e6827ca1bf3753d750026119ec1bfd1a
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
3 years agomerge tag upstream/1.38 84/252384/1 accepted/tizen/unified/20210129.002142 submit/tizen/20210127.105449
Seonah Moon [Wed, 27 Jan 2021 08:38:08 +0000 (17:38 +0900)]
merge tag upstream/1.38

Change-Id: Ic98cd483e7e21143bb1102a781643c06ce9f628d

3 years agoOn device reboot enable wpa-supplicant for EAPoL. 11/250511/3 submit/tizen/20210126.062930
Niraj Kumar Goit [Mon, 28 Dec 2020 20:07:12 +0000 (01:37 +0530)]
On device reboot enable wpa-supplicant for EAPoL.

In case of device reboot enable wpa-supplicant for eapol
connection if last connection was EAP over ethernet.

Change-Id: Ia264accac74ecffdba6c2b116807e45f675ef3db
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
3 years agoAdded Dbus method 'IsEapolEnabled'. 88/249788/2
Niraj Kumar Goit [Wed, 16 Dec 2020 15:54:16 +0000 (21:24 +0530)]
Added Dbus method 'IsEapolEnabled'.

This patch fixes EAPoL enabled status on device reboot scenario.

Change-Id: Ib9fcbed659996eae42c6a30e7ee5f584aeaa19d2
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
3 years agoMerge "Imported Upstream connman version 1.38" into tizen
Jaehyun Kim [Mon, 25 Jan 2021 06:15:21 +0000 (06:15 +0000)]
Merge "Imported Upstream connman version 1.38" into tizen

3 years agoAdded timer delay to get the response 62/251762/3 accepted/tizen/unified/20210122.123012 submit/tizen/20210119.130611
Prasadam Prashath Kumar [Tue, 19 Jan 2021 06:12:28 +0000 (11:42 +0530)]
Added timer delay to get the response

In Tizen6.5 to avoid continious loop in udp_listner_event
added timer delay, so connman can receive response from telephony deamon and wpa_supplicant

Change-Id: I88a74d6d4fe3f91be27b24949f8fc14edd3f7143
Signed-off-by: Prasadam Prashath Kumar <prasadam.p@samsung.com>
3 years agoImported Upstream connman version 1.38 29/246129/6
Niraj Kumar Goit [Tue, 1 Dec 2020 12:44:19 +0000 (18:14 +0530)]
Imported Upstream connman version 1.38

Change-Id: I9e650762f3b2b2a31945b66e044e67a77e3b4b12
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
3 years agoFix derefrencing of NULL pointer 94/248794/1 submit/tizen/20201217.131910 submit/tizen/20201229.102954
Jaehyun Kim [Wed, 2 Dec 2020 08:50:42 +0000 (17:50 +0900)]
Fix derefrencing of NULL pointer

Return value of a function '__connman_service_get_network' is dereferenced without checking.

Change-Id: Ib66474b2fc6924d50eb8b35206251938ba63baad
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
3 years agoMerge "Fix derefrencing of NULL pointer" into tizen submit/tizen/20201116.030352 submit/tizen/20201127.052752
Jaehyun Kim [Wed, 11 Nov 2020 11:30:56 +0000 (11:30 +0000)]
Merge "Fix derefrencing of NULL pointer" into tizen

3 years agoFix derefrencing of NULL pointer 17/247517/2
Jaehyun Kim [Wed, 11 Nov 2020 11:00:54 +0000 (20:00 +0900)]
Fix derefrencing of NULL pointer

In some cases network->device could be NULL which leads to crash

Change-Id: I3cc5401b37fd48d8d702935bef7afa7e277222f2
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
3 years agoRename EAPoL configuration file path to /var/lib/connman 01/247301/1
Niraj Kumar Goit [Mon, 9 Nov 2020 15:39:41 +0000 (21:09 +0530)]
Rename EAPoL configuration file path to /var/lib/connman

Change-Id: I5a14fb736b0b3b842eaedfce53303c6a6d143aa9
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
4 years agoEmit StateChangedProperties post emitting service state's PropertyChanged 12/245012/2 submit/tizen/20201106.060323
Nishant Chaprana [Mon, 2 Nov 2020 11:05:11 +0000 (16:35 +0530)]
Emit StateChangedProperties post emitting service state's PropertyChanged

wifi-manager and libnet-client can use this signal instead of
[PropertyChanged(state) signal + GetProperties call] combination
for updating service information.

Change-Id: I0203cb7df202ff3767a2c4d25e8ca685e4eb8ba8
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
4 years agoMerge "[gdhcp/client] Reopen socket GIO channel when failed" into tizen accepted/tizen/unified/20201029.124906 submit/tizen/20201028.023046
Jaehyun Kim [Tue, 27 Oct 2020 03:06:27 +0000 (03:06 +0000)]
Merge "[gdhcp/client] Reopen socket GIO channel when failed" into tizen

4 years agoMerge "[src/rtnl] Add retry mechanism when socket GIO channel fails" into tizen
Jaehyun Kim [Tue, 27 Oct 2020 03:06:18 +0000 (03:06 +0000)]
Merge "[src/rtnl] Add retry mechanism when socket GIO channel fails" into tizen

4 years agoFix an issue where the log option is not applied properly 24/245824/2
Jaehyun Kim [Fri, 16 Oct 2020 07:51:48 +0000 (16:51 +0900)]
Fix an issue where the log option is not applied properly

Change-Id: Ibb5305175a1987d74f0a24ba413a664940233e76
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
4 years agoFix auto connection failure 76/245776/1
Jaehyun Kim [Thu, 15 Oct 2020 13:32:17 +0000 (22:32 +0900)]
Fix auto connection failure

If there is more than one connection history, auto-connection is failing.
This problem occurs because two APs try to connect to the same interface at the same time.
So fixed to prevent duplicate connection attempts on the same interface.

Change-Id: If5da80db089c9607579f943d023565c999a5576b
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
4 years agoImported Upstream version 1.38 91/245691/1 upstream/1.38
Nishant Chaprana [Wed, 14 Oct 2020 08:29:23 +0000 (13:59 +0530)]
Imported Upstream version 1.38

Change-Id: I7cada2367329445e1d200055e21d96e7e9c05047
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
4 years ago[gdhcp/client] Reopen socket GIO channel when failed 65/245565/4
Nishant Chaprana [Mon, 12 Oct 2020 09:12:00 +0000 (14:42 +0530)]
[gdhcp/client] Reopen socket GIO channel when failed

Change-Id: Ib63b6f194e67fc4d7cfc3f223afa064761dff578
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
4 years ago[src/rtnl] Add retry mechanism when socket GIO channel fails 64/245564/5
Nishant Chaprana [Mon, 12 Oct 2020 08:03:23 +0000 (13:33 +0530)]
[src/rtnl] Add retry mechanism when socket GIO channel fails

Change-Id: I21f1d8c970f1053ce4337dc0d251d2fa20bbd509
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
4 years agoFix an issue where the log option is applied incorrectly 53/245353/1 accepted/tizen/6.0/unified/20201030.105121 accepted/tizen/6.0/unified/hotfix/20201102.235749 accepted/tizen/unified/20201008.043010 submit/tizen/20201007.120259 submit/tizen_6.0/20201029.205501 submit/tizen_6.0_hotfix/20201102.192901 submit/tizen_6.0_hotfix/20201103.115101 tizen_6.0.m2_release
Jaehyun Kim [Wed, 7 Oct 2020 11:57:48 +0000 (20:57 +0900)]
Fix an issue where the log option is applied incorrectly

Change-Id: I57db81c2670b769bbedafb3e3d9db02218516bca
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
4 years agoMerge "Add support for dlog" into tizen
Jaehyun Kim [Wed, 7 Oct 2020 11:08:12 +0000 (11:08 +0000)]
Merge "Add support for dlog" into tizen

4 years agoAdd support for dlog 02/245302/3
Jaehyun Kim [Wed, 7 Oct 2020 02:08:26 +0000 (11:08 +0900)]
Add support for dlog

1. Add support for dlog
2. Add some log options to main.conf
3. Allow to simplify the amount of logs by option

Change-Id: I8c1202ae267aca9bb2c18d44c2ccd3e6d5a74a73
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
4 years ago[Fix][src/service] Add 'fall through' comment when break statement is not needed 69/245069/2
Nishant Chaprana [Wed, 30 Sep 2020 10:36:19 +0000 (16:06 +0530)]
[Fix][src/service] Add 'fall through' comment when break statement is not needed

Change-Id: Iff3cac79bc3f3ede61f90ab688cfbebcbc374221
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
4 years ago[Fix][plugin/ethernet] SVACE warning DEREF_AFTER_NULL 67/245067/2
Nishant Chaprana [Wed, 30 Sep 2020 10:10:18 +0000 (15:40 +0530)]
[Fix][plugin/ethernet] SVACE warning DEREF_AFTER_NULL

Change-Id: Ie3a9044de3be7ce46d05052920f9d5b5d99cd15f
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
4 years agoFix incorrect dbus usage that caused crash 52/244852/1 accepted/tizen/unified/20201006.044352 submit/tizen/20200925.132900 submit/tizen/20201005.112026
Jaehyun Kim [Fri, 25 Sep 2020 05:45:55 +0000 (14:45 +0900)]
Fix incorrect dbus usage that caused crash

Change-Id: Ifd11a65d3182533d210401fbce4c5fb9b6504b0d
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
4 years agoThe order between the device signal and the service signal has been changed 73/244273/1 accepted/tizen/unified/20200921.095121 submit/tizen/20200917.115639 submit/tizen/20200918.062939
Jaehyun Kim [Wed, 16 Sep 2020 13:39:40 +0000 (22:39 +0900)]
The order between the device signal and the service signal has been changed

Net-config is implemented assuming that the DeviceChanged signal comes before the service PropertyChanged signal.
Therefore, the event order has been adjusted accordingly.

Change-Id: I134ec7152a0e40bbfe317c704a91ca81fc01dc1c
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
4 years agoFix build warnings 44/243944/1
Jaehyun Kim [Fri, 11 Sep 2020 08:29:38 +0000 (17:29 +0900)]
Fix build warnings

Change-Id: I43c65427f5b6e0eb003ac3c17c012cd9b7db0f76
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
4 years agoRemove DefaultDependencies=false at connman.service 61/243861/1
Jaehyun Kim [Thu, 10 Sep 2020 13:05:00 +0000 (22:05 +0900)]
Remove DefaultDependencies=false at connman.service

connman.service has "After=net-config.service" dependency.
But net-config.service don't have DefaultDependencies=no.

So "DefaultDependencies=false" does not have any effect on connman.service, but instead it is confusing.

Change-Id: I52dff5dc4a33deceed87b47ff1aaa05b2f049f8e
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
4 years agoFix derefrencing of NULL pointer 13/242813/1 accepted/tizen/unified/20200903.151723 submit/tizen/20200901.053326 submit/tizen/20200902.111409 submit/tizen/20200903.044940
Jaehyun Kim [Tue, 1 Sep 2020 05:20:41 +0000 (14:20 +0900)]
Fix derefrencing of NULL pointer

In some cases wifi->network is NULL which leads to crash

Change-Id: Ie02bb6a84f25d816935b492169feed2aca7f76b8
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
4 years agoMove GetInterfaces method to Manager interface 07/242807/1
Jaehyun Kim [Tue, 1 Sep 2020 03:11:34 +0000 (12:11 +0900)]
Move GetInterfaces method to Manager interface

Change-Id: I4e9cd93717a04457f97bf13fc389075a3e5c0e54
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
4 years agoAdd support for handling multiple wifi interfaces 43/242543/1 submit/tizen/20200828.142119
Jaehyun Kim [Thu, 27 Aug 2020 14:32:34 +0000 (23:32 +0900)]
Add support for handling multiple wifi interfaces

Change-Id: I4762c8d3444167dce34498634de4948e822f865f
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
4 years agoSvace Fix: memory leak 99/240799/4
Rahul Jain [Tue, 11 Aug 2020 12:04:12 +0000 (17:34 +0530)]
Svace Fix: memory leak

Change-Id: Id10ede540b99d028f6ff40225b4dfcccb46d7fe0

4 years agoUse ref counting for network during SignalPoll method call of wpa_supplicant. 30/240230/3 accepted/tizen/unified/20200812.144017 submit/tizen/20200811.004738
Nishant Chaprana [Tue, 4 Aug 2020 12:45:24 +0000 (18:15 +0530)]
Use ref counting for network during SignalPoll method call of wpa_supplicant.

Description: This patch fixes the issue in which dangling network pointer
is present as user_data of signalpoll_callback.

This dangling pointer crashes connman with below backtrace:-

>>> bt
\#0  connman_device_get_ident (device=0x6e6f632f) at src/device.c:592
\#1  0xb6f54994 in __connman_network_get_ident (network=network@entry=0xb87715b0) at src/network.c:1560
\#2  0xb6f652da in connman_service_lookup_from_network (network=network@entry=0xb87715b0) at src/service.c:10177
\#3  0xb6f655ee in __connman_service_notify_strength_changed (network=network@entry=0xb87715b0) at src/service.c:10523
\#4  0xb6f5527c in connman_network_set_strength (network=network@entry=0xb87715b0, strength=strength@entry=69 'E') at src/network.c:2704
\#5  0xb6f36ac0 in signalpoll_callback (result=<optimized out>, maxspeed=39, strength=69, user_data=0xb87715b0) at plugins/wifi.c:3866
\#6  0xb6f3b68e in interface_signalpoll_result (error=<optimized out>, iter=<optimized out>, user_data=0xb8782af8) at gsupplicant/supplicant.c:6348
\#7  0xb6f4335a in method_call_reply (call=0xb8771ec0, user_data=0xb8782c98) at gsupplicant/dbus.c:476
\#8  0xb6da23a4 in ?? () from /lib/libdbus-1.so.3
\#9  0xb6da5fa0 in dbus_connection_dispatch () from /lib/libdbus-1.so.3
\#10 0xb6f94dce in message_dispatch (data=0xb875fe78) at gdbus/mainloop.c:72
\#11 0xb6e21d84 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
\#12 0xb6e22008 in ?? () from /lib/libglib-2.0.so.0
\#13 0xb6e22268 in g_main_loop_run () from /lib/libglib-2.0.so.0
\#14 0xb6f29d3e in main (argc=<optimized out>, argv=<optimized out>) at src/main.c:1373

Change-Id: Ia171c2ddabf6a4f9c3d6a6bbd3763398b6e0ce46
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
4 years agoSvace issues: Null check and memory leaks 70/239070/2 accepted/tizen/unified/20200805.122502 submit/tizen/20200730.084504 submit/tizen/20200804.104340
Rahul Jain [Tue, 21 Jul 2020 11:18:45 +0000 (16:48 +0530)]
Svace issues: Null check and memory leaks

Change-Id: I937af7e6dbe3a919c1d0b0d7dee4b481c2ef0982

4 years agoChange the service file path for 64bit build 26/237026/1 accepted/tizen/unified/20200626.133553 submit/tizen/20200624.065138
Jaehyun Kim [Wed, 24 Jun 2020 06:27:40 +0000 (15:27 +0900)]
Change the service file path for 64bit build

Change-Id: I4ae421d7428aa3d0a70f1c66fef736b5710739b2
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
4 years agoMerge "Add to check ins status on client" into tizen submit/tizen/20200610.045555
hyunuk tak [Wed, 10 Jun 2020 04:54:48 +0000 (04:54 +0000)]
Merge "Add to check ins status on client" into tizen

4 years agoAdd omitted TIZEN_EXT 88/235688/1
Jaehyun Kim [Tue, 9 Jun 2020 02:23:36 +0000 (11:23 +0900)]
Add omitted TIZEN_EXT

Change-Id: I44227340c3a408711756a2bf4ccfb860ef44170b
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
4 years agoAdd to check ins status on client 83/234483/1
hyunuk.tak [Tue, 26 May 2020 23:33:52 +0000 (08:33 +0900)]
Add to check ins status on client

Change-Id: I3224dc06110f6c0063fa082b713cb2aaa13a3a1f
Signed-off-by: hyunuk.tak <hyunuk.tak@samsung.com>
4 years agoMerge "supported OWE Transition mode" into tizen accepted/tizen/unified/20200529.124226 submit/tizen/20200528.074637
Jiung Yu [Mon, 25 May 2020 04:27:36 +0000 (04:27 +0000)]
Merge "supported OWE Transition mode" into tizen

4 years agoMerge "Block all extra scans caused by ConnMan" into tizen
cheoleun moon [Mon, 25 May 2020 02:17:01 +0000 (02:17 +0000)]
Merge "Block all extra scans caused by ConnMan" into tizen

4 years agosupported OWE Transition mode 06/234106/2
Jinwon Kim [Wed, 20 May 2020 04:28:12 +0000 (13:28 +0900)]
supported OWE Transition mode

Change-Id: I6dd1cb437ac16c0428df4d5bc812fefb36543c6d
Signed-off-by: Jinwon Kim <jinwon0325.kim@samsung.com>
4 years agoFix wrong length for format string 42/233742/1 accepted/tizen/unified/20200519.035055 submit/tizen/20200519.021428
Yu [Tue, 19 May 2020 01:37:39 +0000 (10:37 +0900)]
Fix wrong length for format string

Change-Id: I11c0eee0076be37b17ec5ffaff92c72975d29d8f
Signed-off-by: Yu jiung <jiung.yu@samsung.com>
4 years agoMerge "Add logic to detect buffer overflow for snprintf" into tizen submit/tizen/20200518.041610
Jiung Yu [Mon, 18 May 2020 04:14:59 +0000 (04:14 +0000)]
Merge "Add logic to detect buffer overflow for snprintf" into tizen

4 years agoAdd logic to detect buffer overflow for snprintf 24/233524/3
Yu [Fri, 15 May 2020 07:01:39 +0000 (16:01 +0900)]
Add logic to detect buffer overflow for snprintf

Change-Id: I60f835aeed101ef61a2bbb73bf2fc8c2c7327d50
Signed-off-by: Yu jiung <jiung.yu@samsung.com>
4 years agogsupplicant: update an interface state in GetInterface callback 22/233522/1
Seonah Moon [Fri, 15 May 2020 06:58:50 +0000 (15:58 +0900)]
gsupplicant: update an interface state in GetInterface callback

Change-Id: I9530c2c897c4ed2aae0b90580012ce6c930e3a90

4 years agoHandle the case that best_bss is NULL 78/233278/2 submit/tizen/20200513.103127
Cheoleun Moon [Wed, 13 May 2020 10:19:08 +0000 (19:19 +0900)]
Handle the case that best_bss is NULL

Change-Id: I4a813bb3327f400df0050a850ec72fa8b99c870b
Signed-off-by: Cheoleun Moon <chleun.moon@samsung.com>
4 years agoCreate interface first when enable Wi-Fi 07/233107/5 accepted/tizen/unified/20200512.144346 submit/tizen/20200512.123850
Seonah Moon [Tue, 12 May 2020 07:29:48 +0000 (16:29 +0900)]
Create interface first when enable Wi-Fi

Change-Id: Id801b6dd6bfcfaa2cb2daefed9e6c37d7cb861bc

4 years agoBlock all extra scans caused by ConnMan 00/232900/1
Jaehyun Kim [Fri, 8 May 2020 07:52:30 +0000 (16:52 +0900)]
Block all extra scans caused by ConnMan

Even if BackgroundScanning is disabled, a passive scan(full scan) is performed automatically after an active scan.
However, this function is not necessary because we already added a separate scan logic to fit our requirement.

Change-Id: I5ac24a35d9b61c44bbbd2ddb7688cb26a63fc2b7
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
4 years agoMerge "Remove RW upgrade script" into tizen
Jaehyun Kim [Fri, 8 May 2020 02:46:34 +0000 (02:46 +0000)]
Merge "Remove RW upgrade script" into tizen

4 years agoMerge "dnsproxy: send a response including queries" into tizen accepted/tizen/unified/20200507.052334 submit/tizen/20200506.120225
seonah moon [Wed, 6 May 2020 04:27:51 +0000 (04:27 +0000)]
Merge "dnsproxy: send a response including queries" into tizen

4 years agoMerge "default_changed: get default service after checking service list" into tizen
seonah moon [Wed, 6 May 2020 02:20:50 +0000 (02:20 +0000)]
Merge "default_changed: get default service after checking service list" into tizen

4 years agoethernet: Fix memory leak 35/232435/1 submit/tizen/20200504.152605
Jaehyun Kim [Mon, 4 May 2020 14:59:24 +0000 (23:59 +0900)]
ethernet: Fix memory leak

Change-Id: Ie45da69063b59bdec02e74e37dc7d38130145803
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
4 years agoUpdate EAPoL property in connman settings. 68/232368/10 submit/tizen/20200504.135236
Niraj Kumar Goit [Sat, 2 May 2020 21:56:54 +0000 (03:26 +0530)]
Update EAPoL property in connman settings.

Change-Id: I477a8ec03f791184ce3634f7c2e9903b367a5c89
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
4 years agoAdd support of EAP on Ethernet. 99/232199/10
Nishant Chaprana [Wed, 29 Apr 2020 04:29:30 +0000 (09:59 +0530)]
Add support of EAP on Ethernet.

Change-Id: I373ab90bbb699be56d9e416346a51b0795ed1e8b
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
4 years agodnsproxy: send a response including queries 75/232175/1
Seonah Moon [Wed, 29 Apr 2020 02:30:01 +0000 (11:30 +0900)]
dnsproxy: send a response including queries

This is revert patch of https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=d74bb4a97224b6382ae2f542fe3751b1904e9b2e

Some DNS API checks a query field of DNS response to verify the response.
So, DNS resolving delay is often caused in case of DNS error.
This patch makes dnsproxy send the 'whole' packet.

Change-Id: I21cd0d86ef132d8c1eadbf93e192187112191326

4 years agodefault_changed: get default service after checking service list 94/231794/2
Seonah Moon [Fri, 24 Apr 2020 07:09:30 +0000 (16:09 +0900)]
default_changed: get default service after checking service list

Sometimes, default service is changed to IMS PDN although internet PDN
is exist. It can make DNS or data packet not send to the internet.

This patch forces the services to be checked before changing default
service.

Change-Id: Id4dc9045e55df5186f823bfe70d6aaa3066aaaf4

4 years agoChange string comparison function for null string 34/231934/2 accepted/tizen/unified/20200429.032949 submit/tizen/20200427.022040 submit/tizen/20200427.073208 submit/tizen/20200428.140958
hyunuk.tak [Mon, 27 Apr 2020 01:51:49 +0000 (10:51 +0900)]
Change string comparison function for null string

1. Modify to g_strcmp0 from g_str_equal
2. Add nobacktrace option to service of tv
3. Add INS options to main configuration of tv

Change-Id: I6fa271b3b522ae5c1495714f089c69c1602a3faf
Signed-off-by: hyunuk.tak <hyunuk.tak@samsung.com>
4 years agoCheck enable arg for INS 40/231440/1 submit/tizen/20200422.050142 submit/tizen/20200423.044725
hyunuk.tak [Wed, 22 Apr 2020 04:04:13 +0000 (13:04 +0900)]
Check enable arg for INS

Change-Id: I4c8df2dd519da9bef7c763f65b1bd3c60540825a
Signed-off-by: hyunuk.tak <hyunuk.tak@samsung.com>
4 years agoVerify INS functions using connmanctl 10/231110/4 submit/tizen/20200422.012623
hyunuk.tak [Fri, 17 Apr 2020 08:32:01 +0000 (17:32 +0900)]
Verify INS functions using connmanctl

Change-Id: I498fac295defe24eab8e3d23c6e0864bfda8fd86
Signed-off-by: hyunuk.tak <hyunuk.tak@samsung.com>
4 years agoAdd intelligent Network Selection 75/229975/9 accepted/tizen/unified/20200417.152700 submit/tizen/20200417.010643
hyunuk.tak [Tue, 7 Apr 2020 03:57:45 +0000 (12:57 +0900)]
Add intelligent Network Selection

Change-Id: I049207e7d662f657ca21a4046be953f8f33bbd10
Signed-off-by: hyunuk.tak <hyunuk.tak@samsung.com>
4 years agoFix a problem where the full scan is executed twice in succession 71/226071/1 submit/tizen/20200306.121455
Jaehyun Kim [Wed, 26 Feb 2020 11:03:16 +0000 (20:03 +0900)]
Fix a problem where the full scan is executed twice in succession

Change-Id: I1f8a7ee437a6803e6857a3f1d95a964f999218f9
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
4 years agoiptables: Fix memory leak 99/225099/1 accepted/tizen/unified/20200227.121046 submit/tizen/20200220.041614 submit/tizen/20200227.012332
Jaehyun Kim [Mon, 17 Feb 2020 09:22:30 +0000 (18:22 +0900)]
iptables: Fix memory leak

Change-Id: I2f5dd43703af7583d18a7be8fc10ae0e99d402d5
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
4 years agogsupplicant: Fix memory leak 71/224271/1 accepted/tizen/unified/20200213.121529 submit/tizen/20200212.122721
Jaehyun Kim [Fri, 7 Feb 2020 09:18:41 +0000 (18:18 +0900)]
gsupplicant: Fix memory leak

Change-Id: I6c8b8e67dc8fc32f744e2cf715ea383745ec0a93
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
4 years agoRemove useless code 69/224269/1
Jaehyun Kim [Fri, 7 Feb 2020 08:58:36 +0000 (17:58 +0900)]
Remove useless code

Change-Id: I84e0cf1eee2ab86360adf2920dac1181e91b88b5
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
4 years agoUpdate time when Auto Time Update event is received. 66/223166/1
Niraj Kumar Goit [Thu, 23 Jan 2020 13:58:27 +0000 (19:28 +0530)]
Update time when Auto Time Update event is received.

When Auto Time Update event is received, update the
system time although default service is not changed.

Change-Id: I205dab72879cf54e0aa31cecd0826d9c8b63736c
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
4 years agoFix to handle scan events initiated by wpa_supplicant 82/218982/3 accepted/tizen/unified/20191205.091332 submit/tizen/20191204.124930 submit/tizen/20200203.052118
Jaehyun Kim [Fri, 29 Nov 2019 08:11:46 +0000 (17:11 +0900)]
Fix to handle scan events initiated by wpa_supplicant

Change-Id: I2c247dd447a569642f19ff984fb9b318cceb676c
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
4 years agoMerge "wifi: Fix derefrencing of NULL pointer" into tizen accepted/tizen/unified/20191129.033505 submit/tizen/20191128.114002
Jaehyun Kim [Thu, 28 Nov 2019 11:37:25 +0000 (11:37 +0000)]
Merge "wifi: Fix derefrencing of NULL pointer" into tizen

4 years agoMerge "Remove TIZEN_EXT for patch accepted by upstream community." into tizen
Jaehyun Kim [Thu, 28 Nov 2019 11:36:54 +0000 (11:36 +0000)]
Merge "Remove TIZEN_EXT for patch accepted by upstream community." into tizen

4 years agowifi: Fix derefrencing of NULL pointer 92/218392/2
Jaehyun Kim [Fri, 22 Nov 2019 02:18:11 +0000 (11:18 +0900)]
wifi: Fix derefrencing of NULL pointer

In some cases wifi->autoscan is NULL which leads to crash

Change-Id: I44d6005bcc1972aaa8f347529d7f8ac6ad22b8e3
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
5 years agoMerge "[connman] Manage the MAX saved wireless profiles." into tizen accepted/tizen/unified/20191108.065921 submit/tizen/20191106.105409
Jaehyun Kim [Wed, 6 Nov 2019 10:52:07 +0000 (10:52 +0000)]
Merge "[connman] Manage the MAX saved wireless profiles." into tizen

5 years agoRemove TIZEN_EXT for patch accepted by upstream community. 37/216837/1
Nishant Chaprana [Mon, 4 Nov 2019 02:06:02 +0000 (07:36 +0530)]
Remove TIZEN_EXT for patch accepted by upstream community.

link: https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=2974287df58bb8b018c7fe6e83d4c5bac5411a47
Change-Id: I5f51ef0348af7a5a72f799c7e2e3646c5a680536
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
5 years agoFix Tizen alarm dbus interface parameter 67/216367/2 accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix accepted/tizen/5.5/unified/20191031.010036 accepted/tizen/5.5/unified/mobile/hotfix/20201027.062320 accepted/tizen/5.5/unified/wearable/hotfix/20201027.102538 accepted/tizen/unified/20191024.044128 submit/tizen/20191024.043646 submit/tizen_5.5/20191031.000006 submit/tizen_5.5_mobile_hotfix/20201026.185106 submit/tizen_5.5_wearable_hotfix/20201026.184306 tizen_5.5.m2_release
Semun Lee [Thu, 24 Oct 2019 04:15:58 +0000 (13:15 +0900)]
Fix Tizen alarm dbus interface parameter

alarm uses time values as 64bit integer

Change-Id: Ifc000094da6f3e5d78ea60c144b681284e06cf69
Signed-off-by: Semun Lee <semun.lee@samsung.com>
5 years ago[connman] Manage the MAX saved wireless profiles. 75/215775/1
Niraj Kumar Goit [Tue, 15 Oct 2019 13:55:40 +0000 (19:25 +0530)]
[connman] Manage the MAX saved wireless profiles.

If the number of saved profiles exceed 200, remove the
oldest profile in the list.

Change-Id: I492cb3b5480104a59dcb58499da3bc05be3ebd05
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
5 years agoMerge "Use system hostname first" into tizen accepted/tizen/unified/20191022.150300 submit/tizen/20191014.125724 submit/tizen/20191016.060650 submit/tizen/20191017.072410 submit/tizen/20191021.013541 submit/tizen/20191022.003657
Jaehyun Kim [Mon, 14 Oct 2019 12:54:50 +0000 (12:54 +0000)]
Merge "Use system hostname first" into tizen

5 years agoMerge "Try to auto-connect with favorite service before full channel scan" into tizen
Jaehyun Kim [Mon, 14 Oct 2019 12:53:54 +0000 (12:53 +0000)]
Merge "Try to auto-connect with favorite service before full channel scan" into tizen

5 years agoUse system hostname first 16/215716/2
Jaehyun Kim [Mon, 14 Oct 2019 12:13:51 +0000 (21:13 +0900)]
Use system hostname first

Change-Id: If1a518bda6824919e46eca5d051bb27058fb385c
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
5 years agoTry to auto-connect with favorite service before full channel scan 99/215599/1
hyunuk.tak [Fri, 11 Oct 2019 08:26:34 +0000 (17:26 +0900)]
Try to auto-connect with favorite service before full channel scan

Change-Id: Ia8027c0acf87c3bf2268fa0fc81fa15f8994241c
Signed-off-by: hyunuk.tak <hyunuk.tak@samsung.com>
5 years agoExtract strength as int32 in SignalPoll method_call's reply 84/215584/1 submit/tizen/20191011.090452
Nishant Chaprana [Fri, 11 Oct 2019 06:30:56 +0000 (12:00 +0530)]
Extract strength as int32 in SignalPoll method_call's reply

WPA Supplicant sends "rssi" as int32 in SignalPoll's method_call reply.
So strength should be int32 instead of unsigned char variable.

========================
method call time=1570774928.393859 sender=:1.24 -> destination=fi.w1.wpa_supplicant1 serial=364 path=/fi/w1/wpa_supplicant1/Interfaces/0; interface=fi.w1.wpa_supplicant1.Interface; member=SignalPoll
method return time=1570774928.395629 sender=:1.47 -> destination=:1.24 serial=327 reply_serial=364
   variant       array [
         dict entry(
            string "rssi"
            variant                int32 -60
         )
         dict entry(
            string "linkspeed"
            variant                int32 24
         )
         dict entry(
            string "noise"
            variant                int32 9999
         )
         dict entry(
            string "frequency"
            variant                uint32 2452
         )
      ]
========================

Change-Id: I23d873bf0c5560cbfaee9ef9bd78fe134f4dba93
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>