Skip to content

Commit

Permalink
Match also ifname with multiple digit number like eth11
Browse files Browse the repository at this point in the history
  • Loading branch information
G10h4ck committed Nov 9, 2014
1 parent 83e5a2d commit 9fd15dc
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/lime-proto-batadv/src/batadv.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ local utils = require("lime.utils")
batadv = {}

function batadv.setup_interface(ifname, args)
if ifname:match("^wlan%d_ap") then return end
if ifname:match("^wlan%d+_ap") then return end
local vlanId = args[2] or "%N1"
local vlanProto = args[3] or "8021ad"
local nameSuffix = args[4] or "_batadv"
Expand Down
2 changes: 1 addition & 1 deletion packages/lime-proto-bmx6/src/bmx6.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ local wireless = require("lime.wireless")
bmx6 = {}

function bmx6.setup_interface(ifname, args)
if ifname:match("^wlan%d_ap") then return end
if ifname:match("^wlan%d+_ap") then return end
vlanId = args[2] or 13
vlanProto = args[3] or "8021ad"
nameSuffix = args[4] or "_bmx6"
Expand Down
6 changes: 3 additions & 3 deletions packages/lime-proto-eigennet/src/eigennet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ local libuci = require("uci")
eigennet = {}

function eigennet.setup_interface(ifname, args)
if ifname:match("^wlan%d_ap") then return end
if ifname:match("^wlan%d+_ap") then return end

if ifname:match("^eth%d$") then
if ifname:match("^eth%d+$") then
args[2] = args[2] or 10
args[3] = args[3] or "8021q"
args[4] = args[4] or "_eigennet"
Expand All @@ -18,7 +18,7 @@ function eigennet.setup_interface(ifname, args)
return
end

if ifname:match("^wlan%d_adhoc$") then
if ifname:match("^wlan%d+_adhoc$") then
local owrtInterfaceName = network.limeIfNamePrefix..ifname

local uci = libuci:cursor()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ local adhoc = {}
function adhoc.configure(args) end

function adhoc.setup_interface(ifname, args)
if ifname:match("^wlan%d_"..adhoc_mode.wifi_mode) then
if ifname:match("^wlan%d+_"..adhoc_mode.wifi_mode) then
local libuci = require "uci"
local uci = libuci:cursor()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ local ieee80211s = {}
function ieee80211s.configure(args) end

function ieee80211s.setup_interface(ifname, args)
if ifname:match("^wlan%d_"..ieee80211s_mode.wifi_mode) then
if ifname:match("^wlan%d+_"..ieee80211s_mode.wifi_mode) then
local libuci = require "uci"
local uci = libuci:cursor()

Expand Down

0 comments on commit 9fd15dc

Please sign in to comment.