genode/repos/os/recipes/pkg/nic_router-nat/runtime
Martin Stein 49a3a0e0d0 nic_router: multiple uplinks
Introduce the uplink tag:

! <config>
!    <uplink label="wifi"  domain="uplink">
!    <uplink label="wired" domain="wired_bridge">
!    <uplink               domain="wired_bridge">
! <config/>

For each uplink tag, the NIC router requests a NIC session with the
corresponding label or an empty label if there is no label attribute.
These NIC sessions get attached to the domain that is set in their
uplink tag as soon as the domain appears. This means their lifetime is
not bound to the domain. Uplink NIC sessions can be safely moved from
one domain to another without being closed by reconfiguring the
corresponding domain attribute.

Attention: This may render previously valid NIC router configurations
useless. A domain named "uplink" doesn't automatically request a NIC
session anymore. To fix these configurations, just add

! <uplink domain="uplink"/>

or

! <uplink label="[LABEL]" domain="uplink"/>

as direct subtag of the <config> tag.

Issue #2840
2018-06-29 10:44:53 +02:00

31 lines
809 B
Plaintext
Executable File

<runtime ram="10M" caps="300" binary="nic_router">
<requires> <nic/> </requires>
<provides> <nic/> </provides>
<config verbose_domain_state="yes">
<default-policy domain="default" />
<uplink domain="uplink" />
<domain name="uplink">
<nat domain="default"
tcp-ports="1000"
udp-ports="1000"
icmp-ids="1000"/>
</domain>
<domain name="default" interface="10.0.1.1/24">
<dhcp-server ip_first="10.0.1.2"
ip_last="10.0.1.200"
dns_server_from="uplink"/>
<tcp dst="0.0.0.0/0"><permit-any domain="uplink"/></tcp>
<udp dst="0.0.0.0/0"><permit-any domain="uplink"/></udp>
<icmp dst="0.0.0.0/0" domain="uplink"/>
</domain>
</config>
<content>
<rom label="ld.lib.so"/>
<rom label="nic_router"/>
</content>
</runtime>