summaryrefslogtreecommitdiffstats
path: root/ethernet_interface.cpp
diff options
context:
space:
mode:
authorRatan Gupta <ratagupt@in.ibm.com>2017-08-13 09:41:58 +0530
committerPatrick Williams <patrick@stwcx.xyz>2017-08-13 11:32:59 +0000
commit6e8df63c13c9d0a343e8d14de61e2635df797efa (patch)
treec7de12a286f477b93ab365ea9bffef8a0cc3c81f /ethernet_interface.cpp
parent56187e78088b7314e1cf0328ae92690a42a04152 (diff)
downloadphosphor-networkd-6e8df63c13c9d0a343e8d14de61e2635df797efa.tar.gz
phosphor-networkd-6e8df63c13c9d0a343e8d14de61e2635df797efa.zip
vlan:Minor Fixes
=>Get the dhcp value from the conf File for the vlan interface. =>Assign the mac address of the parnt interface to vlan interface. =>Create the ipv6 child ip objects once create the vlan interface. Change-Id: I1d73fb18f9d300cbdcf94c73f06df2ea4a1d019b Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
Diffstat (limited to 'ethernet_interface.cpp')
-rw-r--r--ethernet_interface.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/ethernet_interface.cpp b/ethernet_interface.cpp
index 5eb6aa7..5c78f3a 100644
--- a/ethernet_interface.cpp
+++ b/ethernet_interface.cpp
@@ -353,7 +353,6 @@ bool EthernetInterface::dHCPEnabled(bool value)
{
writeConfigurationFile();
createIPAddressObjects();
-
}
return value;
@@ -366,10 +365,13 @@ void EthernetInterface::loadVLAN(VlanId id)
std::string path = objPath;
path += "_" + std::to_string(id);
+ auto dhcpEnabled = getDHCPValue(manager.getConfDir().string(),
+ vlanInterfaceName);
+
auto vlanIntf = std::make_unique<phosphor::network::VlanInterface>(
bus,
path.c_str(),
- EthernetInterfaceIntf::dHCPEnabled(),
+ dhcpEnabled,
id,
*this,
manager);
@@ -401,10 +403,14 @@ void EthernetInterface::createVLAN(VlanId id)
// write the device file for the vlan interface.
vlanIntf->writeDeviceFile();
- this->vlanInterfaces.emplace(std::move(vlanInterfaceName),
+ this->vlanInterfaces.emplace(vlanInterfaceName,
std::move(vlanIntf));
// write the new vlan device entry to the configuration(network) file.
writeConfigurationFile();
+
+ // Create the dbus object for the link local ipv6 address.
+ vlanInterfaces[vlanInterfaceName]->createIPAddressObjects();
+
}
// Need to merge the below function with the code which writes the
OpenPOWER on IntegriCloud