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

[MCLAG] Fix iccpd crash bug #7724

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

Conversation

jianjundong
Copy link
Contributor

@jianjundong jianjundong commented May 27, 2021

Signed-off-by: dongjianjun@inspur.com

Why I did it

  1. If the peer warm reboot, 'time(&csm->warm_reboot_disconn_time)' is used in function 'mlacp_peer_disconn_handler()' to record the time when the peer enters the warm reboot state; If the neighbor relationship has not been reestablished after 90s, the local switch will migrate from warm reboot disconnected to normal disconnected. However, the 'iccp_csm_status_reset()' function is called immediately after the 'mlacp_peer_disconn_handler()' function, in which 'csm->warm_reboot_disconn_time' will be set to 0. As a result, the local switch cannot migrate to normal disconnected after the 90s timeout.
  2. If 'csm->peer_link_if' is set to NULL, 'csm->peer_link_if->is_peer_link' also needs to be set to 0 at the same time; Otherwise, it will lead to the judgment 'if (local_if->is_peer_link)' error, and then use 'csm->peer_link_if' incorrectly, which will lead to iccpd crash.

How I did it

  1. In the function 'iccp_csm_status_reset()', 'csm->warm_reboot_disconn_time' is not set to 0.
  2. If 'csm->peer_link_if' is set to NULL, 'csm->peer_link_if->is_peer_link' also be set to 0 at the same time.

How to verify it

Test on the switch.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012

Description for the changelog

A picture of a cute animal (not mandatory but encouraged)

@jianjundong jianjundong requested a review from lguohan as a code owner May 27, 2021 02:30
@lguohan lguohan requested a review from rlhui June 8, 2021 16:45
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.

1 participant