Skip to content
Snippets Groups Projects
Commit 9a8383b6 authored by NGUYEN Do Duc Anh's avatar NGUYEN Do Duc Anh
Browse files

avoid generate traffic from attacker index

parent 6b01387a
Branches
Tags
No related merge requests found
......@@ -35,7 +35,7 @@ file_path = "/home/osboxes/D-ITG-2.8.1-r1023-src/D-ITG-2.8.1-r1023/bin/commands.
def generate_and_send_traffic_matrix():
global map_point, traffic_matrix, f, A, p_NAT, num_machine, P_values, PROTO, TIME_GENERATE
global map_point, traffic_matrix, f, A, p_NAT, num_machine, P_values, PROTO, TIME_GENERATE, ATTACKER_INDEX
listen_port_map = {}
point_ips = sorted(map_point.keys(), key=lambda ip_term: tuple(map(int, ip_term.split('.'))))
......@@ -48,7 +48,7 @@ def generate_and_send_traffic_matrix():
for j in range(len(point_ips)):
point_ip_recv = point_ips[j]
# TODO: HARDCODE the attacker do not generate or receive traffic
if i == 0 or j == 0 or point_ip_send == point_ip_recv:
if i == ATTACKER_INDEX or j == ATTACKER_INDEX or point_ip_send == point_ip_recv:
mean_rate = 0
elif not A:
mean_rate = 1000
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment