Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing KeyMgmt caps #4

Merged
merged 3 commits into from Jan 17, 2023
Merged

Add missing KeyMgmt caps #4

merged 3 commits into from Jan 17, 2023

Conversation

monich
Copy link
Member

@monich monich commented Jan 13, 2023

That should silence KeyMgmt SAE not known warning

Copy link
Contributor

@pvuorela pvuorela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this I'm still getting the warning on sae.

Looks like there's another mapping in gsupplicant.c. Wonder why there are two of those.

@monich
Copy link
Member Author

monich commented Jan 13, 2023

Hmm, do you have a backtrace?

@pvuorela
Copy link
Contributor

Not sure does the backtrace matter much when the warning source is known, but since you asked added a breakpoint there:

Thread 1 "connmand" hit Breakpoint 1, gsupplicant_parse_bits_array (mask=0, count=3, map=0xb6b9b8ec <keymgmt_map>, value=0xbea9d950, name=0xb604b490 "KeyMgmt") at src/gsupplicant_util.c:187
187 src/gsupplicant_util.c: No such file or directory.
(gdb) bt
#0 gsupplicant_parse_bits_array (mask=0, count=3, map=0xb6b9b8ec <keymgmt_map>, value=0xbea9d950, name=0xb604b490 "KeyMgmt") at src/gsupplicant_util.c:187
#1 gsupplicant_parse_bits_array (name=name@entry=0xb604b490 "KeyMgmt", value=value@entry=0xb4c010c0, map=0xb6b9b8ec <keymgmt_map>, count=count@entry=3, mask=0) at src/gsupplicant_util.c:163
#2 0xb6b7e060 in gsupplicant_bss_parse_wpa (name=, value=, data=, name=, value=, data=) at src/gsupplicant_bss.c:489
#3 0xb6b7ddd6 in gsupplicant_dict_parse (data=0x15892cc, fn=0xb6b7e039 <gsupplicant_bss_parse_wpa>, dict=0x1) at src/gsupplicant_util.c:320
#4 gsupplicant_dict_parse (dict=, fn=, data=, dict=, fn=, data=) at src/gsupplicant_util.c:298
#5 0xb6b805ac in gsupplicant_bss_update_wpa (self=, self=) at src/gsupplicant_bss.c:531
#6 0xb6b835be in gsupplicant_bss_proxy_created (bus=, result=, data=) at src/gsupplicant_bss.c:1130
#7 0xb6ed4464 in g_task_return_now (task=0x152d400) at ../gio/gtask.c:1230
#8 0xb6ed4d06 in g_task_return (task=0x152d400, type=) at ../gio/gtask.c:1299
#9 0xb6ed5340 in g_task_return (type=G_TASK_RETURN_SUCCESS, task=) at ../gio/gtask.c:1839
#10 g_task_return_boolean (task=, result=) at ../gio/gtask.c:1843
#11 0xb6f1b1b4 in init_second_async_cb (source_object=0x158fe48, res=0x1581348, user_data=0x152d400) at ../gio/gdbusproxy.c:1776
#12 0xb6ed4464 in g_task_return_now (task=0x1581348) at ../gio/gtask.c:1230
#13 0xb6ed4d06 in g_task_return (task=0x1581348, type=) at ../gio/gtask.c:1299
#14 0xb6ed50f4 in g_task_return (type=G_TASK_RETURN_SUCCESS, task=) at ../gio/gtask.c:1726
#15 g_task_return_pointer (task=, result=, result_destroy=) at ../gio/gtask.c:1731
#16 0xb6f1aab8 in async_init_get_all_cb (connection=, res=, user_data=0x1581348) at ../gio/gdbusproxy.c:1404
#17 0xb6ed4464 in g_task_return_now (task=0xb6002480) at ../gio/gtask.c:1230
#18 0xb6ed4d06 in g_task_return (task=0xb6002480, type=) at ../gio/gtask.c:1299
#19 0xb6ed50f4 in g_task_return (type=G_TASK_RETURN_SUCCESS, task=) at ../gio/gtask.c:1726
#20 g_task_return_pointer (task=, result=, result_destroy=) at ../gio/gtask.c:1731
#21 0xb6f12e72 in g_dbus_connection_call_done (source=, result=0x152d4f0, user_data=0xb6002480) at ../gio/gdbusconnection.c:5879
#22 0xb6ed4464 in g_task_return_now (task=0x152d4f0) at ../gio/gtask.c:1230
#23 0xb6ed4498 in complete_in_idle_cb (task=0x152d4f0) at ../gio/gtask.c:1244
#24 0xb6d48f12 in g_main_dispatch (context=0x14cbac0) at ../glib/gmain.c:3417
#25 g_main_context_dispatch (context=context@entry=0x14cbac0) at ../glib/gmain.c:4135
#26 0xb6d49180 in g_main_context_iterate (context=0x14cbac0, block=block@entry=1, dispatch=dispatch@entry=1, self=) at ../glib/gmain.c:4211
#27 0xb6d49434 in g_main_loop_run (loop=0x14cb098) at ../glib/gmain.c:4411
#28 0x00023d8c in main (argc=, argv=) at src/main.c:1028

@monich
Copy link
Member Author

monich commented Jan 13, 2023

Ah, it's parsing bss rather than interface caps. Thanks, will update the PR.

@pvuorela
Copy link
Contributor

Looking more closely gsupplicant_bss_parse_wpa from the backtrace, looks like there's a third (!) mapping on gsupplicant_bss.c:484

@monich
Copy link
Member Author

monich commented Jan 13, 2023

Right. There are three KeyMgmt maps in https://w1.fi/wpa_supplicant/devel/dbus.html and since the code is mirroring that, three sounds like the right number. Unfortunately the spec doesn't seem to be up to date, I'll have to dig through the wpa_supplicant code. Or just use the same mapping for all cases. I haven't made up my mind yet.

@monich
Copy link
Member Author

monich commented Jan 13, 2023

I have decided to use the same mapping for all cases. Does that fix the problem?

@monich
Copy link
Member Author

monich commented Jan 13, 2023

And reuse GSUPPLICANT_CIPHER map too.

Copy link
Contributor

@pvuorela pvuorela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now the sae warning is gone, but this one getting printed a lot:
[gsupplicant] WARNING! Unexpected Group value

@monich
Copy link
Member Author

monich commented Jan 16, 2023

I have to admit that I didn't test the changes on a real device 😐 Will do.

@monich
Copy link
Member Author

monich commented Jan 16, 2023

Now it should become silent

Copy link
Contributor

@pvuorela pvuorela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good now. Thanks.

@monich monich merged commit 9f11630 into sailfishos:master Jan 17, 2023
@monich monich deleted the sae branch January 17, 2023 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants