datapath: Fix ovs_dp_cmd_msg_size()
authorDaniele Di Proietto <daniele.di.proietto@gmail.com>
Thu, 23 Jan 2014 16:18:59 +0000 (17:18 +0100)
committerJesse Gross <jesse@nicira.com>
Thu, 23 Jan 2014 18:45:02 +0000 (10:45 -0800)
commit c58cc9a460fd158e5250e59902e96ac677dc115f (datapath: Allow user space to
announce ability to accept unaligned Netlink messages) introduced
OVS_DP_ATTR_USER_FEATURES netlink attribute in datapath responses,
but the attribute size was not taken into account in ovs_dp_cmd_msg_size().

Signed-off-by: Daniele Di Proietto <daniele.di.proietto@gmail.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
datapath/datapath.c

index c756e2f..f045fe4 100644 (file)
@@ -1089,6 +1089,7 @@ static size_t ovs_dp_cmd_msg_size(void)
        msgsize += nla_total_size(IFNAMSIZ);
        msgsize += nla_total_size(sizeof(struct ovs_dp_stats));
        msgsize += nla_total_size(sizeof(struct ovs_dp_megaflow_stats));
+       msgsize += nla_total_size(sizeof(u32)); /* OVS_DP_ATTR_USER_FEATURES */
 
        return msgsize;
 }