Support permanent per interface firewalld zone configuration on rh7 systems.

Fixes #27222
This commit is contained in:
Heinz Wiesinger 2015-09-18 14:17:08 +02:00
parent 8c204a45ab
commit 48023669e7
2 changed files with 3 additions and 2 deletions

View file

@ -51,7 +51,7 @@ _ETHTOOL_CONFIG_OPTS = [
]
_RH_CONFIG_OPTS = [
'domain', 'peerdns', 'peerntp', 'defroute',
'mtu', 'static-routes', 'gateway'
'mtu', 'static-routes', 'gateway', 'zone'
]
_RH_CONFIG_BONDING_OPTS = [
'mode', 'miimon', 'arp_interval',
@ -624,7 +624,7 @@ def _parse_settings_eth(opts, iface_type, enabled, iface):
if iface_type == 'ib':
result['devtype'] = 'InfiniBand'
for opt in ['ipaddr', 'master', 'netmask', 'srcaddr', 'delay', 'domain', 'gateway']:
for opt in ['ipaddr', 'master', 'netmask', 'srcaddr', 'delay', 'domain', 'gateway', 'zone']:
if opt in opts:
result[opt] = opts[opt]

View file

@ -24,6 +24,7 @@ DEVICE="{{name}}"
{%endif%}{% if stp %}STP="{{stp}}"
{%endif%}{% if delay or delay == 0 %}DELAY="{{delay}}"
{%endif%}{% if mtu %}MTU="{{mtu}}"
{%endif%}{% if zone %}ZONE="{{zone}}"
{%endif%}{% if my_inner_ipaddr %}MY_INNER_IPADDR={{my_inner_ipaddr}}
{%endif%}{% if my_outer_ipaddr %}MY_OUTER_IPADDR={{my_outer_ipaddr}}
{%endif%}{% if bonding %}BONDING_OPTS="{%for item in bonding %}{{item}}={{bonding[item]}} {%endfor%}"