Age | Commit message (Collapse) | Author |
|
leases into mac_hints()
|
|
|
|
|
|
functions to obtain lists of peers from various sources (e.g. ethers, leases, arp cache)
|
|
|
|
|
|
- perform decoding/encoding transparently in read() and write()
- remove decode() and encode() helpers
- introduce reap() to kill expired sessions
|
|
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>
|
|
|
|
brcm-2.4
|
|
|
|
|
|
|
|
iterating non-string values
|
|
get_wan6net() in luci.model.network
|
|
multiple networks
|
|
is member of
|
|
|
|
|
|
|
|
|
|
on libubus-lua
|
|
Contributed by T-Labs, Deutsche Telekom Innovation Laboratories
Signed-off-by: Mirko Vogt <mirko.vogt@external.telekom.de>
|
|
|
|
Hi,
The attached patch fixes the JSON generation when dealing with NaN (not
a number), this makes the JSON parsing in the web browser succeed
(before it would get a "nan" which is not a valid JS value)
Chris
|
|
|
|
execute all init action with an empty environment
|
|
|
|
|
|
Ubuntu 11.x
|
|
|
|
|
|
firewall_zonelist widgets
|
|
|
|
|
|
buttons in bootstrap theme
|
|
|
|
|
|
screens
|
|
|
|
space between the attributes
|
|
|
|
|
|
The Chrome web browser revalidates every resource if no explicit Cache-Control or Expires HTTP/1.1 header is sent. This makes the page loads appear to take a long time on pages with a few external resources, adding 300-500ms
per item. This includes the XHR json responses that set page images, like wireless signal indicators and the like-- the images are revalidated on every XHR response. As an example, the Network -> Interfaces page generates 16
requests to the lucid http server:
Main HTML
cascade.css
xhr.js
tabbg.png
cbi.js
loading.gif
ethernet_disabled.png
reload.png
reset.gif
edit.gif
remove.gif
add.gif
bridge.png
vlan.png
wifi.png
iface_status
Of those, 14 should be pulled from cache but they are all valdiated. The lucid server returns the correct 304 (Not Modified) responses but it delays the apparent page load time because of the backlog it creates at the http
server.
I would suggest setting explicit cache control on all files returned by the lucid http directory dispatcher. The "Expires" header is reportedly more widely supported, however this relies on the clock on the OpenWrt? system
being accurate, which may not be the case. The "Cache-Control: max-age=" allows the server to set a timeout in seconds. I've included a patch that sets revalidate interval to 1 year, which is the value recommended by google.
Reference: http://code.google.com/speed/page-speed/docs/caching.html
Note this could create an issue if there are luci application which are generating files which change that are being served by the lucid http DirectoryPublisher?. I'm not sure if there is anyone doing that. If needed, this can
probably be created as an option to the DirectoryPublisher? config stanza for each vhost.
Finally, this only affects the Google Chrome browser, as both IE9 and Firefox seem to have their own revalidation interval in the absence of explicit cache control which may be based on the last modified time of the resource.
Even in Chrome, this change doesn't take effect until the item is re-served with a 200 HTTP response so Chrome's cache should be cleared after this patch is applied. The patch can be extended to include cache control on 304
responses, but I'd not worry about cluttering the code with it because the problem will solve itself once chrome redownloads the resource.
|
|
|
|
|
|
"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)"]
|
|
can be represented with neg(type)
|
|
|
|
suitable for passing to nixio.exec()
|