|
check_preferred_route(struct enftun_conn_state* conn_state) |
For local TCP sockets, we:
- subscribe to netlink notifications for routing table changes
- when the routing table changes, we check if the preferred route has change by
- opening and "connecting" a UDP socket
- checking if the local address for that socket is the same as the active TCP tunnel
- if addresses are different, our route has changed, so reconnect the tunnel (call to reconect_cb)
When connected via HSS, we want to detect if local TCP (wifi) becomes available:
- subscribe to netlink notifications for routing table changes
- when the routing table change, check if it is possible to connect locally (via wifi) by
- opening and "connecting" a UDP socket
- if that succeeds, reconnect the tunnel (call to reconnect_cb)
When connected va HSS, we want to detect if the host (HSS kernel driver) route has changed:
enftun/src/conn_state.c
Line 34 in db59a95
For local TCP sockets, we:
When connected via HSS, we want to detect if local TCP (wifi) becomes available:
When connected va HSS, we want to detect if the host (HSS kernel driver) route has changed: