TCPMonitor does not handle IPv6 connections correctly

Bug #1070695 reported by Frank Steinberg
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
powernap
Fix Released
Undecided
Andres Rodriguez

Bug Description

--- TCPMonitor.py.orig 2011-12-01 18:43:12.000000000 +0100
+++ TCPMonitor.py 2012-10-24 08:55:07.241025610 +0200
@@ -38,11 +38,11 @@
        port_start = int(config['port'].split("-")[0].strip())
        port_end = int(config['port'].split("-")[-1].strip()) + 1 # Add one to use correctly in range
        for port in range(port_start, port_end):
- self._regexes.append(re.compile("^tcp\W.*:%s\W.*ESTABLISHED$" % port))
+ self._regexes.append(re.compile("^tcp.*\W.*:%s\W.*ESTABLISHED$" % port))

    # Check for connections
    def active(self):
- ps = commands.getoutput("netstat -nt").splitlines()
+ ps = commands.getoutput("netstat -Wnt").splitlines()
        if find_connection(ps, self._regexes):
  return True
 return False

Changed in powernap:
assignee: nobody → Andres Rodriguez (andreserl)
Changed in powernap:
status: New → Fix Committed
Changed in powernap:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.