Commit 3edb4418 authored by jan.koester's avatar jan.koester
Browse files

test

parent 7c340ab8
Loading
Loading
Loading
Loading
+4 −1
Changes for src/syslite.cpp: 4 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -481,7 +481,10 @@ namespace syslite {
            if (call.has("set_dns")) cfg.dns = call.getAll("dns");
            if (cfg.matchName.empty())
                return Message::error(call, err::InvalidArgs, "a configuration needs a match (interface name or pattern)");
            if (!cfg.dhcp && cfg.address.empty() && cfg.bond.empty() && cfg.bridge.empty() && cfg.vlans.empty())
            // without addresses only what carries others: a VLAN parent, a
            // bond/bridge/VLAN (layer 2 only, e.g. for containers)
            if (!cfg.dhcp && cfg.address.empty() && cfg.bond.empty() && cfg.bridge.empty() && cfg.vlans.empty() &&
                !_network.findNetDev(cfg.matchName))
                return Message::error(call, err::InvalidArgs, "a configuration without DHCP needs an address");
            return done(_network.saveConfig(cfg, &why), {});
        }