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

[subinterface] Avoid removing the subinterface when last configured ip is removed #2181

Merged
merged 1 commit into from
May 26, 2022

Conversation

dgsudharsan
Copy link
Collaborator

Signed-off-by: Sudharsan Dhamal Gopalarathnam sudharsand@nvidia.com

What I did

Avoid removing the subinterface when last configured ip is removed

How I did it

In case of other interface types like INTERFACE, VLAN_INTERFACE, PORTCHANNEL_INTERFACE, when the last ip address is removed the CLI implicitly delete the interface table entry of type INTERFACE|intf_name. However this logic doesn't apply to VLAN_SUB_INTERFACE since the creation and removal will be controlled by config subinterface command

Without this fix the subinterface gets removed and show subinterface status will not list the subinterface.

How to verify it

Added UT to verify it.

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)

… is removed

Signed-off-by: Sudharsan Dhamal Gopalarathnam <sudharsand@nvidia.com>
@liat-grozovik liat-grozovik changed the title [subinterface]Avoid removing the subinterface when last configured ip is removed [subinterface] Avoid removing the subinterface when last configured ip is removed May 25, 2022
@liat-grozovik
Copy link
Collaborator

@prsunny could you please review and signoff?

@prsunny prsunny merged commit 5383e92 into sonic-net:master May 26, 2022
yxieca pushed a commit that referenced this pull request Jun 15, 2022
… is removed (#2181)

* Avoid removing the subinterface when last configured ip is removed
Signed-off-by: Sudharsan Dhamal Gopalarathnam <sudharsand@nvidia.com>
@dgsudharsan dgsudharsan deleted the sub_intf_ip_del branch March 9, 2023 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants