~ubuntu-branches/ubuntu/hardy/ufw/hardy-updates

« back to all changes in this revision

Viewing changes to src/ufw

  • Committer: Bazaar Package Importer
  • Author(s): Jamie Strandboge
  • Date: 2008-07-11 18:37:27 UTC
  • Revision ID: james.westby@ubuntu.com-20080711183727-l26fstr6mooy4rqp
Tags: 0.16.2.3
* fix confusing error output when ipv6 or ip6_tables is not available.
  (LP: #194844)
* fix initscript not setting default ipv6 policy when IPV6=no (LP: #251355)

Show diffs side-by-side

added added

removed removed

Lines of Context:
969
969
            if rc != 0:
970
970
                raise UFWError("problem running init script")
971
971
 
972
 
        # When ipv6 not enabled, just enable it on loopback
973
 
        if not self.use_ipv6() and os.path.exists("/proc/sys/net/ipv6"):
974
 
            ipv6conf = '''*filter
975
 
:INPUT DROP [0:0]
976
 
:FORWARD DROP [0:0]
977
 
:OUTPUT DROP [0:0]
978
 
 
979
 
-A INPUT -i lo -j ACCEPT
980
 
-A OUTPUT -o lo -j ACCEPT
981
 
 
982
 
COMMIT
983
 
'''
984
 
            if not dryrun:
985
 
                (rc, out) = cmd_pipe(['echo', ipv6conf], ['ip6tables-restore'])
986
 
                if rc != 0:
987
 
                    # Don't error here, as the user may have disabled ipv6
988
 
                    # and doesn't have ipv6 support
989
 
                    warn("problem running ip6tables")
990
 
 
991
972
    def _reload_user_rules(self):
992
973
        '''Reload firewall rules file'''
993
974
        if self.dryrun: