File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed
Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ { lib , ... } :
2+ {
3+ name = "radvd" ;
4+
5+ defaults = {
6+ networking . interfaces . eth1 = {
7+ ipv4 . addresses = lib . mkForce [ ] ;
8+ ipv6 . addresses = lib . mkForce [ ] ;
9+ } ;
10+ } ;
11+
12+ nodes = {
13+ a = {
14+ boot . kernel . sysctl . "net.ipv6.conf.all.forwarding" = 1 ;
15+
16+ services . radvd = {
17+ enable = true ;
18+ config = ''
19+ interface eth1 {
20+ AdvSendAdvert on;
21+ prefix 2001:db8:bad:c0de::/64 {
22+ AdvOnLink on;
23+ AdvAutonomous on;
24+ };
25+ };
26+ '' ;
27+ } ;
28+ } ;
29+ b = { } ;
30+ } ;
31+
32+ testScript = ''
33+ start_all()
34+
35+ a.wait_for_unit("network.target")
36+ b.wait_for_unit("network.target")
37+
38+ a.wait_for_unit("radvd.service")
39+
40+ b.wait_until_succeeds("ip -6 a sh eth1 | grep 2001:db8:bad:c0de:")
41+
42+ # wait for ipv6 dad to finish (initial ! causes the exit status to be negated)
43+ b.wait_until_succeeds("! ip -6 a sh eth1 | grep tentative")
44+
45+ print(b.succeed("ip -6 address show eth1"))
46+ print(b.succeed("ip -6 route"))
47+ '' ;
48+ }
You can’t perform that action at this time.
0 commit comments