Update some ipaddr filters
This commit is contained in:
parent
c4ed75ed36
commit
ea08c856ac
5 changed files with 8 additions and 8 deletions
|
@ -11,5 +11,5 @@ iface {{ item.key }} inet tunnel
|
||||||
mtu 1400
|
mtu 1400
|
||||||
tunnel-physdev {{ ansible_default_ipv4.interface }}
|
tunnel-physdev {{ ansible_default_ipv4.interface }}
|
||||||
|
|
||||||
address {{ item.value.tunnel_ipv4_network | ipaddr('net') | ipaddr('1') | ipaddr('address') }}/{{ item.value.tunnel_ipv4_network | ipaddr('net') | ipaddr('prefix') }}
|
address {{ item.value.tunnel_ipv4_network | ipaddr('net') | ipaddr('1') | ipaddr('ip/prefix') }}
|
||||||
address {{ item.value.tunnel_ipv6_network | ipaddr('net') | ipaddr('2') | ipaddr('address') }}/{{ item.value.tunnel_ipv6_network | ipaddr('net') | ipaddr('prefix') }}
|
address {{ item.value.tunnel_ipv6_network | ipaddr('net') | ipaddr('2') | ipaddr('ip/prefix') }}
|
||||||
|
|
|
@ -4,4 +4,4 @@
|
||||||
auto ffrl-nat
|
auto ffrl-nat
|
||||||
iface ffrl-nat
|
iface ffrl-nat
|
||||||
link-type dummy
|
link-type dummy
|
||||||
address {{ ffrl_public_ipv4_nat | ipaddr('address') }}/{{ ffrl_public_ipv4_nat | ipaddr('prefix') }}
|
address {{ ffrl_public_ipv4_nat | ipaddr('host') }}
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
auto {{ item.key }}BR
|
auto {{ item.key }}BR
|
||||||
iface {{ item.key }}BR
|
iface {{ item.key }}BR
|
||||||
hwaddress {{ mac | hwaddr('linux') }}
|
hwaddress {{ mac | hwaddr('linux') }}
|
||||||
address {{ item.value.ipv4_network | ipaddr('net') | ipaddr(magic) | ipaddr('address') }}/{{ item.value.ipv4_network | ipaddr('net') | ipaddr('prefix') }}
|
address {{ item.value.ipv4_network | ipaddr('net') | ipaddr(magic) | ipaddr('ip/prefix') }}
|
||||||
{% for ip_type, ip_list in item.value.ipv6.iteritems() %}
|
{% for ip_type, ip_list in item.value.ipv6.iteritems() %}
|
||||||
{% for ip in ip_list %}
|
{% for ip in ip_list %}
|
||||||
address {{ ip | ipaddr('net') | ipsubnet(64, 0) | ipaddr(magic) | ipaddr('address') }}/{{ ip | ipaddr('net') | ipsubnet(64, 0) | ipaddr('prefix') }}
|
address {{ ip | ipaddr('net') | ipsubnet(64, 0) | ipaddr(magic) | ipaddr('ip/prefix') }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
bridge-ports {{ item.key }}BAT
|
bridge-ports {{ item.key }}BAT
|
||||||
|
|
|
@ -12,7 +12,7 @@ table ffrl;
|
||||||
# Functions
|
# Functions
|
||||||
function is_ffrl_nat() {
|
function is_ffrl_nat() {
|
||||||
return net ~ [
|
return net ~ [
|
||||||
{{ ffrl_public_ipv4_nat | ipaddr('address') }}/{{ ffrl_public_ipv4_nat | ipaddr('prefix') }}
|
{{ ffrl_public_ipv4_nat | ipaddr('host') }}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,8 +64,8 @@ ip -6 rule add to {{ public }} lookup internet priority 41
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
ip -6 rule add from all oif {{ mesh_id }}BR lookup internet priority 41
|
ip -6 rule add from all oif {{ mesh_id }}BR lookup internet priority 41
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
ip -4 rule add from {{ ffrl_public_ipv4_nat | ipaddr('address') }}/{{ ffrl_public_ipv4_nat | ipaddr('prefix') }} lookup internet priority 41
|
ip -4 rule add from {{ ffrl_public_ipv4_nat | ipaddr('host') }} lookup internet priority 41
|
||||||
ip -4 rule add to {{ ffrl_public_ipv4_nat | ipaddr('address') }}/{{ ffrl_public_ipv4_nat | ipaddr('prefix') }} lookup internet priority 41
|
ip -4 rule add to {{ ffrl_public_ipv4_nat | ipaddr('host') }} lookup internet priority 41
|
||||||
|
|
||||||
# Priority 61 - at this point this is the end of policy routing for freifunk related routes
|
# Priority 61 - at this point this is the end of policy routing for freifunk related routes
|
||||||
{% for mesh_id, mesh_value in meshes.iteritems() %}
|
{% for mesh_id, mesh_value in meshes.iteritems() %}
|
||||||
|
|
Loading…
Reference in a new issue