diff options
author | Michael Tritz <mtritz@us.ibm.com> | 2017-10-16 14:59:09 -0500 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2017-10-25 23:25:47 +0000 |
commit | 08c34f4b17c06e6d7e4d411221e37b91b97774cc (patch) | |
tree | 07730d8513bc5b4ba59c93f55a99c1e3a8c2df52 | |
parent | 3d4c5ed38461a326d0da340d4e854fe0e105c0e5 (diff) | |
download | phosphor-networkd-08c34f4b17c06e6d7e4d411221e37b91b97774cc.tar.gz phosphor-networkd-08c34f4b17c06e6d7e4d411221e37b91b97774cc.zip |
Network factory reset: don't recreate VLAN interfaces
This commit fixes a defect with the network factory reset. When VLANs
are created on a particular interface and that interface is reset, the
VLANs should disappear. They weren't disappearing; they were being
deleted and recreated during the reset process. This commit stops the
VLAN interfaces from being recreated.
Resolves openbmc/openbmc#2478
Change-Id: I46dd0183185cc57f3dd8680cf1ac8404c9fd316a
Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
-rw-r--r-- | network_manager.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/network_manager.cpp b/network_manager.cpp index e9d8ad9..4990ee0 100644 --- a/network_manager.cpp +++ b/network_manager.cpp @@ -64,6 +64,13 @@ bool Manager::createDefaultNetworkFiles(bool force) auto interfaceStrList = getInterfaces(); for (const auto& interface : interfaceStrList) { + // if the interface has '.' in the name, it means that this is a + // VLAN - don't create the network file. + if (interface.find(".") != std::string::npos) + { + continue; + } + auto fileName = systemd::config::networkFilePrefix + interface + systemd::config::networkFileSuffix; |