Re: endian patch to NATM

Kenjiro Cho <[email protected]> Wed, 12 Mar 2003 23:40:59 +0900 (JST)
Newsgroups gmane.os.freebsd.devel.atm
Message-ID <[email protected]>
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 [email protected]
with "unsubscribe freebsd-atm" in the body of the message