1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

30 Commits

Author SHA1 Message Date
Benjamin Valentin
46764727ab sys/net/sock_util: add sock_dtls_establish_session() 2023-02-08 15:57:22 +01:00
Benjamin Valentin
c47407892a sys/net/sock_util: style fixes 2022-10-10 20:31:15 +02:00
Benjamin Valentin
6f2bbdd3b1 sys/net/sock_util: fix _find_hoststart() 2022-10-10 19:02:18 +02:00
Benjamin Valentin
e128736014 net/util: make use of dns_query() 2022-07-29 17:48:26 +02:00
Benjamin Valentin
f6be7d6ffe sys/net/sock_util: add sock_urlpath() 2022-04-18 01:36:50 +02:00
Hendrik van Essen
a9fb3388ca sys/net/application_layer/sock_dns_mock: add module for mocking sock_dns 2022-04-03 17:29:10 +02:00
Benjamin Valentin
79f0354608 sys/net/sock_util: don't request AF in DNS which is not enabled 2022-03-29 10:44:22 +02:00
Benjamin Valentin
1ef6da7de4 sys/net/sock_util: add sock_tl_name2ep() 2022-03-22 11:03:12 +01:00
Hendrik van Essen
73431b398d sys/net/sock_util: fix compilation for IPv4-only mode 2022-03-07 02:58:17 +01:00
Benjamin Valentin
67ef5faeed sys/net/sock_util: make use of SOCK_HAS_IPV4 2022-01-13 18:40:12 +01:00
a53cbbfa91 sys/net/sock_util: zero out temporary buffer
Otherwise, the following strncpy() leaves strtol() with a non-terminated
buffer.
2021-03-18 14:58:35 +01:00
Martine S. Lenders
ae7944f115
sock_util: introduce endpoint conversion aliases for TCP 2020-06-24 17:21:29 +02:00
Martine S. Lenders
78c816c6af
sock_util: fix IPv4 address parsing
There is no `SOCK_HAS_IPV4` define.
2020-06-24 18:36:42 +02:00
Martine S. Lenders
a603504a6e
sock_util: add interface descriptor parsing to str2ep 2020-05-19 14:57:41 +02:00
ddee330bbd sys/net/sock/sock_util: use MODULE_FMT instead of RIOT_VERSION
sock_util used ot check RIOT_VERSION for selecting fmt functions.
RIOT's Makefile.dep sets fmt as a dependency for sock_util,
so the usual MODULE_FMT can be used.

One special case less.
2020-02-28 12:13:44 +01:00
Leandro Lanzieri
c74fa5367c net/sock/util: Move configuration macros to 'CONFIG_' namespace
Macros that changed:
SOCK_SCHEME_MAXLEN -> CONFIG_SOCK_SCHEME_MAXLEN
SOCK_HOSTPORT_MAXLEN -> CONFIG_SOCK_HOSTPORT_MAXLEN
SOCK_URLPATH_MAXLEN -> CONFIG_SOCK_URLPATH_MAXLEN
2019-12-13 12:04:54 +01:00
2b0b591c85
sys/net/sock_util: fix dead initialization warning
This was reported by LLVM scan build. The value assigned at initialization is never used, so could be removed
2019-10-28 16:35:18 +01:00
Leandro Lanzieri
b9c1146e90 sys/net/sock_util: Accept null pointers in urlsplit 2019-06-12 10:03:11 +02:00
0c43dc743d
sock_util: Limit recursion in str2ep 2018-07-20 11:48:29 +02:00
b024ff1cb8
sock_util: Add checks to port number parsing
Add additional checks to the port number parsing in str2ep to validate
the port number supplied in the string. This only verifies that the port
number is no longer than 5 chars and the resulting number fits in a
uint16_t.

It is still possible to supply up to 5 random chars.
2018-07-19 22:07:19 +02:00
bff8694051
sock_util: check path length in urlsplit
Add a length check to the path to ensure that it fits in the supplied
buffer in the urlsplit function
2018-07-19 22:07:19 +02:00
d93ecab880
sock_util: Add terminator to host-port string
Add missing null terminator to the returned host-port string in
sock_udp_ep_fmt
2018-07-19 22:07:18 +02:00
b8a494fb76
sock_util: Prevent overflow in sock_urlsplit
This adds a length check to verify if the host-port part of the URL fits
in the supplied buffer
2018-07-19 22:07:18 +02:00
3096823ab4
sock_util: Allow URLs without path as valid
URLs without a path were treated as invalid, while according to the URL
specification they are valid

Also fixes a missing null terminator in the returned path
2018-07-19 22:07:18 +02:00
3402e3509c
sock_util: Prevent overflow in _find_pathstart
Limit the number of scanned chars in _find_pathstart to the predefined
size
2018-07-19 22:07:18 +02:00
b0309145f0
sock_util: Limit URL scheme size 2018-07-19 22:07:17 +02:00
4c183257df
sock_util: Fix null terminator in sock_udp_ep_fmt 2018-07-18 17:44:03 +02:00
6a81a4d587
sock_util: add missing includes 2018-07-18 17:43:59 +02:00
Hauke Petersen
bf8f8dfa67 net/sock_udp: add sock_udp_ep_equal() 2018-07-05 15:13:01 +02:00
2a955ad631 sys: net: sock: add utility functions 2017-03-28 19:16:27 +02:00