vswitchd: Fix treatment of unbuffered packets.
authorBen Pfaff <blp@nicira.com>
Fri, 26 Dec 2008 19:06:09 +0000 (11:06 -0800)
committerBen Pfaff <blp@nicira.com>
Fri, 26 Dec 2008 21:27:23 +0000 (13:27 -0800)
Before, buggy code caused unbuffered packets to be dropped.  This fixes
the problem.

vswitchd/bridge.c

index 6b782bdbe63a502951ccdf6f2572650da468f06d..2dc6bb9a1257d3b4b3ad1ee39ed0a166eac9cddd 100644 (file)
@@ -1055,7 +1055,7 @@ send_packets(struct bridge *br, const struct flow *flow,
         opo->in_port = flow->in_port;
         put_actions(dsts, n_dsts, ntohs(flow->dl_vlan), pbuf);
         opo = pbuf->data;
-        opo->actions_len = htons(actions_len);
+        opo->actions_len = htons(pbuf->size - sizeof *opo);
         if (pkt->buffer_id == UINT32_MAX) {
             ofpbuf_put(pbuf, pkt->buf->data, pkt->buf->size);
         }