Fix broken stat requests over netlink.
authorJustin Pettit <jpettit@nicira.com>
Mon, 15 Sep 2008 06:05:37 +0000 (23:05 -0700)
committerJustin Pettit <jpettit@nicira.com>
Mon, 15 Sep 2008 06:05:37 +0000 (23:05 -0700)
A recent change (696db2) modified the way stats were being sent over the
netlink socket.  Unfortunately, the responder set the transaction id to the
type, which caused the requestor to ignore the repsone.

datapath/datapath.c

index 4cea5a8..428f25e 100644 (file)
@@ -1577,7 +1577,8 @@ dp_genl_openflow_dumpit(struct sk_buff *skb, struct netlink_callback *cb)
                        return -EINVAL;
 
                rq = nla_data(va);
-               sender.xid = type = ntohs(rq->type);
+               sender.xid = rq->header.xid;
+               type = ntohs(rq->type);
                if (rq->header.version != OFP_VERSION) {
                        dp_send_error_msg(dp, &sender, OFPET_BAD_REQUEST,
                                          OFPBRC_BAD_VERSION, rq, len);