- /* Get actions. */
- n_actions = hdr->n_actions;
- if (n_actions > 65536 / sizeof *actions) {
- VLOG_WARN_RL(&rl, "too many actions in sFlow packet (%zu > %zu)",
- 65536 / sizeof *actions, n_actions);
+ /* Pull odp_msg header. */
+ ofpbuf_use_const(&b, msg, msg->length);
+ ofpbuf_pull(&b, sizeof *msg);
+
+ /* Pull odp_sflow_sample_header. */
+ hdr = ofpbuf_try_pull(&b, sizeof *hdr);
+ if (!hdr) {
+ VLOG_WARN_RL(&rl, "missing odp_sflow_sample_header");