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

lime-proto-batadv change MAC also of wlan interfaces #820

Merged
merged 1 commit into from
Dec 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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