mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-05 11:10:31 +01:00
core: fix setting next_hop in nm_ip6_config_create_setting()
The next-hop should always be set to route->gateway. Just as
it is done in the IPv4 case too.
This bug only affected routes to '::/p via gateway', with a
non-zero gateway and p > 0. That is a quite uncommon case, because
usually non-default routes have not a net-part all zero.
Signed-off-by: Thomas Haller <thaller@redhat.com>
(cherry picked from commit a7f05b84f8)
This commit is contained in:
parent
1feefce5d3
commit
9bbf9f031b
1 changed files with 1 additions and 2 deletions
|
|
@ -560,8 +560,7 @@ nm_ip6_config_create_setting (const NMIP6Config *config)
|
|||
s_route = nm_ip6_route_new ();
|
||||
nm_ip6_route_set_dest (s_route, &route->network);
|
||||
nm_ip6_route_set_prefix (s_route, route->plen);
|
||||
if (!IN6_IS_ADDR_UNSPECIFIED (&route->network))
|
||||
nm_ip6_route_set_next_hop (s_route, &route->gateway);
|
||||
nm_ip6_route_set_next_hop (s_route, &route->gateway);
|
||||
nm_ip6_route_set_metric (s_route, route->metric);
|
||||
|
||||
nm_setting_ip6_config_add_route (s_ip6, s_route);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue