mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-21 10:14:41 +00:00
release: update TODO with enhanced connectivity check ideas
This commit is contained in:
parent
f828785428
commit
51e0cf5f0f
34
TODO
34
TODO
|
@ -1,16 +1,30 @@
|
||||||
So you're interested in hacking on NetworkManager? Here's some cool
|
So you're interested in hacking on NetworkManager? Here's some cool
|
||||||
stuff you could do...
|
stuff you could do...
|
||||||
|
|
||||||
* Internet Connectivity Detection
|
* Internet Connectivity Detection Enhancements
|
||||||
|
|
||||||
This feature would consist of attempting to make an HTTP request to a known
|
Current connectivity checking is global, while what we really want is to check
|
||||||
DNS address and compare the response to a well-known string, like Windows does.
|
connectivity per-interface and update the global state based on the composite
|
||||||
This feature and the server address should be configurable via an option in the
|
of each device's state. Unfortunately that requires two things:
|
||||||
/etc/NetworkManager/NetworkManager.conf config file.
|
|
||||||
|
|
||||||
Once the device has successfully gotten an IPv4 or IPv6 address, it should
|
1) latest libsoup and glib for using libsoup connection state signals, which
|
||||||
enter the state NM_DEVICE_STATE_IP_CHECK, where this HTTP request would be
|
allow us to set socket options before the actual connection is made; here
|
||||||
performed. After the check was done, the device would set a property in
|
we'd bind the socket to the specific IP address of the interface we're
|
||||||
|
using, and possibly set SO_BINDTODEVICE as well
|
||||||
|
2) setting /proc/sys/net/ipv4/conf/<iface>/rp_filter to "2" which tells the
|
||||||
|
kernel to route the incoming and outgoing packet properly even though the
|
||||||
|
interface may not have the necessary routes
|
||||||
|
|
||||||
|
The first is the largest obstacle, but ideally we implement this and enable it
|
||||||
|
when we have the required glib and libsoup versions available. One other
|
||||||
|
complication is that this checking should be done during the
|
||||||
|
NM_DEVICE_STATE_IP_CHECK phase (along with other operations like WiFi hotspot
|
||||||
|
auto-login) while the current checks are done globally in nm-manager.c, so
|
||||||
|
keeping both code paths might be complex.
|
||||||
|
|
||||||
|
But ideally, once the device has successfully gotten an IPv4 or IPv6 address, it
|
||||||
|
should enter the state NM_DEVICE_STATE_IP_CHECK, where a connectivity check is
|
||||||
|
started. After the check returns, the device would set a property in
|
||||||
NMDevicePrivate to indicate whether Internet access was successful or not, and
|
NMDevicePrivate to indicate whether Internet access was successful or not, and
|
||||||
advance to the NM_DEVICE_STATE_ACTIVATED state.
|
advance to the NM_DEVICE_STATE_ACTIVATED state.
|
||||||
|
|
||||||
|
@ -19,10 +33,6 @@ nm_manager_update_state() function, would query this property and set
|
||||||
NM_STATE_CONNECTED_LOCAL, NM_STATE_CONNECTED_SITE, or NM_STATE_CONNECTED_GLOBAL
|
NM_STATE_CONNECTED_LOCAL, NM_STATE_CONNECTED_SITE, or NM_STATE_CONNECTED_GLOBAL
|
||||||
based on it and the device's state.
|
based on it and the device's state.
|
||||||
|
|
||||||
Ideally this feature would not require linking to an HTTP library like libcurl,
|
|
||||||
but would use open-coded simple HTTP or libsoup for the request. The request
|
|
||||||
must be done asynchronously, of course.
|
|
||||||
|
|
||||||
|
|
||||||
* ADSL support
|
* ADSL support
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue