Skip to content

Commit

Permalink
Merge a823e79 into ccafe47
Browse files Browse the repository at this point in the history
  • Loading branch information
bartvanb committed Jan 16, 2024
2 parents ccafe47 + a823e79 commit 2d2071c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vantage6-node/vantage6/node/docker/vpn_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,9 @@ def _forward_traffic_to_algorithm(

occupied_ports = occupied_ports.output.decode('utf-8')
occupied_ports = occupied_ports.split('\n')
occupied_ports = \
[int(port) for port in occupied_ports if port != '']
occupied_ports = list(set([
int(port) for port in occupied_ports if port.lstrip('-').isdigit()
]))
self.log.debug(f"Occupied ports: {occupied_ports}")

# take first available port
Expand Down

0 comments on commit 2d2071c

Please sign in to comment.