mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-03 03:08:05 +02: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>
This commit is contained in:
parent
88136c5aab
commit
a7f05b84f8
1 changed files with 1 additions and 2 deletions
|
|
@ -559,8 +559,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