2017-09-30 13:03:32 -05:00
|
|
|
{# only IPv4 decapsulation is supported #}
|
|
|
|
{% set ipv4_loopback_addresses = [] %}
|
|
|
|
{% for (name, prefix) in LOOPBACK_INTERFACE %}
|
|
|
|
{%- if prefix | ipv4 %}
|
|
|
|
{%- set ipv4_loopback_addresses = ipv4_loopback_addresses.append(prefix) %}
|
|
|
|
{%- endif %}
|
|
|
|
{% endfor %}
|
2017-04-21 16:28:30 -05:00
|
|
|
[
|
|
|
|
{
|
|
|
|
"TUNNEL_DECAP_TABLE:IPINIP_TUNNEL" : {
|
|
|
|
"tunnel_type":"IPINIP",
|
2017-09-30 13:03:32 -05:00
|
|
|
"src_ip":"{{ ipv4_loopback_addresses | first | ip }}",
|
|
|
|
"dst_ip":"{% for prefix in ipv4_loopback_addresses %}{{ prefix | ip }}{% if not loop.last %},{% endif %}{% endfor %}",
|
2017-07-07 06:26:53 -05:00
|
|
|
{% if onie_switch_asic == "mlnx" %}
|
2017-04-21 16:28:30 -05:00
|
|
|
"dscp_mode":"uniform",
|
|
|
|
"ecn_mode":"standard",
|
|
|
|
{% else %}
|
|
|
|
"dscp_mode":"pipe",
|
|
|
|
"ecn_mode":"copy_from_outer",
|
|
|
|
{% endif %}
|
|
|
|
"ttl_mode":"pipe"
|
|
|
|
},
|
|
|
|
"OP": "SET"
|
|
|
|
}
|
|
|
|
]
|