Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Mar 2003 23:40:59 +0900 (JST)
From:      Kenjiro Cho <kjc@csl.sony.co.jp>
To:        brandt@fokus.fraunhofer.de
Cc:        freebsd-atm@FreeBSD.ORG
Subject:   Re: endian patch to NATM
Message-ID:  <20030312.234059.74730339.kjc@csl.sony.co.jp>
In-Reply-To: <20030312144011.N641@beagle.fokus.fraunhofer.de>
References:  <20030312144011.N641@beagle.fokus.fraunhofer.de>

next in thread | previous in thread | raw e-mail | index | archive | help

Harti Brandt wrote:
> there seems to be an endian related bug in NATM. The problem is, that
> in contrast to the comments in if_atm.h, the ATM_LLC_SETTYPE macros
> expects its V argument (the ethertype) in swapped host order (the
> ATM_LLC_TYPE macros on the other hand returns host order). The code feeds
> the htons'ed ethernet type into the macro, so that for i386 it happens to
> work. On the sparc the ethernet type in the LLC/SNAP header is wrong.
> 
> The attached patch changes the macro to actually require host byte order
> and the calling code to feed the ethertype in host byte order.
> 
> The patch has been verified by using IP between an i386 and a sparc64.
> 
> Comments? Ok to commit?
> 
> Regards,
> harti

I've just noticed that NetBSD fixed this long time ago.
Please commit.

-Kenjiro

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-atm" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030312.234059.74730339.kjc>