* Add 'tunnel_address' support for json config parser
And allow ss-tunnel to use the newly introduced parser.
Signed-off-by: Adam Anonymous <anonymous_temp_user@yahoo.co.jp>
* Add "mode" support for jconf
Now jconf supports "mode" setting, allowed values are "tcp_only",
"tcp_and_udp" and "udp_only".
Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>
* Use jconf "mode" for server/local/tunnel/manager
Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>
* Add per-project vimrc to gitignore
As the coding style differs from kernel and other projects, so such
project vimrc should be helpful.
Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>
- Added one macro to avoid dangling pointers
- Added two functions to perform NULL pointer check
since the allocation is not guaranteed by C library, although it
is a rare case, just for sanity
- Add NULL pointer check to brealloc() and bfree() and for sanity as well
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
errno is never set to zero by any system call or library function,
and it's programmer's resposibility to reset it before doing checks.
Otherwise the error might be misleading.
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
code issues found by Clang with
CFLAGS="-Os -Wall -Wextra -Werror=unused-const-variable -Wno-error=unused-parameter"
enabled
The details as follows:
- variable initialization issue, modified them as Clang suggested
- data type mismatch when comparing, fix them either by casting or changing
the data type of index of iterator
- get_sockaddr() in netutils may return -1 thus changed returning type from
size_t to ssize_t, which makes Clang happier
- recvfrom() in udprelay is identical, fix this by creating local variable
for comparison and assign back to buf->len when returning value is acceptable
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>