Hi,

On Fri, 2015-07-03 at 09:12 +0200, Gianfranco Casanova wrote:

> ethsession:
> 
> connmanctl> session on
> Session /sessions/_1_116/net/connman/connmanctl4383 created
> Session      Update               = {
> State = disconnected
...
> ConnectionType = internet
> AllowedBearers = [ ethernet ]

So the correct 'ethernet' bearer is now selected. Good. As only one
connection at a time can be in state 'online', only one session at a
time can use type 'internet'; i.e. 'online' maps 1:1 to 'internet'.
Therefore this is in line with the current connmanctl services output
below.

> wifisession:
> 
> connmanctl> session on
> Session /sessions/_1_117/net/connman/connmanctl4384 created
> Session      Update               = {
> State = online
...
> Bearer = wifi
> ConnectionType = internet
> AllowedBearers = [ wifi ]

Same here.

> connmanctl> services 
> *AO abwifi-low           wifi_0024d76e6c38_6162776966692d6c6f77_managed_psk
> *AR Wired                ethernet_68b599eda216_cable

The wifi session can request state 'internet' and it will be connected,
if the ethernet session does the same it is reported as being
disconnected.

> $> ip rule show 
>
> 0: from all lookup local 
> 0: from all lookup main 
> 0: from all fwmark 0x1 lookup 1 
> 0: from all fwmark 0x100 lookup ISP1 
> 0: from all fwmark 0x101 lookup ISP2

Looks fine. ISP1 and ISP2 are in /etc/iproute2/rt_tables, right? ConnMan
reuses the fwmark as the table name, so these have the values 256 and
257 respectively. Note that the fwmark value is not static and depends
on the order of the sessions being activated. With this ISP1 and ISP2
strings will not always be mapped to the intended ISP1 and ISP2...

What does 'ip route show table 0x100' and 'ip route show table 0x101'
show here? Don't configure any of these tables manually in advance, let
ConnMan handle the table and entry creation.

> $> route -n
> 
> 
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
> 0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 wlan0
> 8.8.4.4         192.168.1.1     255.255.255.255 UGH   0      0        0 wlan0
> 8.8.4.4         192.168.1.1     255.255.255.255 UGH   0      0        0 eth0
> 8.8.8.8         192.168.1.1     255.255.255.255 UGH   0      0        0 wlan0
> 8.8.8.8         192.168.1.1     255.255.255.255 UGH   0      0        0 eth0
> 192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
> 192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0
> 192.168.1.1     0.0.0.0         255.255.255.255 UH    0      0        0 wlan0
> 192.168.1.1     0.0.0.0         255.255.255.255 UH    0      0        0 eth0

This command shows the default routing table used for everybody else not
matched by UIDs to specific tables.


> $> iptables -t mangle -L 
...
> Chain connman-INPUT (1 references)
> target     prot opt source               destination         
> CONNMARK   all  --  anywhere             anywhere             CONNMARK restore
> 
> 
> Chain connman-OUTPUT (1 references)
> target     prot opt source               destination         
> MARK       all  --  anywhere             anywhere             owner UID match 
> ethsession MARK set 0x100
> MARK       all  --  anywhere             anywhere             owner UID match 
> wifisession MARK set 0x101
> 
> 
> Chain connman-POSTROUTING (1 references)
> target     prot opt source               destination         
> CONNMARK   all  --  anywhere             anywhere             CONNMARK save

Looks fine.

All of this is now working correctly. Please check the output of 'ip
route show table 0x...'

Cheers,

        Patrik



_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to