Skip to content

Commit

Permalink
babeld revert addition of check for numeric vlanId and force it to be…
Browse files Browse the repository at this point in the history
… numeric
  • Loading branch information
ilario committed Oct 21, 2019
1 parent 0196d83 commit 3624b2c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function babeld.setup_interface(ifname, args)

utils.log("lime.proto.babeld.setup_interface(...)", ifname)

local vlanId = args[2] or 17
local vlanId = tonumber(args[2]) or 17
local vlanProto = args[3] or "8021ad"
local nameSuffix = args[4] or "_babeld"

Expand Down Expand Up @@ -144,7 +144,7 @@ function babeld.setup_interface(ifname, args)
end
end

if tonumber(vlanId) == 0 and isIntoLAN then
if vlanId == 0 and isIntoLAN then
utils.log("Rather than "..ifname..
", adding br-lan into Babeld interfaces")
ifname = "br-lan"
Expand All @@ -157,7 +157,7 @@ function babeld.setup_interface(ifname, args)

local uci = config.get_uci_cursor()

if tonumber(vlanId) ~= 0 and ifname:match("^eth") then
if(vlanId ~= 0 and ifname:match("^eth")) then
uci:set("network", owrtDeviceName, "mtu", tostring(network.MTU_ETH_WITH_VLAN))
end

Expand Down

0 comments on commit 3624b2c

Please sign in to comment.