lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 24 Mar 2008 10:53:26 -0500
From:	Andy Fleming <afleming@...escale.com>
To:	jeff@...zik.org
Cc:	netdev@...r.kernel.org, Dai Haruki <dai.haruki@...escale.com>,
	Andy Fleming <afleming@...escale.com>
Subject: [PATCH v2.6.26] Fix frame size calculation when hardware VLAN acceleration is on

From: Dai Haruki <dai.haruki@...escale.com>

In gfar_change_mtu(), the frame size needs to be increased to account for the
extra 4 bytes VLAN adds to the ethernet header.  However, it was being increased
by the length of the whole header (18 bytes), which is wrong.

Signed-off-by: Dai Haruki <dai.haruki@...escale.com>
Signed-off-by: Andy Fleming <afleming@...escale.com>
---
 drivers/net/gianfar.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 718cf77..0ab4b26 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -1185,7 +1185,7 @@ static int gfar_change_mtu(struct net_device *dev, int new_mtu)
 	int frame_size = new_mtu + ETH_HLEN;
 
 	if (priv->vlan_enable)
-		frame_size += VLAN_ETH_HLEN;
+		frame_size += VLAN_HLEN;
 
 	if (gfar_uses_fcb(priv))
 		frame_size += GMAC_FCB_LEN;
-- 
1.5.4.23.gef5b9

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ