Send connman mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."
Today's Topics:
1. Re: [PATCH] service: do not reply twice to Connect (Beno?t Monin)
----------------------------------------------------------------------
Message: 1
Date: Fri, 17 Aug 2018 15:30:39 +0200
From: Beno?t Monin <[email protected]>
To: Daniel Wagner <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] service: do not reply twice to Connect
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"
Hi Daniel,
14/08/2018 Daniel Wagner :
[...]
> I am not convinced that your patch is complete correct. In case where
> __connman_service_connect() returns with success instead of EINPROGRESS
> then your patch could it up the response, no?
>
> Suppose that autoconnect is happening in the background and the user
> calls 'Connect' before the Service was online. In this case we used to
> send an 'error already' back.
>
> The question is why does ConnMan send the same response twice? Can you
> send a log?
>
I assumed that in function connect_service, upon return from
__connman_service_connect if service->pending is NULL, it means that a
reply has been sent. Depending on the code path taken from
__connman_service_connect, if there is a call to reply_pending, then the
first reply is sent and service->pending is sets to NULL.
Maybe I should make the patch more explicit, something like:
if service->pending is null then return null? Or do you think there are
places where service->pending can be set to NULL without sending a reply?
In the log below, there is a call to connman_dbus_reply_pending that send
the reply. It comes from reply_pending, the only function in service.c
with connman_dbus_reply_pending in it.
The test I did is setup a manual configuration on an ethernet device,
disconnect it then reconnect:
connmanctl config ethernet_82b20cbe1767_cable --ipv4 192.168.0.42 255.255.255.0
connmanctl disconnect ethernet_82b20cbe1767_cable
connmanctl connect ethernet_82b20cbe1767_cable
Here is the connmand debug log after calling connect:
src/service.c:connect_service() service 0xb84110
src/service.c:__connman_service_connect() service 0xb84110 state idle connect
reason none -> user
src/service.c:__connman_service_clear_error() service 0xb84110
src/network.c:__connman_network_connect() network 0xb83eb0
src/device.c:__connman_device_disconnect() device 0xb83660
src/network.c:__connman_network_disconnect() network 0xb83eb0
plugins/ethernet.c:eth_network_connect() network 0xb83eb0
src/network.c:connman_network_set_connected() network 0xb83eb0 connected 0/1
connecting 1 associating 0
src/network.c:connman_network_set_associating() network 0xb83eb0 associating 0
src/network.c:set_connected() service 0xb84110 ipv4 0xb83e50 ipv6 0xb83910
src/network.c:set_configuration() network 0xb83eb0
src/service.c:__connman_service_ipconfig_indicate_state() service 0xb84110
(ethernet_82b20cbe1767_cable) old state 1 (idle) new state 3 (configuration)
type 1 (IPv4)
src/service.c:service_indicate_state() service 0xb84110 old idle - new
configuration/idle => configuration
src/session.c:service_state_changed() service 0xb84110 state 3
src/notifier.c:notify_idle_state() idle 0
src/manager.c:idle_state() idle 0
src/connection.c:__connman_connection_update_gateway() default (nil)
src/network.c:__connman_network_enable_ipconfig() ipv4 ipconfig method 3
src/network.c:set_connected_manual() network 0xb83eb0
src/ipconfig.c:__connman_ipconfig_enable() ipconfig 0xb83e50
src/ipconfig.c:__connman_ipconfig_ref_debug() 0xb83e50 ref 2 by
src/ipconfig.c:1577:__connman_ipconfig_enable()
src/service.c:service_up() eth0 up
src/service.c:service_lower_up() eth0 lower up
src/service.c:stats_start() service 0xb84110
src/ipconfig.c:__connman_ipconfig_load() ipconfig 0xb83e50 identifier
ethernet_82b20cbe1767_cable
src/inet.c:connman_inet_set_address() index 2 address 192.168.0.42 prefix_len 24
src/inet.c:__connman_inet_modify_address() cmd 0x14 flags 0x104 index 2 family
2 address 192.168.0.42 peer (null) prefixlen 24 broadcast (null)
src/ipconfig.c:__connman_ipconfig_gateway_add()
src/ipconfig.c:__connman_ipconfig_gateway_add() type 1 gw (null) peer (null)
src/connection.c:__connman_connection_gateway_add() service 0xb84110 index 2
gateway 0.0.0.0 vpn ip (null) type 1
src/service.c:connman_service_ref_debug() 0xb84110 ref 2 by
src/connection.c:403:add_gateway()
src/connection.c:find_active_gateway()
src/connection.c:__connman_connection_gateway_add() active (nil) index -1 new
0xb81d40
src/connection.c:set_default_gateway() type 1 gateway ipv4 0xb7f310 ipv6 (nil)
src/inet.c:connman_inet_set_gateway_interface() index 2
src/inet.c:connman_inet_set_gateway_interface() ifname eth0
src/service.c:__connman_service_indicate_default() service 0xb84110 state
configuration
src/service.c:__connman_service_ipconfig_indicate_state() service 0xb84110
(ethernet_82b20cbe1767_cable) old state 3 (configuration) new state 4 (ready)
type 1 (IPv4)
src/wpad.c:__connman_wpad_start() service 0xb84110
src/service.c:__connman_service_wispr_start() service 0xb84110 type IPv4
src/wispr.c:__connman_wispr_start() service 0xb84110
src/wispr.c:wispr_portal_detect() wispr/portal context 0xb87050 service 0xb84110
src/wispr.c:wispr_portal_detect() interface eth0
src/wispr.c:wispr_portal_detect() Could not get nameservers
src/service.c:service_rp_filter() connected ethernet_82b20cbe1767_cable
ipconfig 0xb83e50 method 3 count 1 filter 0
src/service.c:service_indicate_state() service 0xb84110 old configuration - new
ready/idle => ready
src/session.c:service_state_changed() service 0xb84110 state 4
src/service.c:default_changed() current default (nil)
src/service.c:default_changed() new default 0xb84110 ethernet_82b20cbe1767_cable
src/dnsproxy.c:dnsproxy_default_changed() service 0xb84110
src/timeserver.c:timeserver_start() service 0xb84110
src/nat.c:update_default_interface() interface eth0
src/dbus.c:connman_dbus_reply_pending() sender net.connman.Service path
/net/connman/service/ethernet_82b20cbe1767_cable
src/service.c:service_save() service 0xb84110 new 0
src/ipconfig.c:__connman_ipconfig_save() ipconfig 0xb83e50 identifier
ethernet_82b20cbe1767_cable method manual
src/ipconfig.c:__connman_ipconfig_save() ipconfig 0xb83910 identifier
ethernet_82b20cbe1767_cable method auto
src/notifier.c:__connman_notifier_connect() type 2
src/technology.c:technology_find() type 2
src/technology.c:__connman_technology_set_connected() technology 0xb83890
connected 1
src/connection.c:__connman_connection_update_gateway() default 0xb81d40
src/network.c:set_configuration() network 0xb83eb0
src/service.c:__connman_service_ipconfig_indicate_state() service 0xb84110
(ethernet_82b20cbe1767_cable) old state 1 (idle) new state 3 (configuration)
type 2 (IPv6)
src/service.c:service_indicate_state() service 0xb84110 old ready - new
ready/configuration => ready
src/network.c:__connman_network_enable_ipconfig() ipv6 ipconfig method 5
src/network.c:autoconf_ipv6_set() network 0xb83eb0
src/ipconfig.c:__connman_ipconfig_enable() ipconfig 0xb83910
src/ipconfig.c:__connman_ipconfig_ref_debug() 0xb83910 ref 2 by
src/ipconfig.c:1579:__connman_ipconfig_enable()
src/ipconfig.c:enable_ipv6()
src/service.c:service_up() eth0 up
src/service.c:service_lower_up() eth0 lower up
src/service.c:stats_start() service 0xb84110
src/ipconfig.c:enable_ipv6()
src/inet.c:connman_inet_clear_ipv6_address() index 2 address (null) prefix_len 0
src/network.c:connman_network_ref_debug() 0xb83eb0 name Wired ref 4 by
src/network.c:908:autoconf_ipv6_set()
src/inet.c:__connman_inet_ipv6_send_rs() sock 15
src/inet.c:ndisc_send_unspec()
src/service.c:__connman_service_connect() service 0xb84110 err 0
src/rtnl.c:rtnl_message() NEWADDR len 88 type 20 flags 0x0000 seq 1 pid
2209772537
src/ipconfig.c:__connman_ipconfig_newaddr() index 2
eth0 {add} address 192.168.0.42/24 label eth0 family 2
src/service.c:service_ip_bound() eth0 ip bound
src/service.c:service_ip_bound() service 0xb84110 ipconfig 0xb83e50 type 1
method 3
src/session.c:ipconfig_changed() service 0xb84110 ipconfig 0xb83e50
src/rtnl.c:rtnl_message() NEWROUTE len 60 type 24 flags 0x0600 seq 0 pid 0
src/rtnl.c:rtnl_message() NEWROUTE len 60 type 24 flags 0x0600 seq 0 pid 0
src/rtnl.c:rtnl_message() NEWROUTE len 60 type 24 flags 0x0600 seq 0 pid 0
src/ipconfig.c:__connman_ipconfig_newroute() index 2
eth0 {add} route 192.168.0.0 gw 0.0.0.0 scope 253 <LINK>
src/rtnl.c:rtnl_message() NEWROUTE len 60 type 24 flags 0x0600 seq 0 pid 0
src/rtnl.c:rtnl_message() NEWROUTE len 44 type 24 flags 0x0600 seq 0 pid 0
src/ipconfig.c:__connman_ipconfig_newroute() index 2
eth0 {add} route 0.0.0.0 gw 0.0.0.0 scope 253 <LINK>
src/connection.c:connection_newgateway() index 2 gateway 0.0.0.0
src/connection.c:set_default_gateway() type 1 gateway ipv4 0xb7f310 ipv6 (nil)
src/inet.c:connman_inet_set_gateway_interface() index 2
src/inet.c:connman_inet_set_gateway_interface() ifname eth0
src/service.c:__connman_service_indicate_default() service 0xb84110 state ready
--
Beno?t
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman
------------------------------
End of connman Digest, Vol 34, Issue 9
**************************************