make fixed ip6 addresses optional
This commit is contained in:
parent
f3ccb0f9d8
commit
9a79f32004
6
tinc-up
6
tinc-up
@ -36,6 +36,8 @@ SUBNET=""
|
|||||||
DHCP="yes"
|
DHCP="yes"
|
||||||
ULA_IP6_TEMPLATE="fdc0:4992:6a6d:a:%x%x:%x%x::1"
|
ULA_IP6_TEMPLATE="fdc0:4992:6a6d:a:%x%x:%x%x::1"
|
||||||
PUBLIC_IP6_TEMPLATE="2a01:4f8:210:31fd:2:%x%x:%x%x:1"
|
PUBLIC_IP6_TEMPLATE="2a01:4f8:210:31fd:2:%x%x:%x%x:1"
|
||||||
|
PUBLIC_IP6=YES
|
||||||
|
ULA_IP6=YES
|
||||||
|
|
||||||
source "${TINCRC}" || true
|
source "${TINCRC}" || true
|
||||||
|
|
||||||
@ -48,8 +50,8 @@ fi
|
|||||||
set_mac "$INTERFACE" "$MAC_ADDRESS"
|
set_mac "$INTERFACE" "$MAC_ADDRESS"
|
||||||
public_ip6="$(format_ip6_from_mac $PUBLIC_IP6_TEMPLATE $MAC_ADDRESS)"
|
public_ip6="$(format_ip6_from_mac $PUBLIC_IP6_TEMPLATE $MAC_ADDRESS)"
|
||||||
ula_ip6="$(format_ip6_from_mac $ULA_IP6_TEMPLATE $MAC_ADDRESS)"
|
ula_ip6="$(format_ip6_from_mac $ULA_IP6_TEMPLATE $MAC_ADDRESS)"
|
||||||
add_ip6 "$INTERFACE" "$public_ip6" "80"
|
[[ "$PUBLIC_IP6" == "YES" ]] && add_ip6 "$INTERFACE" "$public_ip6" "80"
|
||||||
add_ip6 "$INTERFACE" "$ula_ip6" "64"
|
[[ "$ULA_IP6" == "YES" ]] && add_ip6 "$INTERFACE" "$ula_ip6" "64"
|
||||||
|
|
||||||
if [ -n "$SUBNET" ]; then
|
if [ -n "$SUBNET" ]; then
|
||||||
IFS=' ' read ip netmask <<< "$SUBNET"
|
IFS=' ' read ip netmask <<< "$SUBNET"
|
||||||
|
Loading…
Reference in New Issue
Block a user