Changeset 5425
- Timestamp:
- 10/27/09 22:34:06 (4 years ago)
- Location:
- luci/trunk/libs/core/luasrc/model
- Files:
-
- 3 modified
-
firewall.lua (modified) (2 diffs)
-
network.lua (modified) (1 diff)
-
network/wireless.lua (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
luci/trunk/libs/core/luasrc/model/firewall.lua
r5388 r5425 235 235 src = self:name(), 236 236 dest = dest, 237 mtu_fix = with_mtu_fix and true or false237 mtu_fix = with_mtu_fix and "1" or "0" 238 238 }) 239 239 return s and forwarding(s) … … 253 253 src = src, 254 254 dest = self:name(), 255 mtu_fix = with_mtu_fix and true or false255 mtu_fix = with_mtu_fix and "1" or "0" 256 256 }) 257 257 return s and forwarding(s) 258 258 end 259 end 260 261 function zone.del_forwardings_by(self, what) 262 local name = self:name() 263 ub.uci:foreach("firewall", "forwarding", 264 function(s) 265 if s.src and s.dest and s[what] == name then 266 ub.uci:delete("firewall", s['.name']) 267 end 268 end) 259 269 end 260 270 -
luci/trunk/libs/core/luasrc/model/network.lua
r5405 r5425 218 218 219 219 function get_interface(self, i) 220 return ifs[i] and interface(i) 220 if ifs[i] then 221 return interface(i) 222 else 223 local j 224 for j, _ in pairs(ifs) do 225 if ifs[j].sid == i then 226 return interface(j) 227 end 228 end 229 end 221 230 end 222 231 -
luci/trunk/libs/core/luasrc/model/network/wireless.lua
r5405 r5425 45 45 local device = s.device or "wlan0" 46 46 local state = st:get_all("wireless", s['.name']) 47 local name = state.ifname ordevice .. ".network" .. count47 local name = device .. ".network" .. count 48 48 49 ifs[ state and state.ifname orname] = {49 ifs[name] = { 50 50 idx = count, 51 name = state and state.ifname orname,51 name = name, 52 52 rawname = state and state.ifname or name, 53 53 flags = { },
