mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix local port regex in listen_ports_facts (#4092)
* Fix local port regex Thsi PR fix the bug reported in #4091 * Update changelogs/fragments/4092-fix_local_ports_regex_listen_ports_facts.yaml Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
929136808f
commit
6a7811f696
2 changed files with 3 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- listen_ports_facts - local port regex was not handling well IPv6 only binding. Fixes the regex for ``ss`` (https://github.com/ansible-collections/community.general/pull/4092).
|
|
@ -197,7 +197,7 @@ def netStatParse(raw):
|
|||
|
||||
def ss_parse(raw):
|
||||
results = list()
|
||||
regex_conns = re.compile(pattern=r'\[?(.+?)\]?:([0-9]+)')
|
||||
regex_conns = re.compile(pattern=r'\[?(.+?)\]?:([0-9]+)$')
|
||||
regex_pid = re.compile(pattern=r'"(.*?)",pid=(\d+)')
|
||||
|
||||
lines = raw.splitlines()
|
||||
|
|
Loading…
Reference in a new issue