Changeset - adb80c4c58a5
[Not reviewed]
default
0 1 0
Branko Majic (branko) - 11 years ago 2013-06-23 22:50:26
branko@majic.rs
Fixed the checking and rendering of protocol in a rule.
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
conntrackt/iptables.py
Show inline comments
 
@@ -31,12 +31,12 @@ class Rule(object):
 
        produce comments in the output.
 
        """
 

	
 
        if protocol not in ("TCP", "UDP", "ICMP"):
 
        if protocol.upper() not in ("TCP", "UDP", "ICMP"):
 
            raise ValueError("Unsupported protocol specified: %s" % protocol)
 

	
 
        self.source = source
 
        self.destination = destination
 
        self.protocol = protocol
 
        self.protocol = protocol.lower()
 
        self.port = port
 
        self.description = description
 

	
0 comments (0 inline, 0 general)