Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jul 2001 23:03:32 -0700
From:      Brooks Davis <brooks@one-eyed-alien.net>
To:        freebsd-mobile@FreeBSD.ORG
Subject:   Re: ancontrol/ifconfig and WEP index mixup ?
Message-ID:  <20010724230332.C29046@Odin.AC.HMC.Edu>
In-Reply-To: <20010725002334.A9937@pir.net>; from pir@pir.net on Wed, Jul 25, 2001 at 12:23:34AM -0400
References:  <20010725002334.A9937@pir.net>

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

--tThc/1wpZn/ma/RB
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Jul 25, 2001 at 12:23:34AM -0400, Peter Radcliffe wrote:
> I've been using the ifconfig interface to setting wep keys for both wi
> and an interfaces. Using -STABLE from a few days ago.
>=20
> On cisco an interfaces I've noticed what appears to be some confusion
> between the index numbers for WEP keys.
>=20
> ] pir@disapp# ancontrol -C
> [...]
> ] WEP Key status:
> ]         Key 0 is set 128 bits
> ]         Key 1 is set 128 bits
> ]         Key 2 is unset
> ]         Key 3 is unset
> ]         The active transmit key is 0
>=20
> ] pir@disapp# ifconfig an0
> [...]
> ]        wepmode ON weptxkey 1
> ]        wepkey 1:128-bit
>=20
> OK, so I just guess ancontrol is 0 based and ifconfig is 1 based ...

Yes, ancontrol and wicontrol are 0 indexed because this is usually
the C/Unix, but this is unuseful because everyone else uses 1 indexed
keys and the actual poision of keys matters with WEP.

> ] pir@disapp# ifconfig an0 wepkey 1:-
> [...]
> ]         wepmode ON weptxkey 1
> ]=20
>=20
> There's an blank line at the end of the ifconfig output with no wep
> key set (is that intentional ?) but seems to be doing the right thing
> and not saying I have a key 0 when I don't appear to.

That's a bug.  I've just committed a fix to -current and should MFC
before the 4.4 slush.

> So, ancontrol getting the wrong index on keys ? Something weird I'm
> not getting about perm/temp keys ?

I don't think it's a perm/temp issue.  You set permanent keys in
ifconfig with indexes 5-8, but you actually see them as 1-4 in the
status.  My understanding is that temp keys mask perm keys.  It looks to
me like your access point is transmitting with key 2 rather then key 1.
At least, that's the most straightforward scenerio I can think of that
explains this odd behavior.

> Oh, also the man page for ancontrol says;
>=20
> ]     -i iface -o 0|1
> ]                  Set the operating mode of the Aironet interface.  Valid
> ]                  selections are 0 for ad-hoc mode and 1 for infrastruct=
ure
> ]                  mode.  The default driver setting is for ad-hoc mode.
>=20
> Didn't the default change to infrastructure ?

Yup, it looks like no one MFC'd the man page update.

-- Brooks

--=20
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4

--tThc/1wpZn/ma/RB
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7XmEzXY6L6fI4GtQRAkF3AJwO6OnOPdXJRzxyRSLhbTyaNuVoKgCgqbUI
Kf3o/ozpRBrXYOno8ruT/KY=
=Nh3M
-----END PGP SIGNATURE-----

--tThc/1wpZn/ma/RB--

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




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