In userspace switch, don't truncate packets to 0 bytes with max_len of 0.
authorBen Pfaff <blp@nicira.com>
Thu, 4 Sep 2008 20:44:29 +0000 (13:44 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 4 Sep 2008 20:53:27 +0000 (13:53 -0700)
From partner.

switch/datapath.c

index 1e71411dfaaa2f72c43711ae45a69b9d20e253b4..5eeefa7851ed10526108acfb946d4c32b1dfc405 100644 (file)
@@ -636,7 +636,7 @@ dp_output_control(struct datapath *dp, struct ofpbuf *buffer, int in_port,
 
     buffer_id = save_buffer(buffer);
     total_len = buffer->size;
-    if (buffer_id != UINT32_MAX && buffer->size > max_len) {
+    if (buffer_id != UINT32_MAX && max_len && buffer->size > max_len) {
         buffer->size = max_len;
     }