mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-07 19:34:56 +00:00
nic_bridge: fix reading of 'mac' attribute
Read as full MAC address and not as decimal uint8_t. Issue #2837
This commit is contained in:
parent
342bdaf4a2
commit
cee0c86c3c
@ -155,3 +155,13 @@ Session_component::~Session_component() {
|
||||
vlan().mac_list.remove(&_mac_node);
|
||||
_unset_ipv4_node();
|
||||
}
|
||||
|
||||
|
||||
Net::Root::Root(Genode::Env &env, Net::Nic &nic, Genode::Allocator &md_alloc,
|
||||
Genode::Xml_node config)
|
||||
:
|
||||
Genode::Root_component<Session_component>(env.ep(), md_alloc),
|
||||
_mac_alloc(Mac_address(config.attribute_value("mac", Mac_address(DEFAULT_MAC)))),
|
||||
_env(env),
|
||||
_nic(nic),
|
||||
_config(config) { }
|
||||
|
@ -245,10 +245,7 @@ class Net::Root : public Genode::Root_component<Net::Session_component>
|
||||
public:
|
||||
|
||||
Root(Genode::Env &env, Net::Nic &nic, Genode::Allocator &md_alloc,
|
||||
Genode::Xml_node config)
|
||||
: Genode::Root_component<Session_component>(env.ep(), md_alloc),
|
||||
_mac_alloc(Mac_address(config.attribute_value("mac", (Genode::uint8_t)DEFAULT_MAC))),
|
||||
_env(env), _nic(nic), _config(config) { }
|
||||
Genode::Xml_node config);
|
||||
};
|
||||
|
||||
#endif /* _COMPONENT_H_ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user