Neutron API port range validation not working correctly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Medium
|
Hunt Xu |
Bug Description
Neutron API port range validation is not working correctly.
In neutron-api, when doing port range validation, we compares min_port and max_port as strings. Which leads to wrong port range specification could pass the validation successfully.
* Step-by-step reproduction steps:
1. create a firewall rule with wrong port range specification:
openstack firewall group rule create --source-port 1111:9 --protocol tcp
* Expected output:
- "Invalid input for source_port. Reason: First port in a port range must be lower than the second port."
- This is the error message from neutron API port range validator.
* Actual output:
- "Invalid value for port 1111:9."
- This is the error message from FWaaS exception InvalidPortValue, which means that the problematic port range specification passed the API validation.
* Version:
- neutron-lib 1.11.0 installed from PyPI as a requirement.
* Environment:
- devstack with FWaaS(master commit 66d3d57ac4fd863
Changed in neutron: | |
assignee: | nobody → Hunt Xu (huntxu) |
status: | New → Confirmed |
status: | Confirmed → New |
Changed in neutron: | |
importance: | Undecided → Medium |
tags: | added: lib |
Fix proposed to branch: master /review. openstack. org/528205
Review: https:/