core: make connectivity checking per-device

System Internals / NetworkManager - Lubomir Rintel [v3.sk] - 28 March 2017 09:26 EDT

This moves tracking of connectivity to NMDevice and makes the NMManager negotiate the best of known connectivity states of devices. The NMConnectivity singleton handles its own configuration and scheduling of the permission checks, but otherwise greatly simplifies it.

This will be useful to determine correct metrics for multiple default routes depending on actual internet connectivity.

The per-device connection checks is not yet exposed on the D-Bus, since they probably should be per-address-family as well.

9d43869 core: make connectivity checking per-device
Makefile.am | 6 +-
src/devices/nm-device.c | 183 +++++++++++++++++++-
src/devices/nm-device.h | 12 +-
src/main.c | 6 +-
src/nm-connectivity.c | 433 ++++++++++++++----------------------------------
src/nm-connectivity.h | 18 +-
src/nm-dispatcher.c | 11 +-
src/nm-manager.c | 157 +++++++-----------
8 files changed, 404 insertions(+), 422 deletions(-)

Upstream: cgit.freedesktop.org


  • Share