-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[mclagdctl] added peer link state #9416
base: master
Are you sure you want to change the base?
[mclagdctl] added peer link state #9416
Conversation
9cd92b2
to
c5da929
Compare
@lguohan could you please review it? |
@Praveen-Brcm could you please review it? |
@Praveen-Brcm , @lguohan could somebody help with it please? |
@novikauanton Changes looks good and pls go ahead. Thanks |
@lguohan , @Praveen-Brcm could somebody merge it please? |
@ sorry I do not have merge rights, would request @Iguohan to help. |
@lguohan could you please review and merge it? |
@gechiang Could we merge this improvement? |
memcpy(state_info.peer_link_if, peer_link_if->name, ICCP_MAX_PORT_NAME); | ||
memcpy(state_info.peer_link_mac, peer_link_if->mac_addr, ETHER_ADDR_LEN); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this linbe trying to fix something that was not mentioned in your PR?? Did someone reviewed this change? The other changes looks straight forward but not this one...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- the magic number 6 was replaced by the appropriate constant instead.
- there was a confusing logic with duplicated check.
if (peer_link_if)
do_some_stuff()
else
do_another_stuff()
if (peer_link_if)
do_the_rest()
As those lines needed to be changed in this PR simplified it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh... I overlooked the original code that you changed from. Must have missed my coffee that day. My bad... It makes perfect sense for this change.
@globaltrouble, Please add the necessary unit test code for the code that you are changing. |
#### Why I did it The current redis version of SONiC is `6.0.6`, which contains many high-risky security issues like CVEs that are fixed in the latest version. The Redis release notes also highly recommend to upgrade with SECURITY urgency. ``` ================================================================================ Redis 6.0.16 Released Mon Oct 4 12:00:00 IDT 2021 ================================================================================ Upgrade urgency: SECURITY, contains fixes to security issues. Security Fixes: * (CVE-2021-41099) Integer to heap buffer overflow handling certain string commands and network payloads, when proto-max-bulk-len is manually configured to a non-default, very large value [reported by yiyuaner]. * (CVE-2021-32762) Integer to heap buffer overflow issue in redis-cli and redis-sentinel parsing large multi-bulk replies on some older and less common platforms [reported by Microsoft Vulnerability Research]. * (CVE-2021-32687) Integer to heap buffer overflow with intsets, when set-max-intset-entries is manually configured to a non-default, very large value [reported by Pawel Wieczorkiewicz, AWS]. * (CVE-2021-32675) Denial Of Service when processing RESP request payloads with a large number of elements on many connections. * (CVE-2021-32672) Random heap reading issue with Lua Debugger [reported by Meir Shpilraien]. * (CVE-2021-32628) Integer to heap buffer overflow handling ziplist-encoded data types, when configuring a large, non-default value for hash-max-ziplist-entries, hash-max-ziplist-value, zset-max-ziplist-entries or zset-max-ziplist-value [reported by sundb]. * (CVE-2021-32627) Integer to heap buffer overflow issue with streams, when configuring a non-default, large value for proto-max-bulk-len and client-query-buffer-limit [reported by sundb]. * (CVE-2021-32626) Specially crafted Lua scripts may result with Heap buffer overflow [reported by Meir Shpilraien]. Other bug fixes: * Fix appendfsync to always guarantee fsync before reply, on MacOS and FreeBSD (kqueue) (#9416) * Fix the wrong mis-detection of sync_file_range system call, affecting performance (#9371) * Fix replication issues when repl-diskless-load is used (#9280) ``` #### How I did it Edit `Dockerfile.j2` file #### How to verify it Check redis version #### Description for the changelog This PR will upgrade redis-server version to `6.0.16`.
will be good to include these changes into 202111 branch |
#### Why I did it The current redis version of SONiC is `6.0.6`, which contains many high-risky security issues like CVEs that are fixed in the latest version. The Redis release notes also highly recommend to upgrade with SECURITY urgency. ``` ================================================================================ Redis 6.0.16 Released Mon Oct 4 12:00:00 IDT 2021 ================================================================================ Upgrade urgency: SECURITY, contains fixes to security issues. Security Fixes: * (CVE-2021-41099) Integer to heap buffer overflow handling certain string commands and network payloads, when proto-max-bulk-len is manually configured to a non-default, very large value [reported by yiyuaner]. * (CVE-2021-32762) Integer to heap buffer overflow issue in redis-cli and redis-sentinel parsing large multi-bulk replies on some older and less common platforms [reported by Microsoft Vulnerability Research]. * (CVE-2021-32687) Integer to heap buffer overflow with intsets, when set-max-intset-entries is manually configured to a non-default, very large value [reported by Pawel Wieczorkiewicz, AWS]. * (CVE-2021-32675) Denial Of Service when processing RESP request payloads with a large number of elements on many connections. * (CVE-2021-32672) Random heap reading issue with Lua Debugger [reported by Meir Shpilraien]. * (CVE-2021-32628) Integer to heap buffer overflow handling ziplist-encoded data types, when configuring a large, non-default value for hash-max-ziplist-entries, hash-max-ziplist-value, zset-max-ziplist-entries or zset-max-ziplist-value [reported by sundb]. * (CVE-2021-32627) Integer to heap buffer overflow issue with streams, when configuring a non-default, large value for proto-max-bulk-len and client-query-buffer-limit [reported by sundb]. * (CVE-2021-32626) Specially crafted Lua scripts may result with Heap buffer overflow [reported by Meir Shpilraien]. Other bug fixes: * Fix appendfsync to always guarantee fsync before reply, on MacOS and FreeBSD (kqueue) (sonic-net#9416) * Fix the wrong mis-detection of sync_file_range system call, affecting performance (sonic-net#9371) * Fix replication issues when repl-diskless-load is used (sonic-net#9280) ``` #### How I did it Edit `Dockerfile.j2` file #### How to verify it Check redis version #### Description for the changelog This PR will upgrade redis-server version to `6.0.16`.
Why I did it
In case peer-link is down mclag feature is not properly working, but
mclagdctl
doesn't show any error, all statuses areOK
. The system will be more traceable whenmclagdctl
will show peer-link state.How I did it
peer_link_state
to structmclagd_state
peer_link_state
in functioniccp_mclag_config_dump
peer_link_state
in functionmclagdctl_parse_dump_state
How to verify it
mclagdctl dump state
, keepalive must beOK
andPeer Link state: Up
, expected output:config interface shut PortChannelForPeerLink
mclagdctl dump state
, keepalive must beOK
andPeer Link state: Down
, expected output:Which release branch to backport (provide reason below if selected)
Description for the changelog
mclagdctl dump state
will additionally show peer-link port state.