Skip to content

Commit

Permalink
tools: support 16bit interface IDs in topo files (#4636)
Browse files Browse the repository at this point in the history
Change the limit for interface IDs in topofiles from 12bit to 16bit.
  • Loading branch information
tzaeschke authored Oct 10, 2024
1 parent eef5cf7 commit 7956be9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/topology/topo.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ def __init__(self):

def new(self):
while True:
ifid = random.randrange(1, 4096)
ifid = random.randrange(1, 65536)
if ifid in self._ifids:
continue
self.add(ifid)
Expand All @@ -418,7 +418,7 @@ def add(self, ifid):
if ifid in self._ifids:
logging.critical("IFID %d already exists!" % ifid)
exit(1)
if ifid < 1 or ifid > 4095:
if ifid < 1 or ifid > 65535:
logging.critical("IFID %d is invalid!" % ifid)
exit(1)
self._ifids.add(ifid)
Expand Down

0 comments on commit 7956be9

Please sign in to comment.