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

Validate interface name length in cfgmgr #3217

Conversation

arfeigin
Copy link
Contributor

@arfeigin arfeigin commented Jul 3, 2024

This PR is accompanied by sonic-net/sonic-swss-common#889 and sonic-net/sonic-utilities#3397
What I did
Validate interface name length does not exceed the limitation of IFNAMSIZ to align to kernel restrictions.
This PR covers the cases of adding interface directly to the DB not using the cli - similar validation on the CLI side is implemented in a sonic-utilities PR.

Why I did it
Kernel restricts interface name length to not exceed IFNAMSIZ and this was not checked which can lead to inconsistency when creating such interface as it will be created in config db but it will be blocked when trying to actually create such interface.

How I verified it
Manual testing.

Details if related

@arfeigin
Copy link
Contributor Author

arfeigin commented Jul 8, 2024

Checkers fail as sonic-net/sonic-swss-common#889 should be merged first so it will compile.

@dprital
Copy link
Collaborator

dprital commented Aug 14, 2024

@prsunny , Can you please approve this PR ?

@arfeigin arfeigin closed this Aug 27, 2024
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.

5 participants