SIGN IN SIGN UP

kernel mode: validate conflicting routes

Kernel does not allows desired multiple routes with the same destination
and metric.
When user desire so, it is unclear whether user made a fault or want
ECMP routes.

In NM mode, that YAML will generate ECMP routes for IPv6 and append
desired routes before existing for IPv4. This patch does not change that
because it might break working YAMLs.

For kernel mode, this patch raise better error instead of kernel error
code `-22`:

    NmstateError: InvalidArgument: Multiple routes to 2001:db8:2::/64 are
    sharing the same metric without weight, please neither use `state:
    absent` to remove others.

Integration test case included.

Resolves: https://issues.redhat.com/browse/RHEL-54558

Signed-off-by: Gris Ge <fge@redhat.com>
G
Gris Ge committed
ad4647e0d87defa96d76e0c8e1bb4af875b1fcc9
Parent: 43d5eca