-
Notifications
You must be signed in to change notification settings - Fork 89
Bridge: add support for specifying IFLA_BRIDGE_FLAGS
and implement Flags
#212
Bridge: add support for specifying IFLA_BRIDGE_FLAGS
and implement Flags
#212
Conversation
Add support for setting `IFLA_BRIDGE_FLAGS` to bridge management nested attributes. Can accept flags such `BRIDGE_FLAGS_MASTER` and `BRIDGE_FLAGS_SELF` Signed-off-by: Aditya Rajan <arajan@redhat.com>
Signed-off-by: Aditya Rajan <arajan@redhat.com>
db8911a
to
d49dfba
Compare
@@ -394,6 +394,11 @@ pub const IFLA_INFO_DATA: u16 = 2; | |||
pub const IFLA_INFO_XSTATS: u16 = 3; | |||
pub const IFLA_INFO_SLAVE_KIND: u16 = 4; | |||
pub const IFLA_INFO_SLAVE_DATA: u16 = 5; | |||
// Bridge flags | |||
pub const IFLA_BRIDGE_FLAGS: u16 = 47; |
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.
I really wanted this to be 0
but code has implemented IFLA_BR_XXXX
for bridge which blocks 0
.
I think IFLA_BR_XXXXX
should be implemented for a general link not for InfoBridge
but trying not to break what is already there.
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.
Sorry I don't understand what you mean. Are you saying IFLA_BRIDGE_FLAGS
can't be named IFLA_BR_FLAGS
?
@cathay4t @little-dude PTAL |
Sorry @flouthoc I'll try to review this tonight |
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.
This looks good, I'd just like a clarification about why IFLA_BRIDGE_FLAGS
can't be named IFLA_BR_FLAGS
like the other link info constants.
@little-dude I am a bit unsure about using But I'm fine to change it, if that is needed. Not a problem for me 😄 |
Sorry for taking so long @flouthoc and thanks for your PR. |
Extends
InfoBridge
to supportFlags
Add support for setting
IFLA_BRIDGE_FLAGS
to bridge management nested attributes. Can accept flags suchBRIDGE_FLAGS_MASTER
andBRIDGE_FLAGS_SELF