You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the kernel: net/bridge/br_netlink.c -> br_rtm_setlink()
The port state is grabbed using:
new_state = nla_get_u8(protinfo);
if (new_state > BR_STATE_BLOCKING)
return -EINVAL;
I was seeing the port state always being returned as zero.
In br_set_state() I changed to:
addattr_l(&req.n, sizeof(req.buf), IFLA_PROTINFO, &state, 1);
To only add the port state as one byte to the netlink message which corrected the problem and the kernel correctly received change of port states.
The text was updated successfully, but these errors were encountered:
In br_set_state() the port state is passed in as a u8 and the attribute is added to the netlink message with the following line:
addattr32(&req.n, sizeof(req.buf), IFLA_PROTINFO, state);
In the kernel: net/bridge/br_netlink.c -> br_rtm_setlink()
The port state is grabbed using:
new_state = nla_get_u8(protinfo);
if (new_state > BR_STATE_BLOCKING)
return -EINVAL;
I was seeing the port state always being returned as zero.
In br_set_state() I changed to:
addattr_l(&req.n, sizeof(req.buf), IFLA_PROTINFO, &state, 1);
To only add the port state as one byte to the netlink message which corrected the problem and the kernel correctly received change of port states.
The text was updated successfully, but these errors were encountered: