mirror of
https://github.com/optim-enterprises-bv/nDPId.git
synced 2025-10-29 09:22:23 +00:00
Added IPv6 support for -I / -E.
* added another Python search path and try-catch ModuleNotFoundError again * run_tests.sh checks for OpenBSD netcat (required for -q) Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
4
dependencies/nDPIsrvd.py
vendored
4
dependencies/nDPIsrvd.py
vendored
@@ -349,12 +349,14 @@ def defaultArgumentParser():
|
||||
return parser
|
||||
|
||||
def validateAddress(args):
|
||||
tcp_addr_set = False
|
||||
address = None
|
||||
|
||||
if args.host is None:
|
||||
address_tcpip = (DEFAULT_HOST, DEFAULT_PORT)
|
||||
else:
|
||||
address_tcpip = (args.host, args.port)
|
||||
tcp_addr_set = True
|
||||
|
||||
if args.unix is None:
|
||||
address_unix = DEFAULT_UNIX
|
||||
@@ -366,7 +368,7 @@ def validateAddress(args):
|
||||
possible_sock_mode = os.stat(address_unix).st_mode
|
||||
except:
|
||||
pass
|
||||
if stat.S_ISSOCK(possible_sock_mode):
|
||||
if tcp_addr_set == False and stat.S_ISSOCK(possible_sock_mode):
|
||||
address = address_unix
|
||||
else:
|
||||
address = address_tcpip
|
||||
|
||||
Reference in New Issue
Block a user