summaryrefslogtreecommitdiffstats
path: root/ethernet_interface.cpp
diff options
context:
space:
mode:
authorNagaraju Goruganti <ngorugan@in.ibm.com>2018-03-26 05:21:45 -0500
committerNagaraju Goruganti <ngorugan@in.ibm.com>2018-03-26 05:46:47 -0500
commite8b83ecdd67c40014d560b265fd2f5ebb68ea0ea (patch)
tree79b72a21e2a3c578aa7497d90eb974fb17906f3b /ethernet_interface.cpp
parent6b371a12a04d45b96514df5b770119ca77584d9a (diff)
downloadphosphor-networkd-e8b83ecdd67c40014d560b265fd2f5ebb68ea0ea.tar.gz
phosphor-networkd-e8b83ecdd67c40014d560b265fd2f5ebb68ea0ea.zip
Move DHCP=xxx to Network section in n/w config file.
With the changes done for the issue #2891, we are adding DHCP section always into n/w config file, irrespective of DHCP enabled or not. With those new changes when DHCP is disabled(i.e in static case) DHCP=xxx entry is getting added into Route section and causing the issue. Resolves openbmc/openbmc#3030 Change-Id: I97b30129de97eff5d25e78a09e9cb713c45ad4a7 Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
Diffstat (limited to 'ethernet_interface.cpp')
-rw-r--r--ethernet_interface.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/ethernet_interface.cpp b/ethernet_interface.cpp
index 74c30c5..e388fa8 100644
--- a/ethernet_interface.cpp
+++ b/ethernet_interface.cpp
@@ -564,6 +564,10 @@ void EthernetInterface::writeConfigurationFile()
stream << "VLAN=" << intf.second->EthernetInterface::interfaceName()
<< "\n";
}
+ // Add the DHCP entry
+ auto value = dHCPEnabled() ? "true"s : "false"s;
+ stream << "DHCP="s + value + "\n";
+
// When the interface configured as dhcp, we don't need below given entries
// in config file.
if (dHCPEnabled() == false)
@@ -624,9 +628,6 @@ void EthernetInterface::writeConfigurationFile()
}
}
- auto value = dHCPEnabled() ? "true"s : "false"s;
- stream << "DHCP="s + value + "\n";
-
// Write the dhcp section irrespective of whether DHCP is enabled or not
writeDHCPSection(stream);
OpenPOWER on IntegriCloud