mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-07 19:34:56 +00:00
nic_router.run: test DHCP server
Very basic test of the DHCP server functionality. Ref #2670
This commit is contained in:
parent
95005a0ae3
commit
b69134f1fe
@ -26,8 +26,16 @@ proc client_config { name prot ip_addr gateway netmask nic srv_port srv_ip } {
|
||||
</route>
|
||||
<config server_ip="} $srv_ip {" server_port="} $srv_port {">
|
||||
<vfs> <dir name="dev"> <log/> </dir> </vfs>
|
||||
}
|
||||
if {$ip_addr == "dhcp"} {
|
||||
append result {
|
||||
<libc stdout="/dev/log" stderr="/dev/log"/>}
|
||||
} else {
|
||||
append result {
|
||||
<libc stdout="/dev/log" stderr="/dev/log" ip_addr="} $ip_addr {"
|
||||
gateway="} $gateway {" netmask="} $netmask {"/>
|
||||
gateway="} $gateway {" netmask="} $netmask {"/>}
|
||||
}
|
||||
append result {
|
||||
</config>
|
||||
</start>}
|
||||
return $result
|
||||
|
@ -142,19 +142,25 @@ proc test_6_router_config { } {
|
||||
|
||||
proc test_7_config { } {
|
||||
if {[enable_test_7]} { return "
|
||||
[client_config lan_2_client_1 http 100.200.0.128 100.200.0.1 255.255.0.0 nic_router 2345 10.0.2.204]
|
||||
[client_config lan_2_client_2 http 100.200.0.64 100.200.0.1 255.255.0.0 nic_router 3456 10.0.2.240]
|
||||
[client_config lan_2_client_3 http 100.200.0.32 100.200.0.1 255.255.0.0 nic_router 3456 10.0.2.240]
|
||||
[server_config lan_3_server_1 http 10.0.2.204 10.0.2.1 255.255.255.0 nic_router 2345 ]
|
||||
[server_config lan_3_server_2 http 10.0.2.240 10.0.2.1 255.255.255.0 nic_router 3456 ]" }
|
||||
[client_config lan_2_client_1 http dhcp dhcp dhcp nic_router 2345 10.0.2.204]
|
||||
[client_config lan_2_client_2 http dhcp dhcp dhcp nic_router 3456 10.0.2.240]
|
||||
[client_config lan_2_client_3 http dhcp dhcp dhcp nic_router 3456 10.0.2.240]
|
||||
[server_config lan_3_server_1 http 10.0.2.204 10.0.2.1 255.255.255.0 nic_router 2345 ]
|
||||
[server_config lan_3_server_2 http 10.0.2.240 10.0.2.1 255.255.255.0 nic_router 3456 ]" }
|
||||
}
|
||||
|
||||
|
||||
proc test_7_router_config { } {
|
||||
if {[enable_test_7]} { return {
|
||||
<policy label_prefix="lan_2" domain="lan_2" />
|
||||
<policy label_prefix="lan_3" domain="lan_3" />
|
||||
|
||||
<domain name="lan_2" interface="100.200.0.1/24">
|
||||
<dhcp-server ip_first="100.200.0.32"
|
||||
ip_last="100.200.0.64"
|
||||
ip_lease_time_sec="3600"
|
||||
dns_server="8.8.8.8"/>
|
||||
|
||||
<tcp dst="10.0.0.0/16">
|
||||
<permit port="2345" domain="lan_3" />
|
||||
<permit port="3456" domain="lan_3" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user