]> git.ipfire.org Git - thirdparty/hostap.git/commit
bsd: Fix set_key() sequence number endian issue
authorZhu Yi <yi.zhu@atheros.com>
Thu, 23 Jun 2011 12:47:21 +0000 (15:47 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 23 Jun 2011 12:47:21 +0000 (15:47 +0300)
commitc3b0a1c8ad694af367026d5236b725e9594677b8
treebd6f539a0005c8a9389268e58a604f579005d03a
parent29fbc52251e37d2981033978693050c62d801138
bsd: Fix set_key() sequence number endian issue

In set_key handler, the seq[8] is in little endian order defined by
WPA. BSD kernel uses a u_int64_t value ik_keyrsc to represent it
internally. The kernel expects the native endian order for the value.
Thus, we need to detect the endian order and swap bytes when
necessary.
src/drivers/driver_bsd.c