mirror of
https://github.com/systemd/systemd.git
synced 2025-03-14 04:58:28 +03:00
network: determine a [Route] section will be used or not by gateway family instead of route family
By this commit, user can configure dynamic IPv6 Gateway with IPv4 destination.
This commit is contained in:
parent
c3d679c43f
commit
5bb80a4603
@ -391,10 +391,9 @@ static int link_set_dhcp_routes(Link *link) {
|
||||
if (!rt->gateway_from_dhcp_or_ra)
|
||||
continue;
|
||||
|
||||
if (rt->family != AF_INET)
|
||||
if (rt->gw_family != AF_INET)
|
||||
continue;
|
||||
|
||||
rt->gw_family = AF_INET;
|
||||
rt->gw.in = router[0];
|
||||
|
||||
r = dhcp_route_configure(rt, link);
|
||||
|
@ -527,11 +527,10 @@ static int ndisc_router_process_default(Link *link, sd_ndisc_router *rt) {
|
||||
if (!route_gw->gateway_from_dhcp_or_ra)
|
||||
continue;
|
||||
|
||||
if (route_gw->family != AF_INET6)
|
||||
if (route_gw->gw_family != AF_INET6)
|
||||
continue;
|
||||
|
||||
route_gw->gw = gateway;
|
||||
route_gw->gw_family = AF_INET6;
|
||||
|
||||
r = ndisc_route_configure(route_gw, link, rt);
|
||||
if (r < 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user