Skip to content

Commit

Permalink
Merge pull request #12 from lluki/master
Browse files Browse the repository at this point in the history
l3 assignment strategy: Support multiple unnamed hosts per switch
  • Loading branch information
jurijnota authored Sep 9, 2021
2 parents e6090d9 + 9a6c067 commit 46771e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion p4utils/mininetlib/apptopo.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ def l3_assignment_strategy(self):
if self.is_host_link(link):
host_name = link[self.get_host_position(link)]
if self.check_host_valid_ip_from_name(host_name):

direct_sw = link[self.get_sw_position(link)]
sw_id = sw_to_id[direct_sw]
host_num = int(host_name[1:])
Expand Down Expand Up @@ -322,6 +321,7 @@ def l3_assignment_strategy(self):
while ("10.%d.%d.2" % (sw_id, host_num)) in self.reserved_ips.values():
host_num +=1
assert host_num < 254
sw_to_next_available_host_id[direct_sw] = host_num + 1
host_ip = "10.%d.%d.2" % (sw_id, host_num)
host_gw = "10.%d.%d.1" % (sw_id, host_num)

Expand Down

0 comments on commit 46771e9

Please sign in to comment.