Skip to content

Commit 6b5b578

Browse files
authored
Fix the issue introduced when handle the 2 PRs sonic-net#16948 and sonic-net#16970 (sonic-net#17543)
1 parent d3a0174 commit 6b5b578

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/common/fixtures/ptfhost_utils.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -210,15 +210,16 @@ def setup_vlan_arp_responder(ptfhost, rand_selected_dut, tbinfo):
210210
if 'dualtor' in tbinfo['topo']['name']:
211211
server_ip = mux_cable_server_ip(rand_selected_dut)
212212

213+
ip_offset = 0
213214
for port in vlan_members:
214215
ptf_index = dut_to_ptf_port_map[port]
216+
ip_offset = ptf_index + 1 # Add one since PTF indices start at 0
215217
if 'dualtor' in tbinfo['topo']['name']:
216218
arp_responder_cfg['eth{}'.format(ptf_index)] = [
217219
server_ip[port]['server_ipv4'].split('/')[0],
218220
server_ip[port]['server_ipv6'].split('/')[0]
219221
]
220222
continue
221-
ip_offset = ptf_index + 1 # Add one since PTF indices start at 0
222223
arp_responder_cfg['eth{}'.format(ptf_index)] = [
223224
str(ipv4_base.ip + ip_offset), str(ipv6_base.ip + ip_offset)
224225
]

0 commit comments

Comments
 (0)