aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2013-02-12 15:49:12 -0800
committerBen Pfaff <blp@nicira.com>2013-02-12 15:52:26 -0800
commitc94fbda80dc45ff340a1556447ad5ea6c6772db6 (patch)
treebfa48908e0e36ebc1b5027ab050ef0cf089ced01 /lib
parentb2aaa10f74302ff7825f28c10413a9735470b658 (diff)
ofp-msgs: ensure that l2 is set in ofpmp_reserve()
Ensure that the buffer returned by ofpmp_reserve() has buf->l2 set as this may be required by nxm_reg_load_to_nxast() when generating the reply to an stats request This problem was observed when dumping a large number of flows with set_field actions using ovs-ofctl dump-flows. Signed-off-by: Ben Pfaff <blp@nicira.com> Co-authored-by: Simon Horman <horms@verge.net.au> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'lib')
-rw-r--r--lib/ofp-msgs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ofp-msgs.c b/lib/ofp-msgs.c
index 47d76158..e7740009 100644
--- a/lib/ofp-msgs.c
+++ b/lib/ofp-msgs.c
@@ -834,6 +834,8 @@ ofpmp_reserve(struct list *replies, size_t len)
next = ofpbuf_new(MAX(1024, hdrs_len + len));
ofpbuf_put(next, msg->data, hdrs_len);
+ next->l2 = next->data;
+ next->l3 = ofpbuf_tail(next);
list_push_back(replies, &next->list_node);
*ofpmp_flags__(msg->data) |= htons(OFPSF_REPLY_MORE);