From 8c07d5968ff64826eb26afa95c38402c62199787 Mon Sep 17 00:00:00 2001 From: Longxiang Lyu Date: Fri, 7 Jun 2024 05:13:49 +0000 Subject: [PATCH] Keep both prefix and subnet decap term for vlan Signed-off-by: Longxiang Lyu --- dockers/docker-orchagent/ipinip.json.j2 | 6 ++---- .../py2/ipinip_subnet_decap_enable.json | 12 ++++++++++++ .../py3/ipinip_subnet_decap_enable.json | 12 ++++++++++++ 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/dockers/docker-orchagent/ipinip.json.j2 b/dockers/docker-orchagent/ipinip.json.j2 index bb659e302f90..478a19a8fe2b 100644 --- a/dockers/docker-orchagent/ipinip.json.j2 +++ b/dockers/docker-orchagent/ipinip.json.j2 @@ -52,10 +52,8 @@ {%- set ipv6_vlan_addresses = ipv6_vlan_addresses.append(prefix) %} {%- endif %} {% endfor %} -{% if not subnet_decap.enable %} - {%- set ipv4_addresses = ipv4_addresses + ipv4_vlan_addresses %} - {%- set ipv6_addresses = ipv6_addresses + ipv6_vlan_addresses %} -{% endif %} +{%- set ipv4_addresses = ipv4_addresses + ipv4_vlan_addresses %} +{%- set ipv6_addresses = ipv6_addresses + ipv6_vlan_addresses %} [ {% if ipv4_loopback_addresses %} {% if subnet_decap.enable %} diff --git a/src/sonic-config-engine/tests/sample_output/py2/ipinip_subnet_decap_enable.json b/src/sonic-config-engine/tests/sample_output/py2/ipinip_subnet_decap_enable.json index 64fbca482081..abcfa56eaea9 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/ipinip_subnet_decap_enable.json +++ b/src/sonic-config-engine/tests/sample_output/py2/ipinip_subnet_decap_enable.json @@ -73,6 +73,18 @@ }, "OP": "SET" }, + { + "TUNNEL_DECAP_TERM_TABLE:IPINIP_TUNNEL:192.168.0.1" : { + "term_type":"P2MP" + }, + "OP": "SET" + }, + { + "TUNNEL_DECAP_TERM_TABLE:IPINIP_TUNNEL:192.168.200.1" : { + "term_type":"P2MP" + }, + "OP": "SET" + }, { "TUNNEL_DECAP_TABLE:IPINIP_SUBNET_V6" : { "tunnel_type":"IPINIP", diff --git a/src/sonic-config-engine/tests/sample_output/py3/ipinip_subnet_decap_enable.json b/src/sonic-config-engine/tests/sample_output/py3/ipinip_subnet_decap_enable.json index 64fbca482081..abcfa56eaea9 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/ipinip_subnet_decap_enable.json +++ b/src/sonic-config-engine/tests/sample_output/py3/ipinip_subnet_decap_enable.json @@ -73,6 +73,18 @@ }, "OP": "SET" }, + { + "TUNNEL_DECAP_TERM_TABLE:IPINIP_TUNNEL:192.168.0.1" : { + "term_type":"P2MP" + }, + "OP": "SET" + }, + { + "TUNNEL_DECAP_TERM_TABLE:IPINIP_TUNNEL:192.168.200.1" : { + "term_type":"P2MP" + }, + "OP": "SET" + }, { "TUNNEL_DECAP_TABLE:IPINIP_SUBNET_V6" : { "tunnel_type":"IPINIP",