]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Limit min<=max port check to TCP/UDP in secgroup rule
authorAkihiro MOTOKI <motoki@da.jp.nec.com>
Thu, 4 Jul 2013 16:27:18 +0000 (01:27 +0900)
committerAkihiro MOTOKI <motoki@da.jp.nec.com>
Mon, 8 Jul 2013 13:42:32 +0000 (22:42 +0900)
commit24e6ef332d11de4dc0d08ecf824ad216b2b6500c
treecf9d200d0662362634c558ca0b8029413fe337cc
parent93efc1dd78c4e97bb7c8e191115be98f9383b40c
Limit min<=max port check to TCP/UDP in secgroup rule

icmp_type and icmp_code are mapped to port_min_range and port_max_range
respectively. For ICMP there is no constraint between type and code.
Thus port range min<=max check should be enforced only for TCP and UDP.

Also makes sure that ICMP type/code are 0 to 255 (both inclusive).
Previously a value with 0 to 65535 were accepted for ICMP type/code.

Fixes bug 1197760
Fixes bug 1197769

Change-Id: I70aaf6e02fee461fa97dc254db906d9efa173669
neutron/common/constants.py
neutron/db/securitygroups_db.py
neutron/extensions/securitygroup.py
neutron/tests/unit/test_extension_security_group.py