NetworkManager/src/devices
Thomas Haller f0de7d347f platform: add non-exclusive routes and drop route-manager
Previously, we would add exclusive routes via netlink message flags
NLM_F_CREATE | NLM_F_REPLACE for RTM_NEWROUTE. Similar to `ip route replace`.
Using that form of RTM_NEWROUTE message, we could only add a certain
route with a certain network/plen,metric triple once. That was already
hugely inconvenient, because

 - when configuring routes, multiple (managed) interfaces may get
   conflicting routes (multihoming). Only one of the routes can be actually
   configured using `ip route replace`, so we need to track routes that are
   currently shadowed.

 - when configuring routes, we might replace externally configured
   routes on unmanaged interfaces. We should not interfere with such
   routes.

That was worked around by having NMRouteManager (and NMDefaultRouteManager).
NMRouteManager would keep a list of the routes which NetworkManager would like
to configure, even if momentarily being unable to do so due to conflicting routes.
This worked mostly well but was complicated. It involved bumping metrics to
avoid conflicts for device routes, as we might require them for gateway routes.

Drop that now. Instead, use the corresponding of `ip route append` to configure
routes. This allows NetworkManager to confiure (almost) all routes that we care.
Especially, it can configure all routes on a managed interface, without
replacing/interfering with routes on other interfaces. Hence, NMRouteManager
becomes obsolete.

It practice it is a bit more complicated because:

 - when adding an IPv4 address, kernel will automatically create a device route
   for the subnet. We should avoid that by using the IFA_F_NOPREFIXROUTE flag for
   IPv4 addresses (still to-do). But as kernel may not support that flag for IPv4
   addresses yet (and we don't require such a kernel yet), we still need functionality
   similar to nm_route_manager_ip4_route_register_device_route_purge_list().
   This functionality is now handled via nm_platform_ip4_dev_route_blacklist_set().

 - trying to configure an IPv6 route with a source address will be rejected
   by kernel as long as the address is tentative (see related bug rh#1457196).
   Preferably, NMDevice would keep the list of routes which should be configured,
   while kernel would have the list of what actually is configured. There is a
   feed-back loop where both affect each other (for example, when externally deleting
   a route, NMDevice must forget about it too). Previously, NMRouteManager would have
   the task of remembering all routes which we currently want to configure, but cannot
   due to conflicting routes.
   We get rid of that, because now we configure non-exclusive routes. We however still
   will need to remember IPv6 routes with a source address, that currently cannot be
   configured yet. Hence, we will need to keep track of routes that
   currently cannot be configured, but later may be.
   That is still not done yet, as NMRouteManager didn't handle this
   correctly either.
2017-08-24 10:48:03 +02:00
..
adsl device: don't use platform singleton getter in device subclasses 2017-04-18 15:49:14 +02:00
bluetooth core: fix crash with bluetooth device factory wrongly claiming NAP connection 2017-08-06 07:50:48 +02:00
team device: refactor how master device's set is_available() 2017-06-22 13:26:53 +02:00
tests platform/tests: use nm_platform_link_veth_add() to create veth pair in test 2017-05-27 23:16:56 +02:00
wifi devices/wifi: move scan option processing to D-Bus request scan handler 2017-08-11 12:35:01 -05:00
wwan platform: add non-exclusive routes and drop route-manager 2017-08-24 10:48:03 +02:00
nm-arping-manager.c devices/arping-manager: log the device context 2017-03-24 12:42:09 +01:00
nm-arping-manager.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-device-bond.c bond: ignore miimon option only when it is zero 2017-06-23 11:18:51 +02:00
nm-device-bond.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-device-bridge.c core: fix crash with bluetooth device factory wrongly claiming NAP connection 2017-08-06 07:50:48 +02:00
nm-device-bridge.h bridge: move the Bluetooth NAP logic to bridge device 2017-06-01 11:57:42 +02:00
nm-device-dummy.c device: don't use platform singleton getter in device subclasses 2017-04-18 15:49:14 +02:00
nm-device-dummy.h core: add support for dummy devices 2017-02-22 21:05:04 +01:00
nm-device-ethernet-utils.c device: use NMSettings directly instead of NMConnectionProvider in subclasses 2016-05-24 12:35:58 +02:00
nm-device-ethernet-utils.h device: use NMSettings directly instead of NMConnectionProvider in subclasses 2016-05-24 12:35:58 +02:00
nm-device-ethernet.c device: use ppp device for new style pppoe setting 2017-08-05 08:03:16 +02:00
nm-device-ethernet.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-device-factory.c core: device-factory: implement match_connection() 2017-08-05 08:03:16 +02:00
nm-device-factory.h core: device-factory: implement match_connection() 2017-08-05 08:03:16 +02:00
nm-device-generic.c device: don't use platform singleton getter in device subclasses 2017-04-18 15:49:14 +02:00
nm-device-generic.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-device-infiniband.c device: don't set MTU of device unless explicitly configured 2017-06-13 15:05:30 +02:00
nm-device-infiniband.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-device-ip-tunnel.c core/trivial: indentation in src/devices/nm-device-ip-tunnel.c 2017-08-23 18:37:21 +02:00
nm-device-ip-tunnel.h device: move tracking of parent device from NMDeviceIPTunnel to NMDevice 2017-01-04 14:18:01 +01:00
nm-device-logging.h manager: add logging macro _NMLOG2() for logging device messages 2017-06-08 21:50:23 +02:00
nm-device-macsec.c device: don't use platform singleton getter in device subclasses 2017-04-18 15:49:14 +02:00
nm-device-macsec.h core,libnm: introduce NMDeviceMacsec 2017-01-16 17:37:14 +01:00
nm-device-macvlan.c device: don't use platform singleton getter in device subclasses 2017-04-18 15:49:14 +02:00
nm-device-macvlan.h device: move tracking of parent device from NMDeviceMacvlan to NMDevice 2017-01-04 14:18:01 +01:00
nm-device-ppp.c core: implement activation of PPP devices 2017-08-05 08:03:16 +02:00
nm-device-ppp.h device: add NMDevicePPP 2017-08-05 08:03:15 +02:00
nm-device-private.h core: implement activation of PPP devices 2017-08-05 08:03:16 +02:00
nm-device-tun.c device: don't use platform singleton getter in device subclasses 2017-04-18 15:49:14 +02:00
nm-device-tun.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-device-veth.c device: remove unused private data for NMDeviceVeth 2017-05-27 23:16:56 +02:00
nm-device-veth.h all: cleanup includes in header files 2016-08-17 19:51:17 +02:00
nm-device-vlan.c device: skip creating VLAN devices if parent device is not ready yet 2017-08-22 11:54:37 +02:00
nm-device-vlan.h device: move tracking of parent device from NMDeviceVlan to NMDevice 2017-01-04 14:18:01 +01:00
nm-device-vxlan.c device: don't use platform singleton getter in device subclasses 2017-04-18 15:49:14 +02:00
nm-device-vxlan.h device: move tracking of parent device from NMDeviceVxlan to NMDevice 2017-01-04 14:18:01 +01:00
nm-device.c platform: add non-exclusive routes and drop route-manager 2017-08-24 10:48:03 +02:00
nm-device.h core: pass NMDedupMultiIndex instance to NMIP4Config and other 2017-07-05 14:22:10 +02:00
nm-lldp-listener.c core: use NM_HASH_COMBINE() function 2017-07-05 14:22:10 +02:00
nm-lldp-listener.h core: refactor private data for NMExportedObject and others 2016-10-03 12:04:14 +02:00