some more magic to lookup the ip address for the bridged interface
This commit is contained in:
parent
3a8a08dd28
commit
e41cf10088
1 changed files with 9 additions and 2 deletions
|
@ -87,8 +87,15 @@ define tinc::vpn_net(
|
|||
}
|
||||
|
||||
if $tinc_internal_ip == 'absent' {
|
||||
$tinc_orig_ifaddr = "ipaddress_${tinc_internal_interface}"
|
||||
$real_tinc_internal_ip = inline_template("<%= scope.lookupvar(tinc_orig_ifaddr) %>")
|
||||
$tinc_br_ifaddr = "ipaddress_${real_tinc_bridge_interface}"
|
||||
$tinc_br_ip = inline_template("<%= scope.lookupvar(tinc_br_ifaddr) %>")
|
||||
case $tinc_br_ip {
|
||||
'',undef: {
|
||||
$tinc_orig_ifaddr = "ipaddress_${tinc_internal_interface}"
|
||||
$real_tinc_internal_ip = inline_template("<%= scope.lookupvar(tinc_orig_ifaddr) %>")
|
||||
}
|
||||
default: { $real_tinc_internal_ip = $tinc_br_ip }
|
||||
}
|
||||
} else {
|
||||
$real_tinc_internal_ip = $tinc_internal_ip
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue