diff options
author | Konstantin Gribov <grossws@gmail.com> | 2018-08-29 21:57:02 +0300 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2018-08-29 11:57:02 -0700 |
commit | 2b6434e8793a876e5465edd9c75819166878aba6 (patch) | |
tree | 5e3483dc1d060e13370adb4ad4abd7ebb6af2160 /plugins | |
parent | e7c9bf8d669bd4ec0c63041e37adb17f3fc1b567 (diff) | |
download | zsh-2b6434e8793a876e5465edd9c75819166878aba6.tar.gz zsh-2b6434e8793a876e5465edd9c75819166878aba6.tar.bz2 zsh-2b6434e8793a876e5465edd9c75819166878aba6.zip |
Fixed `fwl` function in `firewalld` plugin when `sources` used (#7011)
`firewall-cmd --get-active-zones` returns something like this:
```
dmz
sources: ipset:dmz-hosts
public
interfaces: eth0
```
if zone binding is based on source ips, so strings with `sources: ...` should be excluded along with `interfaces: ...` to get zones list.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/firewalld/firewalld.plugin.zsh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/firewalld/firewalld.plugin.zsh b/plugins/firewalld/firewalld.plugin.zsh index bfbf6f48f..5b1090636 100644 --- a/plugins/firewalld/firewalld.plugin.zsh +++ b/plugins/firewalld/firewalld.plugin.zsh @@ -6,7 +6,7 @@ alias fwrp="sudo firewall-cmd --runtime-to-permanent" function fwl () { # converts output to zsh array () # @f flag split on new line - zones=("${(@f)$(sudo firewall-cmd --get-active-zones | grep -v interfaces)}") + zones=("${(@f)$(sudo firewall-cmd --get-active-zones | grep -v 'interfaces\|sources')}") for i in $zones; do sudo firewall-cmd --zone $i --list-all |