Skip to content

Commit

Permalink
Remove possibly unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
winterhazel committed Oct 22, 2024
1 parent 8e4e542 commit fcc514d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions systemvm/debian/opt/cloud/bin/cs/CsNetfilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ def to_str(self, delete=False):
""" Convert the rule back into syntactically correct iptables command """
# Order is important
order = ['-A', '-s', '-d', '!_-d', '-i', '!_-i', '-p', '-m', '-m2', '--icmp-type', '--state',
'--dport', '--destination-port', '-o', '!_-o', '-j', '--save-mark', '--set-xmark', '--checksum',
'--dport', '--destination-port', '-o', '!_-o', '-j', '--set-xmark', '--checksum',
'--to-source', '--to-destination', '--mark']
str = ''
for k in order:
Expand All @@ -391,9 +391,6 @@ def to_str(self, delete=False):
printable = printable.replace('!_-', '! -')
if delete:
printable = printable.replace('-A', '-D')
if k == "--save-mark":
str = "%s %s" % (str, printable)
continue
if str == '':
str = "%s %s" % (printable, self.rule[k])
else:
Expand Down

0 comments on commit fcc514d

Please sign in to comment.