Configure RD with wrong format is allowed

Bug #1524169 reported by Na Zhu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-bgpvpn
Fix Released
High
Thomas Morin
Juno
Confirmed
High
Unassigned
Kilo
Confirmed
High
Unassigned
Liberty
Fix Released
High
Thomas Morin

Bug Description

juno@ubuntu:~/devstack$ neutron bgpvpn-create --name juno --route-targets 100:0 --route-distinguishers 100 --type l2
Created a new bgpvpn:
+----------------------+--------------------------------------+
| Field | Value |
+----------------------+--------------------------------------+
| auto_aggregate | True |
| export_targets | |
| id | 1f2d29ce-917a-45a7-b37f-d45b59c52edf |
| import_targets | |
| name | juno |
| networks | |
| route_distinguishers | 100 |
| route_targets | 100:0 |
| routers | |
| tenant_id | 6c557bea9025437db120734a1f4a8981 |
| type | l2 |
+----------------------+--------------------------------------+

The RD format must be AA:NN or IP:NN, so 100 should not be allowed

Revision history for this message
Thomas Morin (tmmorin-orange) wrote :

Based on the show command above the bug looks valid.

It is surprising though : there is code (extension/bgpvpn.py) to validate route-targets and route-distinguishers, and the test case confirms that it works for route-targets.

Changed in bgpvpn:
status: New → Confirmed
importance: Undecided → High
Changed in bgpvpn:
milestone: none → liberty
no longer affects: bgpvpn/trunk
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-bgpvpn (master)

Fix proposed to branch: master
Review: https://review.openstack.org/256330

Changed in bgpvpn:
assignee: nobody → Thomas Morin (tmmorin-orange)
status: Confirmed → In Progress
Revision history for this message
Thomas Morin (tmmorin-orange) wrote :

Na Zhu: thanks for reporting this bug !
It should now be fixed...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-bgpvpn (master)

Reviewed: https://review.openstack.org/256330
Committed: https://git.openstack.org/cgit/openstack/networking-bgpvpn/commit/?id=5b530c24da811957548cf01d28e94dbafd8db558
Submitter: Jenkins
Branch: master

commit 5b530c24da811957548cf01d28e94dbafd8db558
Author: Thomas Morin <email address hidden>
Date: Fri Dec 11 11:35:50 2015 +0100

    Fix RT/RD validation

    This change fixes the RT/RD validation code:
    - use the same validation function for route_targets than
      the one used for import_rts and export_rts
    - allow an empty value without allowing everything
      (_validate_rt_list_or_none was accepting anything non-empty)
    - add unit tests testing the validation of the four RT/RD fields

    Change-Id: I8769b0b135d9c9108475a4366c53266787228beb
    Closes-Bug: 1524169

Changed in bgpvpn:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.