sculpt_manager: relax nic_drv policy label

When using the newer genode_c_api uplink library, an uplink connection uses
the device name as label, which enables integrators to use different policies
resp. routes for different devices driven by one driver. The nic_drv policy
of the nic_roouter configuration generated by the sculpt_manager however uses
an empty label like: "nic_drv -> ". This is the way how existent NIC drivers,
like ipxe_nic_drv requested their uplink session. To support both driver
variants this commit relaxes the policy by checking for a prefix only.

Ref genodelabs/genode#4660
This commit is contained in:
Stefan Kalkowski 2022-11-02 10:35:04 +01:00 committed by Christian Helmuth
parent 3b06a27465
commit bb067f529b

View File

@ -19,7 +19,7 @@ void Sculpt::Network::_generate_nic_router_uplink(Xml_generator &xml,
char const *label)
{
xml.node("policy", [&] () {
xml.attribute("label", label);
xml.attribute("label_prefix", label);
xml.attribute("domain", "uplink");
});
gen_named_node(xml, "domain", "uplink", [&] () {