Comments for net80211_crypto.h, net80211_crypto.c,
net80211_crypto_none.c and net80211_crypto_wep.c
attached.
--
K. Poon.
[EMAIL PROTECTED]
Is net80211_crypto.h supposed to be on the webrev also? It
is not there, but I took a look anyway...
net80211_crypto.h:
56-58: I don't quite understand this note. Why will these
IEEE80211_CIPHER_XXX conflict with IEEE80211_F_PRIVACY?
Should they be in different name spaces? Isn't
IEEE80211_F_XXX supposed to be used in ic_flags?
67: The max number of ciphers available is hard coded. Why?
So when there is a new cipher module, does it mean that we
need to re-compile the 802.11 crypto code to accommodate that?
This does not sound extensible.
69: I suppose the size is in bytes. Maybe a comment? Will we
ever have a key larger than 16 bytes? Is it limited by
the 802.11 standard? A comment?
82: Please move this #define below the typedef of ieee80211_keyix
for clarity.
105: Please add a comment to explain the reason to have a null
cipher always available.
106: Is refcnt needed or not? We should remove all XXX in
production code.
114-123: Is there a document explaining what these functions are?
If not, please add some comments.
138, 139: Is it a problem to have separate buffers for TX mic and
RX mic? Then we don't have to do the #define. If it is
a problem, please comment.
144: XXX...
147: Why is WEP crypto #define IEEE80211_WEP_NKID used in a general
structure for all 802.11 ciphers?
164: XXX...
net80211_crypto.c:
It seems that a lot of the functions return (0) and (1). Can
boolean_t be used?
170: Can a key be used by two different ciphers? I ask because of
this check (key->wk_cipher != cip).
226: Should the key be detached from the cipher on failure?
net80211_crypto_none.c:
43-67: Just a sanity check. Does compiling this file require so
many header files?
net80211_crypto_wep.c:
44-67: Just a sanity check. Does compiling this file require so
many header files?
124: Can random_get_pseudo_bytes() be used here? If not, please
add a comment.
140: Is 40/NBBY minimum allowed key length? How about max? Please
add a comment.
182: What is ATH_HOST_BIG_ENDIAN? If it should not be define, please
remove it from the source.
259-294: Can those macros in <sys/crc32.h> be used? If not, why not?
390-486: Can the KCF be used for RC4? If not, why not?
_______________________________________________
networking-discuss mailing list
[email protected]