mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 17:50:20 +00:00
Use rsplit
Fixes exception thrown on ipv6 addresses ValueError: invalid literal for int() with base 10: ':ffff:1.2.3.4:5678'
This commit is contained in:
parent
60029398c6
commit
69fe65b550
1 changed files with 2 additions and 2 deletions
|
@ -1486,8 +1486,8 @@ def _netlink_tool_remote_on(port, which_end):
|
|||
elif 'ESTAB' not in line:
|
||||
continue
|
||||
chunks = line.split()
|
||||
local_host, local_port = chunks[3].split(':', 1)
|
||||
remote_host, remote_port = chunks[4].split(':', 1)
|
||||
local_host, local_port = chunks[3].rsplit(':', 1)
|
||||
remote_host, remote_port = chunks[4].rsplit(':', 1)
|
||||
|
||||
if which_end == 'remote_port' and int(remote_port) != port:
|
||||
continue
|
||||
|
|
Loading…
Add table
Reference in a new issue