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

24 Commits

Author SHA1 Message Date
Benjamin Valentin
bc2ad626f3 dns_msg: rename addrlen -> rdlen 2024-09-12 11:00:41 +02:00
Benjamin Valentin
305b5db4eb dns_msg: add debug output 2024-09-12 11:00:41 +02:00
Benjamin Valentin
74356c9737 dns_msg: skip RDLENGTH_LENGTH field when skipping record
fixes #20355
2024-09-12 11:00:41 +02:00
MrKevinWeiss
e0fdc3c16c
*Kconfig*: Modify Kconfig to remove dep model 2024-03-27 10:28:12 +01:00
Martine Lenders
883c3fdffa
dns_cache: handle TTL=0 properly
Existing entries should be expired, new entries should not be created.
2022-08-11 14:04:16 +02:00
Martine Lenders
fe4deff522
dns_cache: synchronize access with mutex 2022-07-20 06:30:14 +02:00
Martine Lenders
8bec9c1115
sock_dns_cache: move to dns_cache
Also piggy-back some fixes to the unittests and submodule handling
2022-07-18 15:27:58 +02:00
Martine Lenders
1761726024
net/dns: provide Kconfig 2022-07-18 11:43:35 +02:00
Benjamin Valentin
077a41a719 sock_dns: implement DNS cache 2022-07-13 23:23:52 +02:00
Martine Lenders
e0ac9d3f45
dns_msg: Use correct byteorder for ID 2021-09-29 13:32:12 +02:00
Martine Lenders
7920ab2b95
dns_msg: make parsing input buffer const 2021-08-11 11:55:29 +02:00
Martine Lenders
e8cbc6da85
dns: move message parsing and composition to own module 2021-08-11 11:55:29 +02:00
Martine Lenders
bf764fd700
sock_dns: move module to directory named like module 2021-07-21 14:58:04 +02:00
Sören Tempel
85296ce6cc sock_dns: Fix incorrect buffer bounds check
Apart from advancing the buffer by RR_TYPE_LENGTH, RR_CLASS_LENGTH,
and RR_TTL_LENGTH the code also attempts to read a two byte unsigned
integer using _get_short(bufpos):

	unsigned addrlen = ntohs(_get_short(bufpos));

The bounds check must therefore ensure that the given buffer is large
enough to contain two more bytes after advancing the buffer.
2020-10-30 21:41:39 +01:00
Benjamin Valentin
1de14931b8 sock_dns: use the same buffer for request & reply
Saving RAM is more important than saving a few cycles
used by re-creating the request buffer in the error case.

Also reduce the size of the buffer to 128 bytes.
If we are just requesting the AAAA record it is unlikely
for the reply to take up the maximum size of 512 bytes.

We were already placing restrictions on the domain name length,
those are now actually a bit more relaxed (112 bytes instead of 64)
2020-02-24 14:29:17 +01:00
Benjamin Valentin
e9a40933f7 sock_dns: fix off-by-one error in _parse_dns_reply() 2020-02-24 14:19:50 +01:00
Martine Lenders
b30cdb51a5 sock_dns: correctly report too short messages 2019-01-29 22:32:50 +01:00
Martine Lenders
894ad29322 sock_dns: remove out-of-place puts() call 2019-01-10 18:07:29 +01:00
Martine Lenders
8ad5e44cba sock_dns: remove some magic numbers 2019-01-10 18:07:29 +01:00
Martine Lenders
2840b3825e sock_dns: fix out-of-bound errors
Fixes #10739
2019-01-10 18:07:29 +01:00
Martine Lenders
5361c4cfff sock_dns: return error if DNS server is not set 2018-07-05 11:09:34 +02:00
Martine Lenders
fbf216f864 gnrc_sock_dns: Move DNS server end point to implementation 2018-07-05 11:01:22 +02:00
cfd10c394a adapt to changed byteorder.h 2017-04-13 11:35:35 +02:00
7af03ab624 sys: net: introduce simple sock DNS client 2017-03-28 20:49:53 +02:00