mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-01 16:10:29 +01:00
Kernel does not all allow to configure a route via a gateway, if the
gateway is not directly reachable.
For non-manually added routes (e.g. from DHCP), we ignore them as a
server configuration errors. For manually added routes, we try to work
around them.
Note that if the user adds a manual route that references a gateway,
maybe he should be required to also add a matching onlink route for
the gateway (or an address that results in a device-route), otherwise
the configuration could be considered invalid. That was however not
done historically, and also, it seems a rather unhelpful behavior.
NetworkManage should just make it work, not not assume anything is
wrong with the configuration. Similarly, for IPv4, the user could
configure the route as onlink, however, that still requires extra
configuration of which the user might not be aware.
This would apply for example, when a connection has method=auto,
and would obtain the routes automatically. It seems sensible to
allow the user to add a route via the gateway, if he ~knows~ that
this particular network will provide such a configuration via DHCP.
In the past however, we tried not to automatically add a device route,
but instead see whether we will get a suitable route via DHCP. If we
wouldn't get such a route, we would however fail the connection.
However, this is really very hard to get right.
We call ip_config_merge_and_apply() possibly before receiving automatic
IP configuration (commit
|
||
|---|---|---|
| .. | ||
| adsl | ||
| bluetooth | ||
| ovs | ||
| team | ||
| tests | ||
| wifi | ||
| wwan | ||
| meson.build | ||
| nm-arping-manager.c | ||
| nm-arping-manager.h | ||
| nm-device-bond.c | ||
| nm-device-bond.h | ||
| nm-device-bridge.c | ||
| nm-device-bridge.h | ||
| nm-device-dummy.c | ||
| nm-device-dummy.h | ||
| nm-device-ethernet-utils.c | ||
| nm-device-ethernet-utils.h | ||
| nm-device-ethernet.c | ||
| nm-device-ethernet.h | ||
| nm-device-factory.c | ||
| nm-device-factory.h | ||
| nm-device-generic.c | ||
| nm-device-generic.h | ||
| nm-device-infiniband.c | ||
| nm-device-infiniband.h | ||
| nm-device-ip-tunnel.c | ||
| nm-device-ip-tunnel.h | ||
| nm-device-logging.h | ||
| nm-device-macsec.c | ||
| nm-device-macsec.h | ||
| nm-device-macvlan.c | ||
| nm-device-macvlan.h | ||
| nm-device-ppp.c | ||
| nm-device-ppp.h | ||
| nm-device-private.h | ||
| nm-device-tun.c | ||
| nm-device-tun.h | ||
| nm-device-veth.c | ||
| nm-device-veth.h | ||
| nm-device-vlan.c | ||
| nm-device-vlan.h | ||
| nm-device-vxlan.c | ||
| nm-device-vxlan.h | ||
| nm-device.c | ||
| nm-device.h | ||
| nm-lldp-listener.c | ||
| nm-lldp-listener.h | ||