]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Disable port creation when invalid MAC address is provided
authorsridhargaddam <sridhar.gaddam@enovance.com>
Mon, 13 Jul 2015 14:00:20 +0000 (14:00 +0000)
committersridhargaddam <sridhar.gaddam@enovance.com>
Thu, 23 Jul 2015 09:35:28 +0000 (09:35 +0000)
commit1ba38bfd3f4e505d53c40f3e1bee603bfc705b64
tree562f5e2a08035cffb25d48d846bcf2b8089699a7
parent95302aac849d466e2328c077c3634dd1c83ed589
Disable port creation when invalid MAC address is provided

When a port is manually created with an invalid mac address like
'00:00:00:00:00:00' and associated to neutron router, we see an
exception in L3-agent logs. Since we do not have any valid use-case
to have a port with a mac_address of all zeros, this patch disables
the corresponding port creation/updation request.

Along with all zeros MAC, validation aganist broadcast MAC is also
included in this patch.

DocImpact

Closes-Bug: #1472243
Change-Id: I93875716550dbc1f299aee95c45144e4904af233
neutron/api/v2/attributes.py
neutron/common/constants.py
neutron/tests/unit/api/v2/test_attributes.py