NetworkManager/clients
Thomas Haller e95cf643c3 cli: drop invalid validation for default-routes in nmcli
Currently, default-routes cannot be added like regular static-routes
as ipv4.routes setting.
Instead, one has to configure "ipv4.gateway" and "ipv4.never-default".
That of course should be fixed, for example to configure a default-route
in different routing tables.

As it is, both nmcli's parse function and libnm's
NMSettingIPConfig:verify() functions reject default-routes.

But nmcli goes way beyond that, it also rejects all networks with
"0.0.0.0"/"::" even if their prefix length is not zero. Such routes are
not default-routes, and nmcli has no business rejecting them. The
correct way for checking for a default-route is to check the prefix-length
for zero.

Drop the wrong validation in nmcli.

Note, it may still not be the best idea to add catch-all routes like
"0.0.0.0/1" and "128.0.0.0/1". It just defeats what counts as a default-route.
NM has other means (like configuring the route-metric) to handle routing
in face of multiple interfaces. But sure, whatever works for you.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/114
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/75
2019-02-07 17:21:40 +01:00
..
cli Revert "cli: verify connections before sending them over to daemon" 2019-02-06 11:51:38 +01:00
common cli: drop invalid validation for default-routes in nmcli 2019-02-07 17:21:40 +01:00
tests Revert "clients/tests: fix client tests" 2019-02-06 12:12:51 +01:00
tui clients: don't tread secret agent as NMSecretAgentOld 2019-02-05 08:27:42 +01:00
meson.build build: meson: Add trailing commas 2018-12-20 13:50:34 +01:00
nm-online.c nm-online: sort options in man page and program help 2018-11-05 09:32:20 +01:00