if_tap unaligned access problem
From: Gleb Smirnoff (glebius_at_FreeBSD.org)
Date: 04/28/05
- Previous message: Shyam Shantikumar: "FW: SAMBA+LDAP"
- Next in thread: Maksim Yevmenkin: "Re: if_tap unaligned access problem"
- Reply: Maksim Yevmenkin: "Re: if_tap unaligned access problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 28 Apr 2005 17:51:20 +0400 To: net@FreeBSD.org
Forward this to expose to wider audience.
----- Forwarded message from Sten Spans <sten@blinkenlights.nl> -----
From: Sten Spans <sten@blinkenlights.nl>
To: glebius@FreeBSD.org
Cc: Julian Elischer <julian@FreeBSD.org>
Subject: if_tap unaligned access problem
Date: Wed, 27 Apr 2005 14:54:29 +0200 (CEST)
Delivered-To: glebius@freebsd.org
A quick question about if_tap, the tapwrite function
( which copies an ethernet frame into an mbuf using uiotombuf )
is broken on alpha and sparc64.
The 14 byte ethernet header causes the rest of the frame to
be misaligned on 4 byte boundaries. This causes crashes in
various other parts of the kernel. The solution would be to
shift the mbuf by two bytes, but I am not quite sure where
this should happen.
If_tun which is almost the same code has no such problem because
it lacks the 14 byte ethernet header. Openbsd has a combined
tun/tap driver, with some alignment hacks to fix this.
Should I create a pr for this problem, or is there a simple
quick fix possible ?
-- Sten Spans "There is a crack in everything, that's how the light gets in." Leonard Cohen - Anthem ----- End forwarded message ----- -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
- Previous message: Shyam Shantikumar: "FW: SAMBA+LDAP"
- Next in thread: Maksim Yevmenkin: "Re: if_tap unaligned access problem"
- Reply: Maksim Yevmenkin: "Re: if_tap unaligned access problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]