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

FS#451 - ipq806x: random mac is assigned to WiFi phys #5495

Closed
openwrt-bot opened this issue Feb 1, 2017 · 6 comments
Closed

FS#451 - ipq806x: random mac is assigned to WiFi phys #5495

openwrt-bot opened this issue Feb 1, 2017 · 6 comments
Labels

Comments

@openwrt-bot
Copy link

dissent1:

Noticed on C2600 and R7800, probably others are affected as well.

Mac address on ipq806x targets is assigned by https://git.lede-project.org/?p=source.git;a=blob;f=target/linux/ipq806x/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac

This script doesn't seem to trigger, because wifi phys get random mac addresses.

@openwrt-bot
Copy link
Author

mkresin:

Hey Pavel,

am I right that it worked for you back in the days? If yes, any chance that you do a git bisect to check which commit introduced the issue? I can not see something obvious wrong and don't have a ipq806x board to test it on my own.

@openwrt-bot
Copy link
Author

hnyman:

It seems to have broken down in January 2017, before 22th.

I tested with my R7800 my archive of month-end builds, and:

MAC ok: r2708-39d3a4117b-20161230
random: r3064-f798776188-20170122
random: r3189-12db207e9b-20170128

I will look for suspicious changes between r2708 and r3064...

@openwrt-bot
Copy link
Author

hnyman:

Looks like it is the commit 71a39b8

https://git.lede-project.org/?p=source.git;a=commitdiff;h=71a39b869019c97f48bc85d9a8fabceead217d07;hp=2a7f669016f2faa29d64a59252556b96a55d071a

Specifically the change to 10_fix_wifi_mac script.

I tested with a live R7800 running up-to-date r3285-1a52d11d38

  • reverting commit 71a39b8 with "patch -R" fixed MACs
  • applying the change for 11-ath10k-caldata still produced ok MAC
  • applying the change for 10_fix_wifi_mac caused random MAC

Possibly some sneaky whitespace error, or such.

EDIT:
I found it:
extra TAB char after the backslash on the line with 7500v2
" r7500v2 |\ "
Deleting that tab fixes MACs

Line 19:
https://git.lede-project.org/?p=source.git;a=blob;f=target/linux/ipq806x/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac;hb=HEAD#l19

@openwrt-bot
Copy link
Author

mkresin:

Wow, I had never expected that a trailing tab can cause such issues. Hannu, would it be possible that you send a patch that references this bugreport.

@openwrt-bot
Copy link
Author

hnyman:

Pull request submitted as
lede-project/source#777

Note that the patch is needed also for 17.01.

@openwrt-bot
Copy link
Author

hnyman:

I had never expected that a trailing tab can cause such issues

That surprised also me, but it is actually perfectly logical (as then the TAB is the next char to be ignored, not the subsequent newline).

That seems to be also mentioned in some shell script resources:

For example:
http://linuxcommand.org/wss0060.php

Note that for this trick to work, the newline must be typed immediately after the backslash. If you put a space after the backslash, the space will be ignored, not the newline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant