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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140304.200947.355879073064420434.davem@davemloft.net>
Date:	Tue, 04 Mar 2014 20:09:47 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	phoebe.buckheister@...m.fraunhofer.de
Cc:	netdev@...r.kernel.org, linux-zigbee-devel@...ts.sourceforge.net
Subject: Re: [PATCH net-next v4 1/4] ieee802154: add generic header
 handling routines

From: "Phoebe Buckheister" <phoebe.buckheister@...m.fraunhofer.de>
Date: Wed, 5 Mar 2014 02:01:52 +0100

> That's the thing - there are so many different byte orders floating around
> at the moment. Network byte order is little endian. Hardware addresses are
> big endian in the network layer and 6lowpan though, and our sockaddrs are
> host byte order for some parts and big endian for others. It's a real
> mess. The solution in my patch seemed the cleanest option to me.
> 
> Storing *everything* in network byte order would require a small adaption
> layer at every interaction with userspace to fix byte ordering, but that's
> doable. 6lowpan would have to do an extra byteswap for the address that I
> currently do in the header ops.

That's an odd choice, since ipv4/ipv6 universally put things in network
byte order in the sockaddrs.

But since it's been made already, you want to still use network byte
order internally in the stack.  Because you're going to process more
packets than you are going to be handling user sockaddrs.

Translate the values to network byte order on bind() etc. calls and
just be done with it.
--
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