diff options
-rw-r--r-- | ethernet_interface.cpp | 12 | ||||
-rw-r--r-- | network_manager.cpp | 2 | ||||
-rw-r--r-- | vlan_interface.cpp | 1 |
3 files changed, 11 insertions, 4 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 diff --git a/network_manager.cpp b/network_manager.cpp index 3916dfb..dd9a319 100644 --- a/network_manager.cpp +++ b/network_manager.cpp @@ -77,7 +77,7 @@ void Manager::createInterfaces() uint32_t vlanInt = std::stoul(vlanid); interfaces[interface]->loadVLAN(vlanInt); - return; + continue; } // normal ethernet inetrface objPath /= intfInfo.first; diff --git a/vlan_interface.cpp b/vlan_interface.cpp index 88e3c10..acf66db 100644 --- a/vlan_interface.cpp +++ b/vlan_interface.cpp @@ -32,6 +32,7 @@ VlanInterface::VlanInterface(sdbusplus::bus::bus& bus, { id(vlanID); VlanIface::interfaceName(EthernetInterface::interfaceName()); + mACAddress(parentInterface.mACAddress()); Interfaces::emit_object_added(); } |