I was reviewing some implementation details for the upcoming vlan range feature, and just realized that currently we do have a mechanism to avoid allowing overlapping UNIs (interface + tag) with _is_duplicated_evc(evc), but this method is only being called on POST /v2/evc/, so on PATCH /v2/evc/{{circuit_id}}, if you set an overlapping tag value it'll accept, which should be invalid, since it'd be leaking the same access vlan on different EVCs, which would also ended up overwriting the flows.
Notice that during update, it's also changing a reference, so to verify if it's overlapping a copy might be needed (until we start also verifying if the tags are also available in the UNI with the is_valid, but that is only being used for NNI for some reason, probably technical debt)
I was reviewing some implementation details for the upcoming vlan range feature, and just realized that currently we do have a mechanism to avoid allowing overlapping UNIs (interface + tag) with _is_duplicated_evc(evc), but this method is only being called on
POST /v2/evc/
, so onPATCH /v2/evc/{{circuit_id}}
, if you set an overlapping tag value it'll accept, which should be invalid, since it'd be leaking the same access vlan on different EVCs, which would also ended up overwriting the flows.Notice that during update, it's also changing a reference, so to verify if it's overlapping a copy might be needed (until we start also verifying if the tags are also available in the UNI with the
is_valid
, but that is only being used for NNI for some reason, probably technical debt)How to reproduce
After the update: