Commit graph

4870 commits

Author SHA1 Message Date
Jo-Philipp Wich
9fcdf0fe81 libs/web: introduce recursive expression support for datatypes, introduce "or" and "and" datatypes
The commit adds a recursive parser for datatype expressions which allows nesting of validators,
this allows for complex expressions like  "list(or(range(0,65535),'infinite'))" to allow a list of
values which are either integers between 0 and 65535 or the literal string "inifinite".
That change also deprecates combined datatypes like "ipaddr" ["or(ip4addr,ip6addr)"] or
"host" ["or(hostname,ip4addr,ip6addr)"]
2012-01-08 23:33:47 +00:00
Jo-Philipp Wich
3812f29087 libs/web: remove neg_ipaddr, neg_ip4addr and neg_network_ip4addr datatypes, can be represented with neg(type) 2012-01-07 22:06:02 +00:00
Jo-Philipp Wich
e4dc649e82 applications/luci-firewall: fix datatype validation for masq src/dest; allow list of negated ucinames, hostnames, ip-ranges or -addresses 2012-01-07 21:55:52 +00:00
Jo-Philipp Wich
c043db6518 modules/admin-full: set password of logged in user instead of unconditionally using root, thanks Viktar Palstsiuk <viktar.palstsiuk@promwad.com> 2012-01-06 16:42:02 +00:00
Jo-Philipp Wich
1e0e458ff3 modules/admin-full: fix wireless interface removal if not network was assigned to the iface, thanks Viktar Palstsiuk <viktar.palstsiuk@promwad.com> 2012-01-06 16:28:54 +00:00
Translation System
862176ee07 Commit from LuCI Translation Portal by user jow.: 74 of 154 messages translated (0 fuzzy). 2012-01-06 13:32:48 +00:00
Translation System
82dd97b79d Commit from LuCI Translation Portal by user jow.: 6 of 812 messages translated (0 fuzzy). 2012-01-06 13:32:45 +00:00
Jo-Philipp Wich
0b547cf6b4 build: only consider directories containing a Makefile, fixes compilation crashes if a file or empty directory exists in modules/, applications/ etc. 2012-01-05 19:21:07 +00:00
Translation System
a4b9126070 Commit from LuCI Translation Portal by user jow.: 117 of 154 messages translated (0 fuzzy). 2012-01-01 17:33:55 +00:00
Translation System
078bf3dbd1 Commit from LuCI Translation Portal by user jow.: 788 of 812 messages translated (0 fuzzy). 2012-01-01 17:33:52 +00:00
Jo-Philipp Wich
ef65fbd9dc modules/admin-full: make luci-bwc dlopen() libiwinfo.so instead of lua/iwinfo.so 2012-01-01 17:20:16 +00:00
Jo-Philipp Wich
481cd6feb7 libs/core: remove various uses of global vars in luci.ip 2012-01-01 15:51:37 +00:00
Jo-Philipp Wich
07e06f185a themes/openwrt: fix input placeholder color for firefox, add css for internet explorer 2012-01-01 15:41:16 +00:00
Jo-Philipp Wich
0ce6a286f7 applications/luci-firewall: fix crash in rule formatting helper when a rule with an /128 ipv6 prefix is encountered 2012-01-01 15:31:25 +00:00
Jo-Philipp Wich
706eb828ad modules/admin-full: allow space separated lists of macs in static lease form (#319) 2012-01-01 14:43:56 +00:00
Jo-Philipp Wich
33e088dd9d protocols/6x4: fix turning off 6ro4 advertising on all interfaces 2011-12-26 16:11:15 +00:00
Translation System
5b948f58ca Commit from LuCI Translation Portal by user jow.: 116 of 154 messages translated (0 fuzzy). 2011-12-22 19:05:30 +00:00
Jo-Philipp Wich
28426c25fc modules/admin-full: fix crypto depends for ad-hoc and static wds modes (#271) 2011-12-21 22:41:44 +00:00
Jo-Philipp Wich
45d604fea3 modules/admin-core: use luci.model.uci.apply() in service control to restart dependencies of the current config as well 2011-12-20 19:04:04 +00:00
Jo-Philipp Wich
574eff4e8e libs/core: rework luci.model.uci.apply() to return the commandline as table, suitable for passing to nixio.exec() 2011-12-20 19:02:14 +00:00
Jo-Philipp Wich
79231d68be modules/admin-core: fix apply actions for configs with hyphens or underscore in the name 2011-12-20 18:31:47 +00:00
Jo-Philipp Wich
3553d308f6 [PATCH] Naive fix for bug #208
For SimpleSection, use the section name (always "1") instead of the
section type in the CBI-like string used to identify the upload.  This
allows upload fields to be placed in SimpleSections.  The fix changes a
minimal number of lines, but does introduce some unnecessary confusion,
it may or may not be better than a more thorough/invasive fix.

Set the enctype for the form element in the simpleform view to be
multipart/form-data because the default
application/x-www-form-urlencoded does not support input files.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2011-12-20 17:52:10 +00:00
Jo-Philipp Wich
8358175f25 libs/web: show input/forward hints in zonelist widget only if bnoth allowany and allowlocal are enabled 2011-12-20 17:51:44 +00:00
Jo-Philipp Wich
abb201ab57 modules/admin-full: reuse sysupgrade facilities to create backup archive 2011-12-20 17:35:50 +00:00
Jo-Philipp Wich
5e4d4ff5ef themes: add essential CSS class to other themes as well 2011-12-20 15:24:14 +00:00
Jo-Philipp Wich
4988cc6b59 applications/luci-firewall: fix wrong location of cbi templates 2011-12-20 15:09:38 +00:00
Jo-Philipp Wich
b89300eb67 libs/web: prevent break between action buttons in tblsection template 2011-12-20 03:57:40 +00:00
Jo-Philipp Wich
187212326d po: resync firewall translation 2011-12-20 03:19:13 +00:00
Jo-Philipp Wich
0f71faaf34 applications/luci-firewall: use option "name" instead of deprecated "_name", expose "extra" option, add enable/disable toggles for portforwards, snats and rules 2011-12-20 03:14:54 +00:00
Jo-Philipp Wich
48838ea0f7 libs/web: fix placeholder attribute for DynList 2011-12-20 03:00:17 +00:00
Jo-Philipp Wich
161218a576 libs/web: fix undesired autofocus of DynamicList widget 2011-12-20 02:56:03 +00:00
Jo-Philipp Wich
6ae669da06 libs/web: improve ip6addr datype validation, accept both CIDR and IP/Mask notation 2011-12-20 02:44:32 +00:00
Jo-Philipp Wich
78332ec723 po: update firewall translations 2011-12-20 00:16:32 +00:00
Jo-Philipp Wich
5de0c58bd9 applications/luci-firewall: make rule descriptions fully translateable 2011-12-20 00:08:07 +00:00
Translation System
50380b9fb6 Commit from LuCI Translation Portal by user jow.: 10 of 222 messages translated (0 fuzzy). 2011-12-19 21:53:30 +00:00
Jo-Philipp Wich
d942285d01 themes/openwrt: add some new CSS classes used by firewall ui 2011-12-19 21:20:57 +00:00
Jo-Philipp Wich
accf14f88d po: resync firewall translation 2011-12-19 21:17:33 +00:00
Jo-Philipp Wich
033de64a0f applications/luci-firewall: complete rework firewall ui
- split zone setup, port forwards, traffic rules and firewall.user
	- add quickadd forms for various common rules like port forwards
	- add tool class for textual formatting and descriptions of rules
	- simplify controller, remove old mini admin remainders
2011-12-19 21:16:31 +00:00
Jo-Philipp Wich
24c4cce3ae libs/web: add "any" option to firewall_zonelist widget 2011-12-19 20:09:20 +00:00
Jo-Philipp Wich
21a0fcc4c1 libs/web: rework DynamicList widget to support dynamic lists composed of comboboxes 2011-12-19 18:55:59 +00:00
Jo-Philipp Wich
375a476d27 libs/web: rework hostname match to not allow arbritary sequences of numbers and dots 2011-12-16 06:05:51 +00:00
Jo-Philipp Wich
3a0905f21c libs/web: add list(...) datatype for space separated lists of arbritary datatypes 2011-12-16 05:52:24 +00:00
Jo-Philipp Wich
ca7bc48ebc [PATCH] Abstract address UNIX sockets not binding properly (by capnbry@gmail.com, #366)
In #274, I stated abstract namespace and autobound abstract namespace datagram UNIX domain sockets work perfectly with nixio. However, I may have jumped the gun on that conclusion. Turns out they work perfectly for only one 
concurrent connection.

The problem is that when binding to an abstract address socket, which begins with a NULL byte, nixio strncpy's the name into the sockaddr_un structure, which effectively copies nothing. It then binds to an address of 180 NULLs, 
which is completely legal, but obviously you run into problems when a second client tries to bind to the same address.

The rules are as follows ( http://linux.die.net/man/7/unix) for the names:

  * If the name is blank, bind() should pass that the addrlen of sizeof(sa_family_t) and Linux will autobind a name that begins with null and is followed by 5 digits.
  * If the first character of the name is non-null, the name is a pathname and is null-terminated. addrlen should be sizeof(sockaddr_un), but the length can also be the pathname len + sizeof(sa_family_t) as the value will be 
null-terminated by the kernel unix socket driver
  * If the first character is null, the address is abstract and the value should not be null-terminated and addrlen is pathname + sizeof(sa_family_t) 

The attached patch fixes bind/connect/sendto by shortening the addrlen passed to be pathname len + sizeof(sa_family_t), which generates the correct socket names for all 3 cases above.
It also fixes the address returned by recvfrom, which currently returns a blank string for any abstract address socket (as they begin with a null).
2011-12-16 02:10:37 +00:00
Jo-Philipp Wich
5c1ef9a0a6 applications/luci-firewall: allow negated uci identifiers, hostnames and ip addresses in zone masq src/dest fields 2011-12-16 01:25:07 +00:00
Jo-Philipp Wich
757e9c2f1c libs/web: add missing parts of previous commit 2011-12-16 01:18:34 +00:00
Jo-Philipp Wich
cdcfb5502b libs/web: implement "network" cbi datatype 2011-12-16 01:18:15 +00:00
Translation System
286a822e7f Commit from LuCI Translation Portal by user jow.: 60 of 108 messages translated (0 fuzzy). 2011-12-14 15:59:26 +00:00
Translation System
19539313b4 Commit from LuCI Translation Portal by user jow.: 8 of 222 messages translated (0 fuzzy). 2011-12-14 15:58:50 +00:00
Jo-Philipp Wich
a8024bc0da applications/luci-statistics: add iwinfo config 2011-12-14 15:48:59 +00:00
Jo-Philipp Wich
c5811d52d0 libs/web: allow one-character hostnames 2011-12-14 15:01:54 +00:00