[FS#125] netifd : Random MAC on interfaces instead from bridge

LEDE Bugs lede-bugs at lists.infradead.org
Mon Aug 29 23:31:36 PDT 2016


A new Flyspray task has been opened.  Details are below. 

User who did this - geek0007 (geek0007) 

Attached to Project - LEDE Project
Summary - netifd : Random MAC on interfaces instead from bridge
Task Type - Bug Report
Category - Packages
Status - Unconfirmed
Assigned To - 
Operating System - All
Severity - Critical
Priority - Very Low
Reported Version - All
Due in Version - Undecided
Due Date - Undecided
Details - Environment: CC 15.05.1 RAMIPS(Mediatek) MT7621A SoC

**Description:**

LAN bridge br-lan => eth0.3 eth0.4 eth0.5 eth0.6
WAN bridge br-wan => eth0.2

**#cat /etc/config/network**

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd7f:4a91:b9ee::/48'

config interface 'lan'
        option ifname 'eth0.3 eth0.4 eth0.5 eth0.6'
        option force_link '1'
        option macaddr '00:60:2F:3b:99:97'
        option type 'bridge'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '192.168.2.254'

config interface 'wan'
        option ifname 'eth0.2'
        option force_link '1'
        option macaddr '00:60:2F:3B:99:96'
        option proto 'dhcp'
        option type 'bridge'

config interface 'wan6'
        option ifname 'eth0.2'
        option proto 'dhcpv6'

but 

root at openwrt:/# ifconfig | grep HWaddr
br-lan    Link encap:Ethernet  HWaddr 00:60:2F:3B:99:97  
br-wan    Link encap:Ethernet  HWaddr 00:60:2F:3B:99:96  
eth0      Link encap:Ethernet  HWaddr A2:FB:75:24:9C:FB  
eth0.2    Link encap:Ethernet  HWaddr A2:FB:75:24:9C:FB
eth0.3    Link encap:Ethernet  HWaddr A2:FB:75:24:9C:FB  
eth0.4    Link encap:Ethernet  HWaddr A2:FB:75:24:9C:FB  
eth0.5    Link encap:Ethernet  HWaddr A2:FB:75:24:9C:FB  
eth0.6    Link encap:Ethernet  HWaddr A2:FB:75:24:9C:FB  

eth0, eth0.2, eth0.3, eth0.4, eth0.5, eth0.6 MAC address is random and changes for every boot.

netifd is too far complex for the simple setting in shell scripts in earlier versions.

This is persistent and difficult to trace and fix.
I guess this is netifd bug and should exists for all SoC supported.
I am still working on netifd tracing and bug fixing.

**logread:**

root at openwrt:/# logread | grep netifd
Mon Aug 29 06:51:29 2016 daemon.notice netifd: interface set main dev: 
Mon Aug 29 06:51:29 2016 daemon.notice netifd: interface set device config: (null)
Mon Aug 29 06:51:29 2016 daemon.notice netifd: interface set main dev: 
Mon Aug 29 06:51:29 2016 daemon.notice netifd: interface set device config: (null)
Mon Aug 29 06:51:29 2016 daemon.notice netifd: interface set main dev: 
Mon Aug 29 06:51:29 2016 daemon.notice netifd: Interface 'lan' is enabled
Mon Aug 29 06:51:29 2016 daemon.notice netifd: Interface 'lan' is setting up now
Mon Aug 29 06:51:29 2016 daemon.notice netifd: Interface 'lan' is now up
Mon Aug 29 06:51:30 2016 daemon.notice netifd: Interface 'wan6' is enabled
Mon Aug 29 06:51:30 2016 daemon.notice netifd: Interface 'wan' is enabled
Mon Aug 29 06:51:30 2016 daemon.notice netifd: Interface 'wan' is setting up now
Mon Aug 29 06:51:30 2016 daemon.notice netifd: Interface 'loopback' is enabled
Mon Aug 29 06:51:30 2016 daemon.notice netifd: Interface 'loopback' is setting up now
Mon Aug 29 06:51:30 2016 daemon.notice netifd: Interface 'loopback' is now up
Mon Aug 29 06:51:30 2016 daemon.notice netifd: Bridge 'br-lan' link is up
Mon Aug 29 06:51:30 2016 daemon.notice netifd: Interface 'lan' has link connectivity 
Mon Aug 29 06:51:30 2016 daemon.notice netifd: Network device 'eth0' link is up
Mon Aug 29 06:51:30 2016 daemon.notice netifd: VLAN 'eth0.3' link is up
Mon Aug 29 06:51:30 2016 daemon.notice netifd: VLAN 'eth0.4' link is up
Mon Aug 29 06:51:30 2016 daemon.notice netifd: VLAN 'eth0.5' link is up
Mon Aug 29 06:51:30 2016 daemon.notice netifd: VLAN 'eth0.6' link is up
Mon Aug 29 06:51:30 2016 daemon.notice netifd: Bridge 'br-wan' link is up
Mon Aug 29 06:51:30 2016 daemon.notice netifd: Interface 'wan' has link connectivity 
Mon Aug 29 06:51:30 2016 daemon.notice netifd: VLAN 'eth0.2' link is up
Mon Aug 29 06:51:30 2016 daemon.notice netifd: Interface 'wan6' has link connectivity 
Mon Aug 29 06:51:30 2016 daemon.notice netifd: Interface 'wan6' is setting up now
Mon Aug 29 06:51:30 2016 daemon.notice netifd: Network device 'lo' link is up
Mon Aug 29 06:51:30 2016 daemon.notice netifd: Interface 'loopback' has link connectivity 
Mon Aug 29 06:51:31 2016 daemon.notice netifd: wan (2093): udhcpc (v1.23.2) started
Mon Aug 29 06:51:31 2016 daemon.notice netifd: VLAN 'eth0.2' link is down
Mon Aug 29 06:51:31 2016 daemon.notice netifd: Interface 'wan6' has link connectivity loss
Mon Aug 29 06:51:31 2016 daemon.notice netifd: VLAN 'eth0.2' link is up
Mon Aug 29 06:51:31 2016 daemon.notice netifd: Interface 'wan6' has link connectivity 
Mon Aug 29 06:51:31 2016 daemon.notice netifd: Interface 'wan6' is setting up now
Mon Aug 29 06:51:31 2016 daemon.notice netifd: wan6 (2099): Command failed: Permission denied
Mon Aug 29 06:51:31 2016 daemon.notice netifd: wan (2093): Sending discover...
Mon Aug 29 06:51:31 2016 daemon.notice netifd: wan (2093): Performing a DHCP renew
Mon Aug 29 06:51:31 2016 daemon.notice netifd: wan (2093): Sending discover...
Mon Aug 29 06:51:32 2016 daemon.notice netifd: Interface 'wan6' is now down
Mon Aug 29 06:51:32 2016 daemon.notice netifd: Interface 'wan6' is setting up now
Mon Aug 29 06:51:34 2016 daemon.notice netifd: wan (2093): Sending discover..

More information can be found at the following URL:
https://bugs.lede-project.org/index.php?do=details&task_id=125



More information about the lede-bugs mailing list