From: root Date: Thu, 24 Apr 2008 18:37:54 +0000 (-0700) Subject: Fix problem in sending netlink messages on non-32-bit platforms. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d3ea3b5812b105b92dba6c3b13bded434f82ba9;p=openvswitch Fix problem in sending netlink messages on non-32-bit platforms. ** Fix provided by Ben. ** --- 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;