Loading src/network.cpp +5 −6 Changes for src/network.cpp: 5 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -508,12 +508,11 @@ void NetworkManager::configureInterface(const std::string &ifname, const Network // a bridge takes members as they are (up): it goes up first, so // the new port forwards at once (no STP: no listening/learning) setLinkUp(master); // a bond in a bridge: the bridge keeps the bond's MAC for good // (else it takes the lowest of its ports' and changes with them), // so switches and ARP caches see the same address as before std::error_code ec; if (std::filesystem::exists("/sys/class/net/" + ifname + "/bonding", ec) && readSysfs(master, "addr_assign_type") != "3" /* NET_ADDR_SET */) // the bridge keeps its first member's (or a bond's) MAC for good: // else it takes the lowest of its ports' and changes with them -- // with every container's veth that comes and goes -- and // switches and ARP caches lose the host for a while if (readSysfs(master, "addr_assign_type") != "3" /* NET_ADDR_SET */) setLinkAddress(master, readSysfs(ifname, "address")); if (!setMaster(ifname, master)) std::cerr << "[syslite/net] " << ifname << ": cannot add it to " << master << std::endl; Loading Loading
src/network.cpp +5 −6 Changes for src/network.cpp: 5 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -508,12 +508,11 @@ void NetworkManager::configureInterface(const std::string &ifname, const Network // a bridge takes members as they are (up): it goes up first, so // the new port forwards at once (no STP: no listening/learning) setLinkUp(master); // a bond in a bridge: the bridge keeps the bond's MAC for good // (else it takes the lowest of its ports' and changes with them), // so switches and ARP caches see the same address as before std::error_code ec; if (std::filesystem::exists("/sys/class/net/" + ifname + "/bonding", ec) && readSysfs(master, "addr_assign_type") != "3" /* NET_ADDR_SET */) // the bridge keeps its first member's (or a bond's) MAC for good: // else it takes the lowest of its ports' and changes with them -- // with every container's veth that comes and goes -- and // switches and ARP caches lose the host for a while if (readSysfs(master, "addr_assign_type") != "3" /* NET_ADDR_SET */) setLinkAddress(master, readSysfs(ifname, "address")); if (!setMaster(ifname, master)) std::cerr << "[syslite/net] " << ifname << ": cannot add it to " << master << std::endl; Loading