OpenWrt/LEDE Project

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bug Report
  • Category Base system
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by dissent1 - 01.02.2017
Last edited by Mathias Kresin - 03.02.2017

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

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.

Closed by  Mathias Kresin
03.02.2017 19:29
Reason for closing:  Fixed
Additional comments about closing:  

Fixed with ht tps://git.lede-project.org/c9801475270db 2faf93b7da750da8117cad240d2 and backported to the 17.01 branch.

Project Manager
Mathias Kresin commented on 03.02.2017 11:09

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.

Hannu Nyman commented on 03.02.2017 12:23

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...

Hannu Nyman commented on 03.02.2017 12:59

Looks like it is the commit 71a39b869019c97f48bc85d9a8fabceead217d07

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 71a39b86901 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

Project Manager
Mathias Kresin commented on 03.02.2017 13:05

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.

Hannu Nyman commented on 03.02.2017 13:21

Pull request submitted as
https://github.com/lede-project/source/pull/777

Note that the patch is needed also for 17.01.

Hannu Nyman commented on 03.02.2017 13:35
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.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing