Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP2:Update
firewalld
0005-fw_nm-Add-nm_get_interfaces_in_zone.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0005-fw_nm-Add-nm_get_interfaces_in_zone.patch of Package firewalld
From 877c899e03cd166ad5c8737f73178e0b4c4de84d Mon Sep 17 00:00:00 2001 From: Eric Garver <e@erig.me> Date: Wed, 18 Jul 2018 15:52:48 -0400 Subject: [PATCH 5/8] fw_nm: Add nm_get_interfaces_in_zone() (cherry picked from commit 83d70a5b20ad39ec577e863454cbb663a29fea3f) --- src/firewall/core/fw_nm.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/firewall/core/fw_nm.py b/src/firewall/core/fw_nm.py index 686810a7..8b900118 100644 --- a/src/firewall/core/fw_nm.py +++ b/src/firewall/core/fw_nm.py @@ -173,6 +173,15 @@ def nm_get_interfaces(): return active_interfaces +def nm_get_interfaces_in_zone(zone): + interfaces = [] + for interface in nm_get_interfaces(): + conn = nm_get_connection_of_interface(interface) + if zone == nm_get_zone_of_connection(conn): + interfaces.append(interface) + + return interfaces + def nm_get_connection_of_interface(interface): """Get connection from NM that is using the interface @param interface name -- 2.19.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor