Commit graph

60 commits

Author SHA1 Message Date
Ian Clowes
5596f4776d More catch-up 2021-12-11 23:52:32 +00:00
Ian Clowes
815c3457d5 Trying to tidy up old work areas 2021-12-11 23:49:53 +00:00
Ian Clowes
90371d4b1b datastorage: fixes to linked list handling
general: fixed whitespace and typos
memory audit: on by default in build
memory audit: enhanced audit info
ubus: refactor denied_req expiry to assist datastorage testing
datastorage: fixed performance bug in handling of linked list entry expiry
datastorage: fixed SEGV in skip list handling
test_storage: added linked list memory allocation stress tests
2020-08-05 11:04:30 +01:00
Ian Clowes
88e5d6050a bug fixes to memory auditing and hearing map
memory auditing: refined auditing code and use in main code
hearing map: fixed bug causing it not be be built correctly
datastorage: fixed memory leak from linked list handling
2020-08-03 19:02:07 +01:00
Ian-Clowes
2b98cd2368 general: add memory auditing
memory_utils: added to wrap memory alloc / free
general: adjusted stabdard and other memory allocs t be audited
2020-08-03 04:01:58 +01:00
Ian-Clowes
be6f9df95c datastorage: fixed use of wrong client search 2020-08-02 15:15:36 +01:00
Ian-Clowes
36fe9998da datastorage: convert to linked lists and optimise use of pointers
datastorage: AP, client, probe, auth entry and MAC list converted to linked list
datastorage: functions adjusted to take pointers as parameters
datastorage: optimised sort and search functions added
mac_utils: struct dawn_mac added and comparisons adjusted
general: adjust code to  call new datastorage functions
test_storage: large scale 100 AP, 3000 client, 70k probe added
2020-08-02 12:19:33 +01:00
Rosen Penev
2f585043c3 test_storage: fix compilation with musl 1.2.0
time_t is 64-bit, even under 32-bit OSes.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-07-21 10:06:33 +02:00
twy_2000
32640de378 dawn_uci: no need uci_alloc_context on each uci_set_network call 2020-07-12 13:58:47 +02:00
Ian Clowes
67c3ed0d0a test_storage: extend test harness; datastorage: two bug fixes
datastorage (bug fix): deleting expired array item would fail to test next item
test_storage: extended to cover all required datastorage entry points
test_storage: added ability to read script file
test_storage: added new and revised test scripts
TESTING.md: added to describe testing approach
general: added various TODO notes on things to come back to
general: revised #includes to make each "self-compiling"
general: revised #includes to minimise usage across source files
general: moved declarations and defintions to simplify and rationalise code
datastorage: refactor to support scalability testing
datastorage: made independent of time() calls to support testing
datastorage: fixed redundant use of both SORT_NUM and SORT_LENGTH defines
datastorage: fake kicking to test clients move between access points
msghandler: new module to reduce compile time interdependencies
mshhandler: (issue #100?) fixed SEGV memcpy() in dump_client() using strncpy()
ubus: merged uface into ubus
mac_utils: new module for MAC address utilites
test_header: added target to help #include rationalisation

Tested-by: Nick Hainke <vincent@systemli.org>
2020-07-12 13:47:23 +02:00
Ian Clowes
d64fbf0e46 parent 0f63e00c43
author Ian Clowes <clowes_ian@hotmail.com> 1590603904 +0100
committer Ian Clowes <clowes_ian@hotmail.com> 1594246123 +0100

datastorage (bug fix): deleting expired array item would fail to test next item
test_storage: extended to cover all required datastorage entry points
test_storage: added ability to read script file
test_storage: added new and revised test scripts
TESTING.md: added to describe testing approach
general: added various TODO notes on things to come back to
general: revised #includes to make each "self-compiling"
general: revised #includes to minimise usage across source files
general: moved declarations and defintions to simplify and rationalise code
datastorage: refactor to support scalability testing
datastorage: made independent of time() calls to support testing
datastorage: fixed redundant use of both SORT_NUM and SORT_LENGTH defines
datastorage: fake kicking to test clients move between access points
msghandler: new module to reduce compile time interdependencies
mshhandler: (issue #100?) fixed SEGV memcpy() in dump_client() using strncpy()
ubus: merged uface into ubus
mac_utils: new module for MAC address utilites
test_header: added target to help #include rationalisation
2020-07-10 23:19:13 +01:00
twy_2000
0f63e00c43 tcpsocket: free con after ustream write error and make list each safe list_each is not safe against removal of list entry 2020-06-18 22:16:42 +02:00
twy_2000
a6d0ea3d1d tcpsocket: ustream_pending_data before ustream_read
according to https://github.com/yousong/osocks/blob/master/main.c#L149
and ustream source code, directly ustream_read would make many packge incomplete.
2020-06-18 12:29:29 +02:00
twy_2000
b49c5b8552 malloc: add malloc failure wrapper 2020-06-18 12:29:14 +02:00
twy_2000
b029a40b11 Revert "Revert "tcpsocket: implement client_read_cb with ustream_read my wheels are much worse than offical wheels.""
This reverts commit c2a63293d1.
2020-06-18 12:29:10 +02:00
Polynomialdivision
ada3bf3ff2 uci: fix arm64 compiling
Fixes:
https://github.com/openwrt/packages/issues/12488#issuecomment-643138068
2020-06-12 10:46:49 +02:00
Polynomialdivision
c2a63293d1 Revert "tcpsocket: implement client_read_cb with ustream_read my wheels are much worse than offical wheels."
This reverts commit f7343a053c.
2020-06-12 10:45:33 +02:00
twy_2000
f7343a053c tcpsocket: implement client_read_cb with ustream_read my wheels are much worse than offical wheels. 2020-06-12 07:12:36 +02:00
Ian Clowes
292ccb01f2 test_storage: further refactoring, added test functionality, and TESTING.md to describe testing approach 2020-06-10 12:30:43 +02:00
David Woodhouse
bd35961de8 uci: truncate hostname at first dot
Oh, and stop at the size of the target buffer too.
2020-06-10 12:17:52 +02:00
Polynomialdivision
77619e9b18 ubus: use strncpy and add backwards compatibility 2020-06-09 13:00:07 +02:00
Polynomialdivision
ffa08dbccd ubus/uci/datastorage: add iface and hostname
The network overview now displays the interface name and hostname.
2020-06-09 11:19:56 +02:00
David Woodhouse
050c1d7fed tcpsocket: use fixed size and endianness for length prefix of network messages
We can't use host-dependent endianness for network traffic.
The size of size_t also varies from host to host so stick with uint32_t.

Fixes: #92
2020-06-08 13:19:21 +02:00
Polynomialdivision
534f786616 ubus: fix wrong parsing policy 2020-06-06 09:09:09 +02:00
Polynomialdivision
2151db28ef tcpsocket: fix debug msg format
Fixes: https://github.com/openwrt/packages/issues/12410
2020-06-05 11:08:50 +02:00
twy_2000
5ce4c978c8 ubus/datastorage: don't repeatedly ask devices for beacon reports if they don't support it 2020-06-01 18:47:00 +02:00
Polynomialdivision
71536468ff uci: fix loading of config 2020-06-01 10:15:58 +02:00
twy_2000
b5043ad98e utils/ubus: fix memory leak at blobmsg_format_json 2020-05-30 17:52:17 +02:00
Polynomialdivision
f603dde7f7 ubus: add local flag to network overview 2020-05-30 08:55:52 +02:00
Polynomialdivision
26745815e8 ubus: fix network overview 2020-05-30 08:48:33 +02:00
twy_2000
653ce9fa56 network/tcpsocket: make sure every msg is complete before handle 2020-05-29 22:51:28 +02:00
Ian Clowes
50d347c233 datastorage: refactor to support scalability testing 2020-05-28 00:29:15 +02:00
Polynomialdivision
3a6ef89998 ubus: addd empty aps
It was requested that DAWN should show the whole network, even
if no client is connected to an AP.
2020-05-27 11:17:26 +02:00
twy_2000
2d1a6f9c0c ubus: filter out global interface 2020-05-21 10:21:16 +02:00
twy_2000
73c7998967 ubus: make decide_function consist with configuration
in luci-app-dawn, if eval_probe_req is not ticked, eval_probe_req would be -1.
however, in c language, !(-1) is false.
Since only zero in if statement is false, non-zero number is true.
2020-05-20 15:06:47 +02:00
Polynomialdivision
b7fd0e648a dawn_iwinfo: fix whitespace 2020-05-18 22:36:20 +02:00
twy_2000
273178e05c dawn_iwinfo: indentation 2020-05-18 22:35:00 +02:00
twy_2000
3ff15b9894 dawn_iwinfo:iwinfo_finish(); 2020-05-18 22:34:45 +02:00
twy_2000
42c4e6e0b0 dawn_iwinfo: filter out global interface 2020-05-18 22:34:27 +02:00
twy_2000
b78a01bfb5 dawn_iwinfo: release iwinfo after usage 2020-05-10 10:22:18 +02:00
twy_2000
6bad02bed7 tcpsocket: fix port print 2020-05-10 09:51:48 +02:00
David Bauer
fa6b5d4358 github: set CONFIG_SRC_TREE_OVERRIDE in actions CI
The OpenWrt config needs to have CONFIG_SRC_TREE_OVERRIDE enabled in
order to build from the version checked out in the linked source-tree.

This was forgotten when adding the CI and therefore the CI was always
building the version from the packages feed.
2020-05-08 19:47:28 +02:00
David Bauer
c497e18537 github: fix link to dawn source
This was previously a relative path which obviously didn't work at the
target location.
2020-05-08 19:46:57 +02:00
David Bauer
991eb26ed7 github: use v2 for checkout action
v1 does not support the path option, thus the repository is always
cloned to the workspace root.
2020-05-08 19:46:37 +02:00
David Bauer
1ecbea1514 github: add GitHub Actions CI
This adds a GitHub actions workflow for building DAWN from this
repository using the OpenWrt SDK.

The resulting package is archived as an artifact available to download.
2020-05-01 18:10:13 +02:00
David Bauer
617080a7c9 ubus: only update TCP socket list when using TCP connections
DAWN currently tries to update it's list of TCP socket endpoints using
mDNS when it is configured to use UDP.

Only update the TCP socket list when DAWN is configured to use TCP
sockets.

Fix a identation mismatch along the way.
2020-04-30 10:56:47 +02:00
Polynomialdivision
ae90e6dfd1 add notice that full wpad is requirement 2020-04-17 19:18:15 +02:00
Polynomialdivision
b5fd8fb3ad fix link to luci-app-dawn 2020-04-17 17:46:15 +02:00
Polynomialdivision
bbd80a8929 update readme and install instructions 2020-04-17 17:14:07 +02:00
Polynomialdivision
2ff3b3017f remove unecessary params and debug output 2020-04-17 12:59:06 +02:00