diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2011-10-11 16:07:27 -0700 |
---|---|---|
committer | Stephen Hemminger <shemminger@vyatta.com> | 2011-10-11 16:07:27 -0700 |
commit | 434d24bae108dbb21461a13a4abcf014afa8b029 (patch) | |
tree | 91ea5b08ade8290700af59c77a19481d5f9c9dd5 | |
parent | 1edafa40a404d41f09c32fd601438c4a88298c54 (diff) | |
download | rstp-434d24bae108dbb21461a13a4abcf014afa8b029.tar.gz |
The IFLA_PROTINFO is a u8 not u32, and sending a bigger value
to kernel means extra bytes are ignored, leaving state as always 0.
-rw-r--r-- | brstate.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -42,7 +42,7 @@ static int br_set_state(struct rtnl_handle *rth, unsigned ifindex, __u8 state) req.ifi.ifi_family = AF_BRIDGE; req.ifi.ifi_index = ifindex; - addattr32(&req.n, sizeof(req.buf), IFLA_PROTINFO, state); + addattr_l(&req.n, sizeof(req.buf), IFLA_PROTINFO, &state, sizeof(state)); return rtnl_talk(rth, &req.n, 0, 0, NULL, NULL, NULL); } |