Curiously I do not see this patch in patchwork anymore. Comments are inline.
22.07.2014 12:01, Holger Hans Peter Freyther пишет:
On Wed, Jun 04, 2014 at 06:21:54PM +0200, Max Suraev wrote:
Hi!
sorry for the late reply (and I also intend to reply for reviving our wednesday meetings. I could talk about TCAP/MAP..)
Neat.
@@ -76,6 +41,11 @@ int auth_get_tuple_for_subscr(struct gsm_auth_tuple *atuple, { struct gsm_auth_info ainfo; int i, rc;
- static struct osmo_sub_auth_data auth = {
.type = OSMO_AUTH_TYPE_GSM
- };
Why is that static?
Probably crawled from static functions I've replaced :) It's not really needed here.
- memcpy(auth.u.gsm.ki, ainfo.a3a8_ki, sizeof(auth.u.gsm.ki));
- if (osmo_auth_gen_vec(vec, &auth, atuple->rand) < 0)
return -1;
- memcpy(atuple->sres, vec->sres, 4);
- memcpy(atuple->kc, vec->kc, 8);
in terms of API, how hard would be an in-situ operation?
Ideally we should use osmocom's auth_vec directly instead of our own atuple. But this change would be more intrusive and I recall Sylvain been working on something like that so I've decided to go for smaller patch which does the job of using proper API.