From 9d3ea3b5812b105b92dba6c3b13bded434f82ba9 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 24 Apr 2008 11:37:54 -0700 Subject: [PATCH] Fix problem in sending netlink messages on non-32-bit platforms. ** Fix provided by Ben. ** --- lib/dpif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dpif.c b/lib/dpif.c index 63611e93..08c83c71 100644 --- a/lib/dpif.c +++ b/lib/dpif.c @@ -203,8 +203,8 @@ dpif_send_openflow(struct dpif *dp, struct buffer *buffer, bool wait) nl_msg_put_genlmsghdr(&hdr, dp->sock, 32, openflow_family, NLM_F_REQUEST, DP_GENL_C_OPENFLOW, 1); nl_msg_put_u32(&hdr, DP_GENL_A_DP_IDX, dp->dp_idx); - nla = buffer_put_uninit(&hdr, sizeof nla); - nla->nla_len = sizeof nla + buffer->size; + nla = buffer_put_uninit(&hdr, sizeof *nla); + nla->nla_len = sizeof *nla + buffer->size; nla->nla_type = DP_GENL_A_OPENFLOW; pad_bytes = NLA_ALIGN(nla->nla_len) - nla->nla_len; nl_msg_nlmsghdr(&hdr)->nlmsg_len = hdr.size + buffer->size + pad_bytes; -- 2.30.2