Skip to content

Commit c141c09

Browse files
authored
[202405]Fix test_cacl_application for latest change in caclmgrd (#13900)
What is the motivation for this PR? Fix PR test failure in sonic-net/sonic-buildimage#19732 How did you do it? modify expected iptable rules in test_cacl_application case due to image change. skip cacl/test_cacl_application.py for 202405 branch temporarily Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com>
1 parent b1b824c commit c141c09

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

tests/cacl/test_cacl_application.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,8 +592,13 @@ def generate_expected_rules(duthost, tbinfo, docker_network, asic_index, expecte
592592
generate_and_append_block_ip2me_traffic_rules(duthost, iptables_rules, ip6tables_rules, asic_index)
593593

594594
# Allow all packets with a TTL/hop limit of 0 or 1
595-
iptables_rules.append("-A INPUT -m ttl --ttl-lt 2 -j ACCEPT")
596-
ip6tables_rules.append("-A INPUT -p tcp -m hl --hl-lt 2 -j ACCEPT")
595+
iptables_rules.append("-A INPUT -p icmp -m ttl --ttl-lt 2 -j ACCEPT")
596+
iptables_rules.append("-A INPUT -p udp -m ttl --ttl-lt 2 -m udp --dport 1025:65535 -j ACCEPT")
597+
iptables_rules.append("-A INPUT -p tcp -m ttl --ttl-lt 2 -m tcp --dport 1025:65535 -j ACCEPT")
598+
599+
ip6tables_rules.append("-A INPUT -p ipv6-icmp -m hl --hl-lt 2 -j ACCEPT")
600+
ip6tables_rules.append("-A INPUT -p udp -m hl --hl-lt 2 -m udp --dport 1025:65535 -j ACCEPT")
601+
ip6tables_rules.append("-A INPUT -p tcp -m hl --hl-lt 2 -m tcp --dport 1025:65535 -j ACCEPT")
597602

598603
# If we have added rules from the device config, we lastly add default drop rules
599604
if rules_applied_from_config > 0:

tests/common/plugins/conditional_mark/tests_mark_conditions.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,12 @@ bgp/test_traffic_shift.py::test_load_minigraph_with_traffic_shift_away:
167167
#######################################
168168
##### cacl #####
169169
#######################################
170+
cacl/test_cacl_application.py:
171+
skip:
172+
reason: "Skip test_cacl_application temporarily due to known issue"
173+
conditions:
174+
- https://github.com/sonic-net/sonic-mgmt/issues/13805
175+
170176
cacl/test_cacl_application.py::test_cacl_application_dualtor:
171177
skip:
172178
reason: "test_cacl_application_dualtor is only supported on dualtor topology"

0 commit comments

Comments
 (0)