1 local uci = require "luci.model.uci"
2 local cursor = uci.cursor()
4 if not cursor:get("qos", "wan", "_niuinit") then
5 -- Load some more sensible default classifications
6 cursor:delete_all("qos", "classify")
7 cursor:section("qos", "classify", "dns",
8 {target = "Priority", ports = "53", _name = "DNS"}
10 cursor:section("qos", "classify", "inet1",
11 {target = "Normal", ports = "20,21,22,80,443", _name = "WWW, SSH, FTP"}
13 cursor:section("qos", "classify", "inet2",
14 {target = "Normal", ports = "25,110,119,143", _name = "E-Mail, News"}
17 cursor:set("qos", "wan", "_niuinit", "1")
26 d:add("qos1", load("niu/traffic/qos1"))
28 function d.on_cancel()