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 CLI #3397

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-buildimage#20108

What I did

Validate interface name length does not exceed the limitation of IFNAMSIZ to align to kernel restrictions.

How I did it

Add validation checks in the relevant config functions for the following interface types:

vxlan
vlan
vrf
loopback
subinterface
portchannel

How to verify it

UT tests added

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

@arfeigin arfeigin force-pushed the master_validate_interface_name_length-new branch from 1d8ac45 to 942edde Compare July 3, 2024 12:39
@arfeigin arfeigin requested a review from prsunny July 8, 2024 16:29
@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.

@arfeigin
Copy link
Contributor Author

arfeigin commented Jul 8, 2024

@prsunny Can you please help reviewing this and the attached PRs?

@dprital
Copy link
Collaborator

dprital commented Aug 14, 2024

@prsunny , Can you please approve this PR ?

config/vxlan.py Outdated Show resolved Hide resolved
config/main.py Outdated Show resolved Hide resolved
config/main.py Outdated Show resolved Hide resolved
@qiluo-msft
Copy link
Contributor

/azp run Azure.sonic-utilities

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@stepanblyschak
Copy link
Contributor

@qiluo-msft @prsunny Please review #3580

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.

6 participants