mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-28 11:18:11 +00:00
Merge branch 'master' into 2.0
This commit is contained in:
commit
66a789672d
@ -22,6 +22,7 @@ order to run a VPCS VM.
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import socket
|
||||||
import subprocess
|
import subprocess
|
||||||
import signal
|
import signal
|
||||||
import re
|
import re
|
||||||
@ -534,7 +535,10 @@ class VPCSVM(BaseNode):
|
|||||||
# UDP tunnel
|
# UDP tunnel
|
||||||
command.extend(["-s", str(nio.lport)]) # source UDP port
|
command.extend(["-s", str(nio.lport)]) # source UDP port
|
||||||
command.extend(["-c", str(nio.rport)]) # destination UDP port
|
command.extend(["-c", str(nio.rport)]) # destination UDP port
|
||||||
command.extend(["-t", nio.rhost]) # destination host
|
try:
|
||||||
|
command.extend(["-t", socket.gethostbyname(nio.rhost)]) # destination host, we need to resolve the hostname because VPCS doesn't support it
|
||||||
|
except socket.gaierror as e:
|
||||||
|
raise VPCSError("Can't resolve hostname {}".format(nio.rhost))
|
||||||
|
|
||||||
elif isinstance(nio, NIOTAP):
|
elif isinstance(nio, NIOTAP):
|
||||||
# FIXME: remove old code
|
# FIXME: remove old code
|
||||||
|
Loading…
Reference in New Issue
Block a user