+function newproto.write(self, section, value)
+ local name = newnet:formvalue(section)
+ if name and #name > 0 then
+ local br = (netbridge:formvalue(section) == "1") and "bridge" or nil
+ local net = nw:add_network(name, { proto = value, type = br })
+ if net then
+ local ifn
+ for ifn in utl.imatch(
+ br and mifname:formvalue(section) or sifname:formvalue(section)
+ ) do
+ net:add_interface(ifn)
+ end
+ nw:save("network")
+ nw:save("wireless")
+ end
+ luci.http.redirect(luci.dispatcher.build_url("admin/network/network", name))