Skip to content

Commit

Permalink
Merge pull request #820 from ilario/batadv-mac-wlan
Browse files Browse the repository at this point in the history
lime-proto-batadv change MAC also of wlan interfaces
  • Loading branch information
spiccinini authored Dec 22, 2020
2 parents decaa38 + 99112c5 commit 700d545
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions packages/lime-proto-batadv/files/usr/lib/lua/lime/proto/batadv.lua
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,20 @@ function batadv.setup_interface(ifname, args)
--! TODO: Use DSA to check if ethernet device is capable of bigger MTU
--! reducing it
mtu = network.MTU_ETH_WITH_VLAN

--! Avoid dmesg flooding caused by BLA with messages like "br-lan:
--! received packet on bat0 with own address as source address".
--! Tweak MAC address for each of the interfaces used by Batman-adv
--! 00 + Locally administered unicast .. 2 bytes from interface name
--! .. 3 bytes from main interface
local id = utils.get_id(ifname)
local vMacaddr = network.primary_mac();
vMacaddr[1] = "02"
vMacaddr[2] = id[2]
vMacaddr[3] = id[3]
uci:set("network", owrtDeviceName, "macaddr", table.concat(vMacaddr, ":"))
end

--! Avoid dmesg flooding caused by BLA with messages like "br-lan:
--! received packet on bat0 with own address as source address".
--! Tweak MAC address for each of the interfaces used by Batman-adv
--! 00 + Locally administered unicast .. 2 bytes from interface name
--! .. 3 bytes from main interface
local id = utils.get_id(ifname)
local vMacaddr = network.primary_mac();
vMacaddr[1] = "02"
vMacaddr[2] = id[2]
vMacaddr[3] = id[3]
uci:set("network", owrtDeviceName, "macaddr", table.concat(vMacaddr, ":"))

uci:set("network", owrtDeviceName, "mtu", mtu)
uci:save("network")
end
Expand Down

0 comments on commit 700d545

Please sign in to comment.