diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-05-08 19:06:53 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-05-08 19:06:53 +0000 |
| commit | 45b4955b4663e67c5fb3dd0bdd2ffcbe00881f18 (patch) | |
| tree | 38071cc9d51aba9d57d6541f66783a089a756eaf /nova | |
| parent | 314cc19dcac67af59beeac9901c8f03416113685 (diff) | |
| parent | 268494769f0d9f82719f122161f0227372cb8824 (diff) | |
Merge "fix bug 982360, multi ip block for dmz_cidr"
Diffstat (limited to 'nova')
| -rwxr-xr-x | nova/network/linux_net.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/nova/network/linux_net.py b/nova/network/linux_net.py index 55ef9be71..ed7af4825 100755 --- a/nova/network/linux_net.py +++ b/nova/network/linux_net.py @@ -61,9 +61,9 @@ linux_net_opts = [ cfg.StrOpt('dns_server', default=None, help='if set, uses specific dns server for dnsmasq'), - cfg.StrOpt('dmz_cidr', - default='10.128.0.0/24', - help='dmz range that should be accepted'), + cfg.ListOpt('dmz_cidr', + default=[], + help='A list of dmz range that should be accepted'), cfg.StrOpt('dnsmasq_config_file', default='', help='Override the default dnsmasq settings with this file'), @@ -446,9 +446,10 @@ def init_host(ip_range=None): '-s %s -d %s/32 -j ACCEPT' % (ip_range, FLAGS.metadata_host)) - iptables_manager.ipv4['nat'].add_rule('POSTROUTING', - '-s %s -d %s -j ACCEPT' % - (ip_range, FLAGS.dmz_cidr)) + for dmz in FLAGS.dmz_cidr: + iptables_manager.ipv4['nat'].add_rule('POSTROUTING', + '-s %s -d %s -j ACCEPT' % + (ip_range, dmz)) iptables_manager.ipv4['nat'].add_rule('POSTROUTING', '-s %(range)s -d %(range)s ' |
