From: Ben Pfaff Date: Thu, 4 Sep 2008 20:44:29 +0000 (-0700) Subject: In userspace switch, don't truncate packets to 0 bytes with max_len of 0. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3d01200b1d94d54b6da7c34f6d56bd6da8465f4;p=openvswitch In userspace switch, don't truncate packets to 0 bytes with max_len of 0. From partner. --- diff --git a/switch/datapath.c b/switch/datapath.c index 1e71411d..5eeefa78 100644 --- a/switch/datapath.c +++ b/switch/datapath.c @@ -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; }