Skip to content

Commit

Permalink
zebra: use correct attr size for netlink enc
Browse files Browse the repository at this point in the history
a bool is not 4 bytes

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
  • Loading branch information
qlyoung committed Jan 6, 2020
1 parent 0c7a84f commit 4a2089c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zebra/if_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -1467,7 +1467,7 @@ int netlink_protodown(struct interface *ifp, bool down)

req.ifa.ifi_index = ifp->ifindex;

addattr_l(&req.n, sizeof(req), IFLA_PROTO_DOWN, &down, 4);
addattr_l(&req.n, sizeof(req), IFLA_PROTO_DOWN, &down, sizeof(down));
addattr_l(&req.n, sizeof(req), IFLA_LINK, &ifp->ifindex, 4);

return netlink_talk(netlink_talk_filter, &req.n, &zns->netlink_cmd, zns,
Expand Down

0 comments on commit 4a2089c

Please sign in to comment.