From ecf9ebff6c0a68d53d600f20ae978aaa96da765f Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 24 Jan 2011 09:41:29 -0800 Subject: [PATCH] dpif-netdev: Allow for Ethernet and VLAN header in buffer size calculation. This is a long-standing bug--it was present in version 1.0 too. Reported-by: Gaetano Catalli Solution by Jesse Gross --- AUTHORS | 1 + lib/dpif-netdev.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 6abd7ea0..c48479fc 100644 --- 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 diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 82d7d741..391a2a7a 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -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; -- 2.30.2