Commit graph

1514 commits

Author SHA1 Message Date
Jo-Philipp Wich
668f8ed7a0 luci-0.11: backport r10529 2014-09-18 09:34:05 +00:00
Jo-Philipp Wich
31daa1b90d luci-0.11: libs/sgi-uhttpd: ensure to send proper EOF under uhttpd v1 - fixes chromium compatibility 2014-07-04 14:40:44 +00:00
Steven Barth
9e4f42001c Add support for stateful DHCPv6 2013-06-24 12:01:11 +00:00
Steven Barth
6e7fb14afc libs/core: fallback to ipv6-prefix-assignment if ipv6-address is empty 2013-06-24 12:00:33 +00:00
Steven Barth
627191c701 libs/web: support dependencies on mvalues 2013-06-24 12:00:20 +00:00
Steven Barth
c203f084bd move dhcpv6 support into luci-proto-6x4, rename luci-proto-6x4 to luci-proto-ipv6 2013-06-24 12:00:15 +00:00
Steven Barth
cd35191cbb New IPv6 integration 2013-06-24 11:59:57 +00:00
Jo-Philipp Wich
adc4c2932e luci-0.11: merge r9648, r9649 and r9654 2013-01-27 18:43:41 +00:00
Jo-Philipp Wich
03ed541b76 luci-0.11: merge r9571 - r9622 2013-01-18 14:08:37 +00:00
Jo-Philipp Wich
60b81d978a luci-0.11: merge r9559 - r9569 2012-12-25 02:45:42 +00:00
Jo-Philipp Wich
8df855a6ac luci-0.11: merge r9560 2012-12-19 00:37:39 +00:00
Jo-Philipp Wich
839dcdc012 luci-0.11: merge outstanding trunk changes 2012-12-18 13:58:22 +00:00
Jo-Philipp Wich
06901331f5 Fix nixio exece()
I had occasion to use nixio.exece() recently and I could not figure out what it
wanted for the third argument (the environment) as no matter what sort of table
I passed, even nixio.getenv(), would fail with bad argument #3 to 'exece'
(invalid environment).

What it should expect is a table full of string values for keys and something
that can be converted to a string as a value, however it inverts the value of
lua_type() and compares it against a type, which will never evaluate to true.

Getting past this, the code inserts the KEY=VALUE string before the arg userdata,
and then forgets to take the env userdata into account when collecting the
arguments back into a C char**. This patch addresses all these issues and
provides a working nixio.exece().

[Fixes #500]
2012-10-29 12:52:27 +00:00
Jo-Philipp Wich
c802c941cb libs/web: relax validation for hostnames to allow names like _kerberos._udp.EXAMPLE.COM 2012-10-06 23:10:43 +00:00
Jo-Philipp Wich
b0d3b82400 libs/web: transparently handle userdata in write_json() 2012-09-15 14:25:18 +00:00
Jo-Philipp Wich
8772db1675 libs/core: explicitely load luci.i18n in network model 2012-09-15 14:02:27 +00:00
Jo-Philipp Wich
647a0d33c3 libs/core: adapt luci.model.network for wifi-iface instances which are members of multiple networks 2012-09-15 13:10:27 +00:00
Jo-Philipp Wich
5164d55091 libs/core: remove route enabled check in network model after netifd update in OpenWrt trunk 2012-09-13 08:50:59 +00:00
Jo-Philipp Wich
c4d0dd19b7 libs/web: merge luci.http.protocol fix from Fonosfera
See http://trac.fonosfera.org/fon-ng/changeset/2102/trunk/luci/libs/http .
2012-08-29 13:06:58 +00:00
Jo-Philipp Wich
ec5487649e [PATCH] nixio HAS_SHADOW test link error
The nixio library can mistakenly build without shadow password support due to the
compile-time test failing.

Because the test for HAS_SHADOW in the nixio Makefile uses the default CC flags,
the test may attempt to cross-compile with different VFP abi than libc does and
will therefore not link. Passing CCFLAGS on the command line builds the test
correctly and will enable HAS_SHADOW if available.
2012-08-29 13:04:44 +00:00
Jo-Philipp Wich
1916ab494a libs/nixio: add missing parameter to alarm reset 2012-08-27 14:54:37 +00:00
Jo-Philipp Wich
54567e57ea libs/nixio: cancel pending alarm after successfully returning from getnameinfo() 2012-08-27 14:54:07 +00:00
Jo-Philipp Wich
f66a13dc4d libs/sys: use 100ms timeouts for name resolution of host hints 2012-08-27 14:39:33 +00:00
Jo-Philipp Wich
c755e818c4 libs/nixio: implement optional timeout for getnameinfo() on Linux 2012-08-27 14:36:47 +00:00
Jo-Philipp Wich
044b011051 libs/core: also add gre0 to default interface ignore pattern 2012-08-17 11:39:04 +00:00
Jo-Philipp Wich
b7026b156d libs/web: export translatef() into templates 2012-08-14 15:31:26 +00:00
Jo-Philipp Wich
2c844d42d8 libs/sys: fix getiwinfo() for "radioX.networkY" notation if the target network is not yet committed to uci 2012-08-14 12:45:12 +00:00
Jo-Philipp Wich
c78e445583 libs/web: rework unspecified/create logic for checkboxes in network_netlist widget 2012-08-09 23:42:53 +00:00
Jo-Philipp Wich
b35ab62ada libs/web: support placeholder attribute for comboboxes, fix validation quirks with input->select transition in comboboxes 2012-08-09 11:25:25 +00:00
Jo-Philipp Wich
0eb010a754 libs/sys: remove _parse_delimitted_table() and incorperate /etc/config/dhcp leases into mac_hints() 2012-08-09 10:03:25 +00:00
Jo-Philipp Wich
9bd814cf0e libs/sys: remove wifi.channels() 2012-08-08 20:25:03 +00:00
Jo-Philipp Wich
d1fd6e702e libs/sys: remove wifi.getiwconfig() and wifi.getiwscan() 2012-08-08 20:16:46 +00:00
Jo-Philipp Wich
df8601c864 libs/sys: introduce net.mac_hints(), net.ipv4_hints() and net.ipv6_hints() functions to obtain lists of peers from various sources (e.g. ethers, leases, arp cache) 2012-08-08 15:20:03 +00:00
Jo-Philipp Wich
4d2332c01c libs/web: add missing css class to cbi simpleform template 2012-08-08 11:29:46 +00:00
Jo-Philipp Wich
7bca24db1b libs/web: adapt dispatcher to sauth api changes 2012-08-08 09:48:50 +00:00
Jo-Philipp Wich
abef50b852 libs/web: rework luci.sauth
- perform decoding/encoding transparently in read() and write()
	- remove decode() and encode() helpers
	- introduce reap() to kill expired sessions
2012-08-08 09:48:47 +00:00
Jo-Philipp Wich
a58370ab74 Rework authentication system
The validity of authentication tokens was determined by the
mtime of respective authentication tokens on filesystem
stored in $sessionpath.
Talking about hardware without RTC or without a prior
connection to a time server, date/time usually around 1970 -
so is the mtime of the authentication token file in
$sessionpath.

When now configuring an internet connection via LuCI, the
system might fetch the current date/time (e.g. via ntp)
which invalidates the token, returns "403 Forbidden" and
kicks the user out of the interface.

This patch changes the authentication system to use time values
based on the uptime of the machine - rather than values based upon
gettimeofday() and {a|m}time values - and save them inside the token.
That way can always determine the difference between login
(last interaction respectively) and the current time, in-
dependant of the system clock jumping backwards/forwards.

Warning: This patch removes the clean() function and respective calls.
This means, invalid tokens will NOT be determined and removed from
filesystem automatically anymore.
Before, every HTTP-call caused a scan for invalid tokens,
which is quite expensive. Instead consider using a cron job
deleting all stalled files periodically.

Contributed by T-Labs, Deutsche Telekom Innovation Laboratories

Signed-off-by: Mirko Vogt <mirko@openwrt.org>
2012-08-07 19:11:56 +00:00
Jo-Philipp Wich
a798da5d8b libs/web: support creating networks in checkbox network widget (#457) 2012-07-24 11:48:03 +00:00
Jo-Philipp Wich
46c84206f3 libs/sys: workaround broken entries in /proc/net/ipv6_route, observed on brcm-2.4 2012-07-18 11:22:10 +00:00
Jo-Philipp Wich
c098c59fd1 libs/core: only consider enabled routes when finding wan interface 2012-06-29 11:59:38 +00:00
Jo-Philipp Wich
e2dd594c38 libs/sys: fix login with empty password after previous commit 2012-06-27 14:11:48 +00:00
Jo-Philipp Wich
b1617b3718 libs/sys: fix luci.sys.checkpasswd() semantics 2012-06-27 13:52:09 +00:00
Jo-Philipp Wich
9fab594101 libs/core: improve luci.util.imatch() to not create temporary strings when iterating non-string values 2012-06-26 22:58:24 +00:00
Jo-Philipp Wich
0f3175ad42 libs/core: implement get_wandev(), get_wan6dev(), get_wannet() and get_wan6net() in luci.model.network 2012-06-26 22:19:27 +00:00
Jo-Philipp Wich
61883f2c3f libs/core: fix network is_empty() check for wifi-ifaces which are part of multiple networks 2012-06-26 21:49:24 +00:00
Jo-Philipp Wich
fe7424b68e libs/web: extend network_ifacelist widget to display all networks an iface is member of 2012-06-26 21:49:15 +00:00
Jo-Philipp Wich
699391a559 libs/core: allow ifaces to be part of multiple networks in luci.model.network 2012-06-26 21:49:07 +00:00
Jo-Philipp Wich
6780f757d6 libs/web: implement minlength(), maxlength() and rangelength() datatypes 2012-06-25 09:51:59 +00:00
Jo-Philipp Wich
5bcf9d07fd libs/core: fix various problems in the network model 2012-06-17 11:18:58 +00:00
Jo-Philipp Wich
22ce33a5a6 libs/core: fix ubus corner cases in network model 2012-05-31 17:24:13 +00:00