summaryrefslogtreecommitdiff
path: root/src/network/networkd-dhcp4.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-10-12 15:12:55 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2020-10-15 07:06:03 +0900
commit5bb80a46030902e636c72d850ff9aa97c8632f3f (patch)
treec740528223882b1c8896e965a7dfb60cee9250ea /src/network/networkd-dhcp4.c
parentc3d679c43f3e754dd77796c2f5796be42ca2b99e (diff)
downloadsystemd-5bb80a46030902e636c72d850ff9aa97c8632f3f.tar.gz
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.
Diffstat (limited to 'src/network/networkd-dhcp4.c')
-rw-r--r--src/network/networkd-dhcp4.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
index fe8d667c03..29404e34ee 100644
--- a/src/network/networkd-dhcp4.c
+++ b/src/network/networkd-dhcp4.c
@@ -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);