sysprog21 / vwifi

A virtual wireless device driver for Linux
MIT License
203 stars 39 forks source link

Fix wrong cfg80211->get_station implementation #26

Closed qqgnoe466263 closed 2 years ago

qqgnoe466263 commented 2 years ago

Fix command failed by using "iw dev xxx link".

This is a failed demonstration:

Connected to aa:b7:12:fd:11:77 (on owl0) SSID: TestAP freq: 2437 command failed: No such file or directory (-2)

jserv commented 2 years ago

Yes, you are right, I misunderstood get_station. And this problem can be fixed when I use real MAC to start AP. Thank you for your detailed explanation!

How about abandoning this pull request?

qqgnoe466263 commented 2 years ago

After thinking, i still feel that "get_station" can discuss and check. So I still discuss with @rickywu0421. And I'll check soon if this modification is not appropriate.

rickywu0421 commented 2 years ago

After thinking, i still feel that "get_station" can discuss and check. So I still discuss with @rickywu0421. And I'll check soon if this modification is not appropriate.

Yep, @qqgnoe466263 found that get_station() only do search when the parameter const u8 mac is the same as AP, I think it might be a security-based issue.

rickywu0421 commented 2 years ago

Yes, you are right, I misunderstood get_station. And this problem can be fixed when I use real MAC to start AP. Thank you for your detailed explanation!

How about abandoning this pull request?

I think we could split this PR into two. One for changing get_station(), and another for fixing the error like the title mentioned (the error comes from informing kernel with a fake BSSID).

jserv commented 2 years ago

Thank @qqgnoe466263 for contributing!