Shawn Silverman
f84076b112
Add missing terminating newlines to LWIP_DEBUGF statements
2023-05-11 22:13:51 +02:00
Florian La Roche
089697bb1c
Use NULL instead of 0 as a pointer
...
Recommended by 'sparse' tool
2021-11-27 15:49:20 +01:00
Erik Ekman
264a5a3e97
Rename IP and Ethernet equality checkers from _cmp to _eq
...
Functions ending in cmp are expected to return 0 on equality but these
return non-zero.
eth_addr_cmp -> eth_addr_eq
ip_addr_cmp -> ip_addr_eq
ip4_addr_cmp -> ip4_addr_eq
ip6_addr_cmp -> ip6_addr_eq
ip_addr_netcmp -> ip_addr_net_eq
ip4_addr_netcmp -> ip4_addr_net_eq
ip6_addr_netcmp -> ip6_addr_net_eq
ip_addr_cmp_zoneless -> ip_addr_zoneless_eq
ip6_addr_cmp_zoneless -> ip6_addr_zoneless_eq
ip6_addr_cmp_zone -> ip6_addr_zone_eq
ip6_addr_netcmp_zoneless -> ip6_addr_net_zoneless_eq
ip6_addr_nethostcmp -> ip6_addr_nethost_eq
ip6_addr_cmp_packed -> ip6_addr_packed_eq
ip6_addr_cmp_solicitednode -> ip6_addr_solicitednode_eq
All call sites have been changed, and fallback macros have been added to not
break external users.
2020-07-07 18:51:45 +02:00
Craig McQueen
ef76bbe3f0
DNS: Allow a DNS look-up with a trailing dot in the name
...
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-11-22 13:14:41 +01:00
Simon Goldschmidt
47ebb2b267
dns: add a comment about case insensitivity
2018-06-13 15:10:47 +02:00
Simon Goldschmidt
a9d6ea5953
introduce 'lwip_tolower' and use it in dns.c
...
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-13 15:08:11 +02:00
armink
66f7f06601
fix DNS resolution to not case insensitivity
...
See patch #9654
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-13 15:04:46 +02:00
goldsimon
bcb6819715
dns_compare_name: change check for u16_t overflow
...
check upper border (0xFFFF) instead of checking for 0 after overflow
2018-02-13 12:23:50 +01:00
Dirk Ziegelmeier
d5d635cdce
Minor DNS documentation improvement
2018-02-13 10:58:32 +01:00
Axel Lin
40a563cdd3
dns: Use dns_backupserver_available() instead of open-coded
...
Slightly better readability by calling dns_backupserver_available()
instead of open-coded. Also move dns_backupserver_available() function
up to avoid forward declaration.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-11-16 19:48:35 +01:00
Dirk Ziegelmeier
1fdc7571e0
Move DNS_MAX_RETRIES option from dns.c to opt.h
2017-11-13 22:52:39 +01:00
Dirk Ziegelmeier
2c1a152880
Fix bug #52239 : if a DNS request is denied by a DNS server, this DNS request shouldn't be stopped if there is another DNS server to try
...
Apply improved version of Xiaodong Sun's patch
2017-11-13 22:51:08 +01:00
Dirk Ziegelmeier
a56ea1b19f
dns.c: Rename goto label memerr to ignore_packet
...
Label is more descriptive this way
2017-11-13 22:37:38 +01:00
Dirk Ziegelmeier
931b5e643c
Reformat core code using astylerc
2017-09-17 20:38:38 +02:00
goldsimon
26771d0800
Add @todo: scope ip6addr?
2017-07-18 19:17:17 +02:00
Our Air Quality
5eff45cac0
Correct a few uses of sizeof(ip6_addr_t) to sizeof(ip6_addr_p_t)
...
The ip6_addr_t structure may have an addition slot so is not necessarily
the size of an ipv6 address, so some uses of sizeof(ip6_addr_t) were not
correct.
Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-07-18 19:17:17 +02:00
goldsimon
092c6c1f07
DNS_MAX_SOURCE_PORTS is PP-checked to be <= 255...
2017-06-26 08:48:17 +02:00
goldsimon
5b15234833
work on -Wconversion...
2017-06-25 23:01:57 +02:00
goldsimon
11da4ef024
Use ip_addr_debug_print_val instead of ip_addr_debug_print where applicable
2017-06-21 13:26:55 +02:00
goldsimon
deaa6e9406
Improved DNS_LOCAL_HOSTLIST interface (bug #50325 )
2017-02-17 10:08:49 +01:00
Axel Lin
be7ae5e36b
dns: Slightly improve dns_alloc_random_port implementation
...
Having the variable namining ret for a pointer makes the code looks odd,
ret looks like a value variable. Rename ret to pcb.
Also simplify the code in the do {} while() loop.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2017-02-04 18:42:14 +01:00
Axel Lin
3e30dbc75c
dns: Clean up unneeded #if guard for DNS_LOCAL_HOSTLIST/DNS_LOOKUP_LOCAL_EXTERN
...
This is a leftover of commit e77e18f8c410 "Worked on IPv6-only stack", fix it.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2017-02-03 08:57:44 +01:00
goldsimon
5774fdfe75
dns: added one-shot multicast DNS queries
2016-12-09 09:20:46 +01:00
goldsimon
c87855423c
DNS: added compile-time check for some defines to fit into an u8_t (bug #49658 )
2016-12-07 09:09:45 +01:00
Dirk Ziegelmeier
1687721600
Fix compile when IPv4 is disabled
2016-12-05 22:01:58 +01:00
sg
03a9aac157
dns_enqueue(): minor readability improvement: add local variable "age" to store result of subtraction
2016-11-22 21:34:12 +01:00
Dirk Ziegelmeier
f6e27940bd
Make lwIP compile with clang -Wdocumentation -> several documentation fixes
2016-10-09 12:21:39 +02:00
Dirk Ziegelmeier
13fb616bb2
Cleanup hton*/ntoh* function handling and platform abstraction
...
Let lwip use functions/macros prefixed by lwip_ internally to avoid naming clashes with external #includes.
Remove over-complicated #define handling in def.h
Make functions easier to override in cc.h. The following is sufficient now (no more LWIP_PLATFORM_BYTESWAP):
#define lwip_htons(x) <your_htons>
#define lwip_htonl(x) <your_htonl>
2016-10-06 12:55:57 +02:00
Dirk Ziegelmeier
1f68b32485
Cleanup handling of non-standard functions in lwIP
...
- itoa
- strnicmp, stricmp/strcasecmp
- strnstr
Related to patch #9115 : httpd.c: strcasecmp for GCC and stricmp for Windows
2016-09-28 21:52:11 +02:00
Dirk Ziegelmeier
633696c153
Implement consistent IPx_ADDR_ANYx macro naming between IPv4 and IPv6
...
- rename IP4_ADDR_ANY to IP4_ADDR_ANY4
- IP4_ADDR_ANY (= IP_ADDR_ANY) is now IPv4 any address in ip_addr_t format
2016-09-28 12:56:57 +02:00
Axel Lin
f8a95aa27f
dns: Drop unnecessary txid variable in dns_check_entry
...
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-09-07 14:56:01 +02:00
sg
23147b0e21
added more out of range checks to dns_recv() (see bug #48924 )
2016-08-30 22:18:10 +02:00
Dirk Ziegelmeier
840d1e60fa
Fix bug #48924 : Potential out of bound reads in DNS codes of lwip project by adding checks for pbuf_copy_partial() return values.
...
Add some comments to clarify handling of untrusted network data handling.
2016-08-30 21:09:24 +02:00
goldsimon
9725a496b5
moved 2 enums from 'prot' headers to where they belong (dns, dhcp)
2016-08-19 09:41:33 +02:00
Dirk Ziegelmeier
0c7a59b5db
Minor: Documentation fixes
2016-08-18 11:06:50 +02:00
Dirk Ziegelmeier
5493220c93
Move DNS protocol structs to separate header. Needed for Erik Ekman's MDNS implementation.
2016-08-13 09:05:28 +02:00
Dirk Ziegelmeier
6dcb2b2415
Work on bug #48730 : Enums should be used instead of multiple defines (where applicable)
2016-08-12 22:51:43 +02:00
Dirk Ziegelmeier
ccc830c99c
Work on lwIP documentation
2016-07-27 13:03:36 +02:00
Dirk Ziegelmeier
8a9de94b1f
Restructure documentation. Create two top-level sections for thread-safe and callback-style APIs.
2016-07-26 18:39:53 +02:00
Dirk Ziegelmeier
9c10daba93
Document netif API in doxygen module style
2016-07-26 17:53:07 +02:00
Dirk Ziegelmeier
bd79f6c055
Document DNS, memory pools and PBUFs as modules
2016-07-26 16:40:13 +02:00
goldsimon
811b237bd7
dns: fixed declaration and usage of DNS_LOOKUP_LOCAL_EXTERN()
2016-07-07 13:02:47 +02:00
goldsimon
2fdea8b79b
fixed bug #48398 (dns: entries reused during found-callback could be aborted if ttl==0)
2016-07-04 13:55:20 +02:00
goldsimon
fd83f4fb22
Fix bug #48359 (dns entries are not set to state DONE)
2016-07-04 10:22:20 +02:00
Dirk Ziegelmeier
5e7b343d52
Fix dns_getserver to return a pointer, not a value
2016-06-13 09:00:46 +02:00
Dirk Ziegelmeier
90a656ed78
Fix several doxygen errors all over the code
2016-05-23 21:18:16 +02:00
Axel Lin
8c0f620d83
dns: Use LWIP_ARRAYSIZE instead of open coded
...
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-05-11 12:20:15 +02:00
Dirk Ziegelmeier
309e072238
Create new IP_IS_V4 macros and use them at instead of !IP_IS_V6 - since we now have an IPADDR_ANY_TYPE, just checking for !V6 does not mean it is V4
2016-04-06 22:31:31 +02:00
sg
a1c78ea7bf
ignore dns response parsing errors, only abort resolving for correct responses or error responses from correct server (bug #47459 )
2016-03-22 07:22:17 +01:00
Dirk Ziegelmeier
f3b7bca3cf
Fix bug #47370 : Port DNS client to IPv6
2016-03-09 19:25:06 +01:00