mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
Revert "ifupdown2.conf: vlan_aware_bridge_address_support: allow ip on vlan-aware bridge (closes #58)"
This reverts commit 3d06493205
.
This commit is contained in:
@@ -80,10 +80,3 @@ ifaceobj_squash=0
|
|||||||
# based on the physical interface they are running on top of.
|
# based on the physical interface they are running on top of.
|
||||||
# set this flag to 0 to disable this behaviour
|
# set this flag to 0 to disable this behaviour
|
||||||
adjust_logical_dev_mtu=1
|
adjust_logical_dev_mtu=1
|
||||||
|
|
||||||
# By default ifupdown2 will let you configure ip addresses on a vlan-aware
|
|
||||||
# bridge. For some use cases it is useful to restrict such configuration.
|
|
||||||
# This is a boolean variable:
|
|
||||||
# yes, on, 1: to allow L3 configuration on vlan-aware bridge (default)
|
|
||||||
# no, off, 0: to disable L3 config on vlan-aware bridge and warn user
|
|
||||||
vlan_aware_bridge_address_support=yes
|
|
||||||
|
@@ -22,12 +22,10 @@ try:
|
|||||||
from ifupdown2.ifupdown.iface import *
|
from ifupdown2.ifupdown.iface import *
|
||||||
|
|
||||||
import ifupdown2.ifupdown.ifupdownflags as ifupdownflags
|
import ifupdown2.ifupdown.ifupdownflags as ifupdownflags
|
||||||
import ifupdown2.ifupdown.ifupdownconfig as ifupdownconfig
|
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from ifupdown.iface import *
|
from ifupdown.iface import *
|
||||||
|
|
||||||
import ifupdown.ifupdownflags as ifupdownflags
|
import ifupdown.ifupdownflags as ifupdownflags
|
||||||
import ifupdown.ifupdownconfig as ifupdownconfig
|
|
||||||
|
|
||||||
|
|
||||||
def signal_handler_f(ps, sig, frame):
|
def signal_handler_f(ps, sig, frame):
|
||||||
@@ -39,7 +37,6 @@ def signal_handler_f(ps, sig, frame):
|
|||||||
class utils():
|
class utils():
|
||||||
logger = logging.getLogger('ifupdown')
|
logger = logging.getLogger('ifupdown')
|
||||||
DEVNULL = open(os.devnull, 'w')
|
DEVNULL = open(os.devnull, 'w')
|
||||||
vlan_aware_bridge_address_support = None
|
|
||||||
|
|
||||||
_string_values = {
|
_string_values = {
|
||||||
"on": True,
|
"on": True,
|
||||||
@@ -334,10 +331,6 @@ class utils():
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def is_addr_ip_allowed_on(cls, ifaceobj, syntax_check=False):
|
def is_addr_ip_allowed_on(cls, ifaceobj, syntax_check=False):
|
||||||
if cls.vlan_aware_bridge_address_support is None:
|
|
||||||
cls.vlan_aware_bridge_address_support = utils.get_boolean_from_string(
|
|
||||||
ifupdownconfig.config.get('vlan_aware_bridge_address_support', 'yes')
|
|
||||||
)
|
|
||||||
msg = ('%s: ignoring ip address. Assigning an IP '
|
msg = ('%s: ignoring ip address. Assigning an IP '
|
||||||
'address is not allowed on' % ifaceobj.name)
|
'address is not allowed on' % ifaceobj.name)
|
||||||
if (ifaceobj.role & ifaceRole.SLAVE
|
if (ifaceobj.role & ifaceRole.SLAVE
|
||||||
@@ -354,10 +347,8 @@ class utils():
|
|||||||
cls.logger.info(msg)
|
cls.logger.info(msg)
|
||||||
return False
|
return False
|
||||||
elif (ifaceobj.link_kind & ifaceLinkKind.BRIDGE
|
elif (ifaceobj.link_kind & ifaceLinkKind.BRIDGE
|
||||||
and ifaceobj.link_privflags & ifaceLinkPrivFlags.BRIDGE_VLAN_AWARE
|
and ifaceobj.link_privflags & ifaceLinkPrivFlags.BRIDGE_VLAN_AWARE):
|
||||||
and not cls.vlan_aware_bridge_address_support
|
msg = '%s bridge vlan aware interfaces'
|
||||||
):
|
|
||||||
msg = '%s bridge vlan aware interfaces' % msg
|
|
||||||
if syntax_check:
|
if syntax_check:
|
||||||
cls.logger.warning(msg)
|
cls.logger.warning(msg)
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user