From 81b6c808a8f41baee532c9bcae53bffd081dbe64 Mon Sep 17 00:00:00 2001 From: Tilmann Date: Tue, 8 Oct 2024 16:17:14 +0200 Subject: [PATCH] tools: topofile parser 16bit IF-ID limit Change the limit for interface IDs in topofiles from 12bit to 16bit. --- tools/topology/topo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/topology/topo.py b/tools/topology/topo.py index 9fb39e7ce0..2efbd2acb9 100644 --- a/tools/topology/topo.py +++ b/tools/topology/topo.py @@ -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) @@ -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)