Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing legacy/nonstandard validations for MAC addresses #229

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nathancurry
Copy link

Currently, MAC validations accept non-standard MACs that drop
leading digits. I cannot find documentation from any mentioned
manufacturer that currently accepts these non-standard MACs.

Any non-standard MAC should be validated by a separate routine, or
we're not validating MAC addresses.

References

Cisco:
https://www.ciscopress.com/articles/article.asp?p=3089352&seqNum=5

"When using hexadecimal, leading zeros are always displayed to
complete the 8-bit representation. For example, in Figure 7-6,
the binary value 0000 1010 is shown to be 0A in hexadecimal."

Postgres:
https://www.postgresql.org/docs/9.1/datatype-net-types.html

All examples are 12 hex digits

IETF:
I can't find a single RFC dropping leading zeroes.

IEEE:
I don't have access to the actual EUI-48 spec, but I see nothing
indicating that anyone drops the zeroes.

Currently, MAC validations accept non-standard MACs that drop
leading digits.  I cannot find documentation from any mentioned
manufacturer that currently accepts these non-standard MACs.

Any non-standard MAC should be validated by a separate routine, or
we're not validating MAC addresses.

References
==========
Cisco:
https://www.ciscopress.com/articles/article.asp?p=3089352&seqNum=5

"When using hexadecimal, leading zeros are always displayed to
complete the 8-bit representation. For example, in Figure 7-6,
the binary value 0000 1010 is shown to be 0A in hexadecimal."

Postgres:
https://www.postgresql.org/docs/9.1/datatype-net-types.html

All examples are 12 hex digits

IETF:
I can't find a single RFC dropping leading zeroes.

IEEE:
I don't have access to the actual EUI-48 spec, but I see nothing
indicating that anyone drops the zeroes.
@nathancurry
Copy link
Author

Bug 1949632 - MAC address validation passes on invalid MAC addresses (dropped hex digits) - BZ I filed for python-neutron-lib, since this causes issues downstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant