garywill / linux-router

Set Linux as router in one command. Support Internet sharing, redsocks, Wifi hotspot, IPv6. Can also be used for routing VM/containers 🛰️
GNU Lesser General Public License v2.1
1.73k stars 153 forks source link

iw version 6.7 prints frequency differently #67

Closed kphanipavan closed 8 months ago

kphanipavan commented 9 months ago

Screenshot_20240107_090134

Current frequency taken from iw now prints differently now, as shown above.

Changes related to that is shown in the diff: https://fossies.org/diffs/iw/5.19_vs_6.7/info.c-diff.html

The number after the dot is the frequency offset. The awk script requires changes to handle this. Below is the error thrown currently.

Screenshot_20240107_090503

~Pvn

kphanipavan commented 9 months ago

Before: image

After, using cut: Screenshot_20240107_091341

~Works on my end~


can_transmit_to_channel() at line 627 also needs changes. The program is dying with cannot transmit error.

garywill commented 9 months ago

Thank you for reporting. We should take reaction to that change.

I'm still using a distro that using iw 4.9. So are you or anyone willing to make a PR?

petebueh commented 9 months ago

I copied the changes from this commit from linux-wifi-hotspot: https://github.com/lakinduakash/linux-wifi-hotspot/commit/2dc1649add81854b79903dd16d59fcbbfa2fd8d3

This works for my AP

garywill commented 8 months ago

https://github.com/garywill/linux-router/commit/32f168ec8c9a69e022ae97d3bfd113fe088626d6 I made can_transmit_to_channel() ignores freq value and just focus on channel number

grep -E " [0-9]+(\.[0-9]+){0,1} MHz \[${CHANNEL_NUM}\]"