Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ansible qos_sai failure on 201911/master image #1810

Merged
merged 1 commit into from
Jun 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ansible/roles/test/tasks/qos_sai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@
supervisorctl: state=stopped name=bgpd
delegate_to: "{{ ansible_host }}_bgp"

- name: Add iptables rule to drop BGP SYN Packet from peer so that we do not ACK back
shell: "iptables -A INPUT -j DROP -p tcp --destination-port bgp"
- name: Add iptables rule to drop BGP SYN Packet from peer so that we do not ACK back. Add at top so existing rules don't have precedence over it.
shell: "iptables -I INPUT 1 -j DROP -p tcp --destination-port bgp"
tahmed-dev marked this conversation as resolved.
Show resolved Hide resolved
become: true

- name: Add ip6tables rule to drop BGP SYN Packet from peer so that we do not ACK back
shell: "ip6tables -A INPUT -j DROP -p tcp --destination-port bgp"
- name: Add ip6tables rule to drop BGP SYN Packet from peer so that we do not ACK back. Add at top so existing rules don't have precedence over it.
shell: "ip6tables -I INPUT 1 -j DROP -p tcp --destination-port bgp"
become: true

- meta: flush_handlers
Expand Down
4 changes: 3 additions & 1 deletion tests/qos/qos_sai_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,14 +377,16 @@ def updateIptables(self, duthost, swapSyncd):
def updateIptablesDropRule(duthost, ipVersion, state='present'):
duthost.iptables(
ip_version=ipVersion,
action="Append",
action="insert",
rule_num="1",
chain="INPUT",
jump="DROP",
protocol="tcp",
destination_port="bgp",
state=state
)


ipVersions = [{"ipVersion": "ipv4"}, {"ipVersion": "ipv6"}]

logger.info("Add ip[6]tables rule to drop BGP SYN Packet from peer so that we do not ACK back")
Expand Down