Logo Search packages:      
Sourcecode: ufw version File versions

def src::common::UFWRule::_fix_anywhere (   self  )  [private]

Adjusts src and dst based on v6

Definition at line 210 of file common.py.

00210                            :
        '''Adjusts src and dst based on v6'''
        if self.v6:
            if self.dst and (self.dst == "any" or self.dst == "0.0.0.0/0"):
                self.dst = "::/0"
            if self.src and (self.src == "any" or self.src == "0.0.0.0/0"):
                self.src = "::/0"
        else:
            if self.dst and (self.dst == "any" or self.dst == "::/0"):
                self.dst = "0.0.0.0/0"
            if self.src and (self.src == "any" or self.src == "::/0"):
                self.src = "0.0.0.0/0"

    def set_v6(self, v6):


Generated by  Doxygen 1.6.0   Back to index