Abhik Roy
b3523a6fbe
fix(dhcps): Fixed DNS server handling for previous breaking changes
2025-02-17 13:19:28 +11:00
Lorenzo Consolaro
0fd3984c72
feat(dhcps): Support for multiple DNS servers
2025-02-17 13:15:03 +11:00
David Cermak
42d2a131f6
fix(lwip): Remove if_indextoname() impl in favor of LWIP_NETIF_API
...
ESP-IDF already hardcodes LWIP_NETIF_API=1, so the related netif APIs are
defined unconditionally.
2025-02-10 19:34:57 +08:00
David Cermak
b46b3d1c1d
fix(lwip): Fix potential data-race in ping tcpip callback
...
Need to use tcpip_api_call() instead of tcpip_callback(), since the
former waits for the tcpip task to complete and thus prevents potential
data races with subsequent TCP/IP tasks.
2025-01-22 21:13:57 +08:00
David Cermak
c5955f8cf6
fix(lwip): Fix ping session calling thread unsafe API
...
Closes https://github.com/espressif/esp-idf/issues/14982
2024-12-20 08:09:22 +01:00
Abhik Roy
d846929dc3
feat(lwip): Added wrapper for getaddrinfo to handle AF_UNSPEC
2024-11-22 13:06:34 +11:00
David Cermak
8b191dd7a1
fix(lwip): Fix ping_v6 receiving to accept only echo replies
...
This fixes a bug where we ping our own IP and the request itself
bounces back to the raw receive function and is incorrectly treated as
reply. (this bug was discovered when fixing ICMPv6 pings with incorrect
checksums, while the ping request was dropped in icmpv6.c due to wrong
checksum, but was also fed to raw layers where it was treated as
"correct" response, so the PINGv6 to ourselves still worked)
2024-11-08 12:21:35 +01:00
David Cermak
649816d9a1
fix(lwip/dhcps): Fallback DNS option to DHCP server's IP by default
...
Adds backward compatibity option CONFIG_LWIP_DHCPS_ADD_DNS, which
prevents breaking changes.
This option should be removed in IDF v6.0
Merges https://github.com/espressif/esp-idf/pull/14132
2024-10-07 21:07:57 +11:00
Showier Drastic
484a2d6d6c
feat(lwip/apps): only hand out DNS in DHCP if explicitly specified
2024-10-07 21:07:01 +11:00
Abhik Roy
53ba6e97cd
fix(example): Fixed updating recv addr for invalid packets for ping
...
Closes https://github.com/espressif/esp-idf/issues/14197
2024-08-13 21:51:58 +10:00
zhangyanjiao
eaef3a2683
fix(lwip): fixed the dhcp pool error on dhcp server
2024-05-27 14:51:00 +08:00
David Čermák
31253679d9
Merge branch 'bugfix/bind_dhcps_netif' into 'master'
...
fix(lwip/dhcp_server): Bind dhcps netif to avoid handling the dhcp packet from other netif
See merge request espressif/esp-idf!30537
2024-05-09 19:44:19 +08:00
jkingsman
3035ce294d
feat(esp_netif): add support for DHCP Option 114 captive portal URI
...
DHCP Option 114 provides a modern method of indicating a captive
portal redirect to DHCP client. This introduces Option 114 to
the DHCPS component as well as provides examples for usage.
2024-05-02 22:50:09 +08:00
Xu Chun Guang
294b418686
docs: Correct spell error in comment
2024-04-28 17:48:04 +08:00
Xu Chun Guang
226c7772b8
fix(lwip/dhcp_server): Bind dhcps netif to avoid handling the dhcp packet from other netifs
2024-04-28 16:28:48 +08:00
David Cermak
c30f2825d5
fix(netif): Add missing SNTP get-reachablitiy API
2024-02-29 23:37:45 +08:00
zhangyanjiao
04ea824740
fix(lwip): Modify the DHCP offer and DHCP ack from broadcast to unicast
2023-10-09 17:52:01 +08:00
xueyunfei
fff7c6a399
fix(dhcp server):fix set dhcp server poll fail issue
2023-09-13 10:20:02 +08:00
David Cermak
c510560890
lwip: Fix print format -Wformat issues
2023-08-15 11:01:01 +02:00
xueyunfei
15be9a0c3a
fix(dhcp server): Fix dhcp server address pool issue
2023-07-25 20:48:19 +08:00
Ondrej Kosta
3288f83401
feat(network/examples): extended LwIP bridge example
...
Extended LwIP bridge example to support WiFi AP interface and DHCP Server
https://github.com/espressif/esp-idf/issues/5697
2023-06-30 14:38:24 +02:00
wuyuanyi135
97c44ee95d
Fix incorrect invocation of the hook LWIP_HOOK_DHCPS_POST_APPEND_OPTS
...
Fix https://github.com/espressif/esp-idf/issues/11373
2023-05-10 19:52:40 +08:00
Jiang Jiang Jian
df6b33712f
Merge branch 'Bugfix/softap_support_CIDR' into 'master'
...
Bugfix for softap support CIDR
Closes IDFGH-8574
See merge request espressif/esp-idf!22471
2023-03-02 14:03:00 +08:00
David Čermák
956e62c461
Merge branch 'feature/lwip_ipv6_only' into 'master'
...
lwip: Support IPv6 only mode
Closes IDF-6023
See merge request espressif/esp-idf!20468
2023-03-01 21:38:10 +08:00
David Cermak
5f6cb31105
lwip: Support IPv6 only mode
2023-02-27 08:53:34 +01:00
xueyunfei
4f0732cf05
Fixed bug for dhcp server support CIDR
...
Closes https://github.com/espressif/esp-idf/issues/10024
Closes https://github.com/espressif/esp-idf/issues/10559
2023-02-24 14:24:49 +08:00
David Cermak
708641204e
lwip: Add missing esp_sntp_enabled()
2023-02-24 07:23:55 +01:00
David Cermak
e8ee09d817
lwip/sntp: Fix esp_sntp_ API races
...
Some of the esp_sntp_...() APIs that wrap lwip's SNTP
module use tcpip_callback() to execute the lwip functionality
in the correct state (either with locked TCP/IP core,
or within the TCP/IP thread).
tcpip_callback() however doesn't wait for completion of the callback,
which doesn't prevent from using the stack variables after destroy
if used as a parameter.
Introduced in a71fa82.
Fixed by using of tcpip_api_call() instead of the tcpip_callback().
Closes https://github.com/espressif/esp-idf/issues/10611
2023-01-31 18:25:35 +01:00
David Cermak
fa97004faf
lwip: Support for linux target
...
Implement linux port layer and reuse the original FreeRTOS layer
that's compiled and used on linux target as well, by means of FreeRTOS
simulator.
2023-01-31 08:43:45 +01:00
David Cermak
a71fa82177
esp_netif/lwip: Fix core-locking config
...
* Fix thread safety issues in non-core locking
* Add option to verify thread safety issues in lwip (core-lock assertion)
* Make esp_sntp.h thread safe API
* Fix sntp examples
* Fix openthread libs
Closes https://github.com/espressif/esp-idf/issues/9908
Closes https://github.com/espressif/esp-idf/issues/10502
Closes https://github.com/espressif/esp-idf/issues/10466
2023-01-17 16:15:58 +01:00
xueyunfei
1ae1723d23
dhcp server:bugfix softap excedes the range of subnet
2022-12-16 14:25:04 +08:00
David Cermak
9e31c5077d
lwip: Document 32 bit NTP timestamp converstion to 64b time_t
2022-09-21 17:38:37 +02:00
David Cermak
b5d13b9837
lwip/dhcpserver: Support for adding extra opts
...
This enables users appending an extra, user defined options in dhcp
server messages. Example of adding captive_portal option (160) to dhcp
offer message is provided:
* Add idf-lwip hook file (project makefile):
idf_component_get_property(lwip lwip COMPONENT_LIB)
target_compile_options(${lwip} PRIVATE "-I${PROJECT_DIR}/main")
target_compile_definitions(${lwip} PRIVATE "-DESP_IDF_LWIP_HOOK_FILENAME=\"add_captive_portal.h\"")
* Implement appending (add_captive_portal.h):
#pragma once
#define LWIP_HOOK_DHCPS_POST_APPEND_OPTS(netif, dhcp, state, pp_opts) \
if ((state)==DHCPOFFER) { *(pp_opts) = append_captive_portal_uri(*(pp_opts)); }
static inline uint8_t *append_captive_portal_uri(uint8_t *optptr)
{
const static uint8_t DHCP_OPTION_CAPTIVE_PORTAL=160;
const static char CAPTIVE_PORTAL_URI[]="my_uri";
int size = sizeof(CAPTIVE_PORTAL_URI) - 1;
*optptr++ = DHCP_OPTION_CAPTIVE_PORTAL;
*optptr++ = size;
for(int i = 0; i < size; ++i) {
*optptr++ = CAPTIVE_PORTAL_URI[i];
}
return optptr;
}
Merges https://github.com/espressif/esp-idf/pull/3308
2022-07-26 07:09:22 +00:00
xueyunfei
45ad770c37
Icmp: get tos parameter in icmp reply
2022-07-05 11:37:41 +08:00
xueyunfei
b569f4069a
bugfix for add ttl for ping socket
2022-07-05 11:37:41 +08:00
David Cermak
5aa3be11fd
dhcpserver: Minor #idfef fix
2022-05-18 17:11:35 +02:00
David Cermak
27375c7917
esp_netif: Cleanup dhcp-server allocations
2022-03-13 19:40:00 +01:00
David Cermak
1b49cf373f
lwip/dhcps: Fix fuzzer compilation
2022-03-13 19:40:00 +01:00
David Cermak
3d1c05aefb
lwip/dhcps: Add dhcps callback argument for associated netif
2022-03-13 19:40:00 +01:00
David Cermak
5f135741a1
lwip/dhcpserver: Add return value to API that could fail
2022-03-13 19:40:00 +01:00
David Cermak
afe6bc0c88
lwip/dhcp_server: Fix mem-leaks caught by UT's
2022-03-13 19:40:00 +01:00
David Cermak
c005b04d1c
lwip/dhcps: Support for dynamic dhcp server instances
2022-03-13 19:39:21 +01:00
David Cermak
bab051f450
lwip/dhcps: Cleanup internal lwip and esp-netif dependency
2022-03-13 19:38:15 +01:00
David Cermak
05911fd4a1
lwip: Add dhcp servers post processing hook
...
In order to access DHCP messages from clients in different states
and possibly to implement custom handlers that alter the current state,
e.g. reject a client with specific hostname using NAK.
2022-01-26 07:18:48 +01:00
David Cermak
e3d71c984a
lwip: Add client's MAC addr to dhcp server cb
...
* Extended storage for staipassigned events to pass client's MAC address.
* Added client's MAC to dhcp server callback
* Posting the staipassigned events with clients IP and MAC address
2022-01-25 13:08:43 +01:00
AndriiFilippov
f42d1f48c6
unified replace PING_CHECK by ESP_GOTO_ON_FALSE
...
unified replace PING_CHECK by ESP_GOTO_ON_FALSE
replace PING_CHECK macro by ESP_GOTO_ON_FALSE
Include header
grammar fix
2021-11-30 10:12:09 +01:00
David Cermak
7b91343ca7
lwip: Fix ping socket create to allow for fd=0
...
0 is a valid socket description, so should be accepted after we create a
socket. In IDF, though, it's just a theoretical issue, as customers have
to configure:
* FD_SETSIZE = CONFIG_LWIP_MAX_SOCKETS (from makefiles)
* CONFIG_VFS_SUPPORT_IO = n (from menuconfig)
(this configuration is currently broken, but if we adjust the IDF here
and there we could reproduce the issue)
2021-10-26 08:19:26 +02:00
David Čermák
756cc4f8dc
Merge branch 'bugfix/esp_sntp_declare' into 'master'
...
lw-ip: Fix sntp custom options if sntp_get_system_time used
Closes FCS-710
See merge request espressif/esp-idf!14556
2021-08-23 15:11:26 +00:00
David Cermak
457d837b40
lwip: Fix sntp custom options if sntp_get_system_time used
2021-08-23 11:47:44 +02:00
ivmarkov
ee531c748a
lwip: Fix ICMP Ping on specific iface
...
Fix broken parentheses in setsockopt call
Merges https://github.com/espressif/esp-idf/pull/7397
2021-08-19 09:55:26 +02:00