Do not config Gateway when DHCP is enabled
When DHCP is enabled and the Gateway is in the network config,
systemd-networkd will try to set the gateway anyway, and if the gateway
could not be set, it fails with below error:
systemd-networkd[459]: eth0: Could not set route: No route to host
systemd-networkd[459]: eth0: Failed
The config should skip setting the gateway when the DHCP is enabled.
Tested: Verify the DHCP could be enabled from static config.
Fixes openbmc/phosphor-networkd#43
Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: I6486284133003afbe5c657ef22c27d1994544f17
1 file changed