diff options
author | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2018-10-29 09:57:12 +0200 |
---|---|---|
committer | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2019-02-02 19:55:31 +0200 |
commit | a58b2bc80e32c662ee90d7f813c997c05cbc9987 (patch) | |
tree | 1314aba3e90ea1bfc3570a8001233077725d59d6 /awall-cli | |
parent | 9c932a749e28eb8d68f14234f35c5fdbde02d124 (diff) | |
download | awall-a58b2bc80e32c662ee90d7f813c997c05cbc9987.tar.bz2 awall-a58b2bc80e32c662ee90d7f813c997c05cbc9987.tar.xz |
early detection of missing kernel support
Diffstat (limited to 'awall-cli')
-rwxr-xr-x | awall-cli | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -152,6 +152,7 @@ end uerror = require('awall.uerror') call = uerror.call +raise = uerror.raise if not call( function() @@ -194,7 +195,7 @@ if not call( repeat local name = arg[opind] local policy = policyset.policies[name] - if not policy then uerror.raise('No such policy: '..name) end + if not policy then raise('No such policy: '..name) end policy[mode](policy) opind = opind + 1 until opind > #arg @@ -320,6 +321,10 @@ if not call( elseif mode == 'activate' then + if not iptables.isenabled() then + raise('Firewall not enabled in kernel') + end + iptables.backup() local pid, interrupted |