summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--release/sysinstall/tcpip.c2
-rw-r--r--usr.sbin/sysinstall/tcpip.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/release/sysinstall/tcpip.c b/release/sysinstall/tcpip.c
index 48ce727..1d4609a 100644
--- a/release/sysinstall/tcpip.c
+++ b/release/sysinstall/tcpip.c
@@ -369,7 +369,7 @@ netconfig:
if (domainname[0])
variable_set2(VAR_DOMAINNAME, domainname, 0);
if (gateway[0])
- variable_set2(VAR_GATEWAY, gateway, 1);
+ variable_set2(VAR_GATEWAY, gateway, use_dhcp ? 0 : 1);
if (nameserver[0])
variable_set2(VAR_NAMESERVER, nameserver, 0);
if (ipaddr[0])
diff --git a/usr.sbin/sysinstall/tcpip.c b/usr.sbin/sysinstall/tcpip.c
index 48ce727..1d4609a 100644
--- a/usr.sbin/sysinstall/tcpip.c
+++ b/usr.sbin/sysinstall/tcpip.c
@@ -369,7 +369,7 @@ netconfig:
if (domainname[0])
variable_set2(VAR_DOMAINNAME, domainname, 0);
if (gateway[0])
- variable_set2(VAR_GATEWAY, gateway, 1);
+ variable_set2(VAR_GATEWAY, gateway, use_dhcp ? 0 : 1);
if (nameserver[0])
variable_set2(VAR_NAMESERVER, nameserver, 0);
if (ipaddr[0])
OpenPOWER on IntegriCloud