-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
link: use struct BridgeId instead of tuple and fix its endianess
The bridge ID defined by attributes BRIDGE_ID and ROOT_ID, both in bridge and bridge_port, contains a priority field and the MAC address. Use a named struct to show the meaning of these fields instead of using a tuple. Also, fix the endianess of the priority field. The kernel uses a `u8 prio[2]` field instead of `u16`, with the first byte being the highest order byte. See: https://elixir.bootlin.com/linux/v6.6.9/source/net/bridge/br_netlink.c#L1633 Note: to make the file bridge.rs to be well organized, moved the definition of BRIDGE_QUERIER_* close to BridgeQuerierState where it's used. Signed-off-by: Íñigo Huguet <[email protected]>
- Loading branch information
Showing
5 changed files
with
105 additions
and
94 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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