dpif-netdev: Allow for Ethernet and VLAN header in buffer size calculation.
authorBen Pfaff <blp@nicira.com>
Mon, 24 Jan 2011 17:41:29 +0000 (09:41 -0800)
committerBen Pfaff <blp@nicira.com>
Mon, 24 Jan 2011 20:44:19 +0000 (12:44 -0800)
This is a long-standing bug--it was present in version 1.0 too.

Reported-by: Gaetano Catalli <gaetano.catalli@gmail.com>
Solution by Jesse Gross <jesse@nicira.com>

AUTHORS
lib/dpif-netdev.c

diff --git a/AUTHORS b/AUTHORS
index 6abd7ea0a749636fdc0a8e6baced0f2ae156b8ea..c48479fc27732045f5a12996c792ba1310f0cce5 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -48,6 +48,7 @@ Cedric Hobbs            cedric@nicira.com
 Dave Walker             DaveWalker@ubuntu.com
 Derek Cormier           derek.cormier@lab.ntt.co.jp
 DK Moon                 dkmoon@nicira.com
+Gaetano Catalli         gaetano.catalli@gmail.com
 Ghanem Bahri            bahri.ghanem@gmail.com
 Hector Oron             hector.oron@gmail.com
 Henrik Amren            henrik@nicira.com
index 82d7d74132e53b627e1764135dd65174ef587f24..391a2a7ae82ee01f8314d3ea53af0b8791accea5 100644 (file)
@@ -950,7 +950,7 @@ dp_netdev_run(void)
     struct shash_node *node;
     struct ofpbuf packet;
 
-    ofpbuf_init(&packet, DP_NETDEV_HEADROOM + max_mtu);
+    ofpbuf_init(&packet, DP_NETDEV_HEADROOM + VLAN_ETH_HEADER_LEN + max_mtu);
     SHASH_FOR_EACH (node, &dp_netdevs) {
         struct dp_netdev *dp = node->data;
         struct dp_netdev_port *port;