diff options
Diffstat (limited to 'module/ri-wireguard/src/main/resources/io/trygvis')
-rw-r--r-- | module/ri-wireguard/src/main/resources/io/trygvis/rules/wireguard/wireguard.drl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/module/ri-wireguard/src/main/resources/io/trygvis/rules/wireguard/wireguard.drl b/module/ri-wireguard/src/main/resources/io/trygvis/rules/wireguard/wireguard.drl index 425b6ca..1c7d251 100644 --- a/module/ri-wireguard/src/main/resources/io/trygvis/rules/wireguard/wireguard.drl +++ b/module/ri-wireguard/src/main/resources/io/trygvis/rules/wireguard/wireguard.drl @@ -15,6 +15,7 @@ dialect "mvel" declare WgNet name : String domain : String + port : int linkCidr : String networkCidr : String networkBits : int @@ -30,6 +31,7 @@ declare WgHost machine : Machine net : WgNet publicName : String + publicPort : int ip : String // This host's IP networkCidr : String end @@ -65,6 +67,7 @@ then wgHost.machine = $machine; wgHost.net = $wgNet; wgHost.publicName = $machine.fqdn; + wgHost.publicPort = $wgNet.port; insert(wgHost) end @@ -167,7 +170,7 @@ rule "Generate per-net, per-host files" when $net : WgNet() $host : WgHost(net == $net) - $peers : ArrayList() from accumulate(WgConnection(host == $host, $to: to), collectList($to.machine)) + $peers : ArrayList() from accumulate(WgConnection(host == $host, $to: to), collectList($to)) then System.out.printf("Generating per-host files: net=%s, host=%s%n", $net.name, $host.machine.name); |