bridge: fix IPv6 address order assumption in test#1260
Open
yushoyamaguchi wants to merge 1 commit into
Open
Conversation
Linux kernel v7.0 changed same-scope IPv6 address insertion from prepend to append (torvalds/linux@cb3de96eea66), causing AddrList to return addresses in insertion order rather than reverse order. Replace index-based checks in checkBridgeIPs with ContainElement to make the test order-independent. Signed-off-by: Yusho Yamaguchi <ys-yamaguchi@kddi.com>
Contributor
Author
|
The result of the test in kernel v7.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
checkBridgeIPsin the "ensure bridge address" test assumed thatAddrListreturns same-scope IPv6 addresses in reverse insertion order (newest first), and checkedaddrs[0]/addrs[1]by index.ContainElementso the test verifies presence of both addresses without assuming order.Root cause
Linux kernel v7.0 changed the insertion order for same-scope IPv6 addresses in
ipv6_link_dev_addr.torvalds/linux@cb3de96eea66
Our test was written against v6.x prepend behavior and passed in CI (which runs on a v6.x kernel).
On v7.0+ kernels,
AddrListreturns addresses in insertion order, causing the index-based checks to fail.