Skip to content

Commit 4cbf309

Browse files
committed
Correct VLAN_RANGE_REGEX.
It appears that the VLAN_RANGE_REGEX being used currently doesn't correctly match vlan's above 999 resulting it applying interfaces even when the vlan interface already exist. Correct the vlan range regex so that it correctly matches - based on the regex used elsewhere in the module.
1 parent 85dafc4 commit 4cbf309

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/puppet/provider/network_config/redhat.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
SCRIPT_DIRECTORY = '/etc/sysconfig/network-scripts'.freeze
2323

2424
# The valid vlan ID range is 0-4095; 4096 is out of range
25-
VLAN_RANGE_REGEX = %r{\d{1,3}|40[0-9][0-5]}
25+
VLAN_RANGE_REGEX = %r{[1-3]?\d{1,3}|40[0-8]\d|409[0-5]}
2626

2727
# @return [Regexp] The regular expression for interface scripts on redhat systems
2828
SCRIPT_REGEX = %r{\Aifcfg-[a-z]+[a-z\d]+(?::\d+|\.#{VLAN_RANGE_REGEX})?\Z}

0 commit comments

Comments
 (0)