]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Fix handling of port-range-min 0 in secgroup RPC and agent
authorshihanzhang <shihanzhang@huawei.com>
Tue, 14 Jul 2015 11:20:46 +0000 (19:20 +0800)
committershihanzhang <shihanzhang@huawei.com>
Thu, 23 Jul 2015 09:28:04 +0000 (17:28 +0800)
commit4f89d9be7317ee5c82716306420e1d5efbcb7b31
tree63f097dc50aa9aba6b74e62a0dcdd8a0e4946959
parent46c0da4fc5061e7b1f92fd04c633ebdbf3ab49d5
Fix handling of port-range-min 0 in secgroup RPC and agent

For TCP/UDP protocol, port valid range is 0 to 65535, so for a
security group rule, its valid range is also 0 to 65535. this
patch makes two changes:
1. if a security group rule port_range_min is 0, l2 agent also can
   get port_range_min real value 0 when it gets this rule for a
   device via RPC.
2. For IptablesFirewallDriver, if port range is [0, xxxx], l2 agent
   also need add this rule to iptables.

Change-Id: If93c54a31d973187889ead2c2797ffdd40a4393d
Closes-bug: #1473965
neutron/agent/linux/iptables_firewall.py
neutron/db/securitygroups_rpc_base.py
neutron/tests/unit/agent/linux/test_iptables_firewall.py
neutron/tests/unit/agent/test_securitygroups_rpc.py