Jiang Jiang Jian
41228c83c7
Merge branch 'bugfix/dhcp_server_max_limit' into 'master'
...
dhcp/dhcpserver Fix max station limit check in dhcp server
See merge request idf/esp-idf!2298
2018-05-11 15:50:38 +08:00
Roland Dobai
5129bca67c
VFS: Use smaller numbers as file descriptors
2018-05-07 09:01:56 +02:00
Sagar Bijwe
21584827b3
dhcp/dhcpserver Fix max station limit check in dhcp server
...
Currently when MAX_STATION limit in DHCP config is set to N, dhcp server
issues only N-1 IP addresses. This is problematic from customer
perspective if both SoftAP MAX_STATION and DHCP MAX_STATION limit is set
to same value. With this change DHCP server can issue N addresses that
is inline with the set limit.
Closes TW<20556>
2018-04-24 17:36:55 +05:30
Ivan Grokhotkov
6185e722c3
Revert "Merge branch 'feature/vfs_select' into 'master'"
...
This reverts merge request !2074
2018-04-20 11:51:41 +08:00
Roland Dobai
6852d653bd
Allow VFS file descriptors in select()
2018-04-17 11:25:30 +02:00
Xia Xiaotian
e727582180
Fix two WiFi and LWIP typos
...
1. close github issue: https://github.com/espressif/esp-idf/issues/1792
2. close github issue: https://github.com/espressif/esp-idf/issues/1781
2018-04-05 11:46:42 +08:00
Roland Dobai
7c4b3d50f8
Make error codes globally unique
2018-03-27 08:12:54 +02:00
Jiang Jiang Jian
1d49c0953e
Merge branch 'bugfix/close_socket_when_tcp_connecting' into 'master'
...
Close socket request will abort tcp write/connect
See merge request idf/esp-idf!1687
2018-03-08 20:34:40 +08:00
Angus Gratton
aedb807a02
Merge branch 'bugfix/esp_ping_ms_pr1638' into 'master'
...
esp_ping - Document that timeout units are in milliseconds
See merge request idf/esp-idf!1968
2018-02-26 08:00:44 +08:00
Piyush Shah
6dbb040890
FD_ZERO: Fix a compilation warning
...
Definition of memset is not found if string.h is not included anywhere
Signed-off-by: Piyush Shah <piyush@espressif.com>
2018-02-22 14:10:04 +05:30
Chris Morgan
86bf8798b2
esp_ping - Document that timeout units are in milliseconds
...
Remove 1000 multiplier from esp_ping_set_target() parameters that define time
2018-02-18 18:47:46 -05:00
Roland Dobai
f44cbe9033
Change ESP_ERR_PING_BASE because of collision with ESP_ERR_TCPIP_ADAPTER_BASE
2018-02-06 12:34:12 +01:00
Liu Zhi Fu
2242bf9b37
lwip/esp32/examples: wifi throughput optimizations
...
1. Put some lwip udp rx/tx relating functions to IRAM
2. Put some wifi rx/tx relating functions to IRAMa
3. Reduce wifi dynamic malloc from 4 to 1 for each ebuf
4. Update iperf example accordingly
5. Update libphy.a to v383
2018-01-30 16:27:49 +08:00
Chen Wu
ffc2db0a35
fix(ping): fix crash when multi-ping
...
1. "lwip_socket" should close by "lwip_close_r" other than "lwip_close"
2. for generally compatible, fix all lwip interface to normally socket interface
3. call vTaskDelete when new socket failed in case of task crash
close #https://github.com/espressif/esp32-at/issues/58
2018-01-12 15:54:07 +08:00
XiaXiaotian
32c0d74cc5
Close socket request will abort tcp write/connect
...
When tcp write/connect is running, close socket request will abort
it and continue to delete netconn and close tcp. Do not immediately
return after aborting tcp write/connect. Otherwise, tcp close
requeset will block and tcp write/connect will crash.
2017-12-19 15:20:50 +08:00
zhangyanjiao
210d349fbd
when netconn created directly,netconn_delete() will not call netconn_free(),
...
which will lead to memory leak
Closes https://github.com/espressif/esp-idf/issues/784
2017-12-05 10:42:37 +08:00
Jiang Jiang Jian
aece22f763
Merge branch 'bugfix/tw16581_dhcps_default_behaviour_changed' into 'master'
...
fix the dhcps default behaviour chenged by dns
See merge request !1612
2017-12-01 19:21:26 +08:00
Ivan Grokhotkov
cc600bd517
Merge branch 'bugfix/fix_lwip_macros' into 'master'
...
lwip: Change socket API macros to static-inline
See merge request !1614
2017-11-30 10:28:20 +08:00
Kedar Sovani
1c0543fb17
lwip: Change socket API macros to static-inline
2017-11-29 11:42:14 +05:30
Angus Gratton
1d5389668b
Merge branch 'feature/dhcp_server_options_menuconfig' into 'master'
...
dhcpserver: Option to change lease time multiplier and number of max
See merge request !1595
2017-11-29 07:07:09 +08:00
zhangyanjiao
e315d7ca08
fix the dhcps default behaviour chenged by dns
...
Closes https://github.com/espressif/esp-idf/issues/1285
2017-11-28 16:39:00 +08:00
Krzysztof Bociurko
626ad5f577
dhcpserver: Option to change lease time multiplier and number of max
...
stations connected to it.
Merges: https://github.com/espressif/esp-idf/pull/1206
2017-11-28 15:58:03 +11:00
Jiang Jiang Jian
a83fbd3364
Merge branch 'bugfix/tw16287_tcp_send_succeed_after_station_disconnect' into 'master'
...
In STA mode, tcp_send cannot catch err after disconnect station
See merge request !1540
2017-11-27 21:30:46 +08:00
zhangyanjiao
0b644ee515
fix tcp connect/disconnect carsh
2017-11-27 10:18:58 +08:00
Angus Gratton
4ce68f6163
lwip: Expose number of active socket limits in menuconfig
2017-11-22 14:10:08 +11:00
zhangyanjiao
9fbcc6f922
In STA mode, tcp_send cannot catch err after disconnect station
2017-11-20 15:19:19 +08:00
Liu Zhi Fu
095d163050
lwip: rebind UDP/TCP pcb to valid ip address when ip is changed
...
This change fix the issue UDP/TCP pcb failed to rebind to correct ip address when ip is changed
2017-11-15 16:15:24 +08:00
Liu Zhi Fu
48ca949fd4
lwip: fix socket close crash issue
...
When lwip_close free the socket resource (netconn etc), any work
related to these resource (netconn etc) must be aborted.
2017-11-13 06:00:52 +00:00
Jiang Jiang Jian
004c391591
Merge branch 'feature/adjust_task_stack_size_according_to_nano' into 'master'
...
esp32/lwip: adjust task stack size according 'nano' print
See merge request !1510
2017-11-13 11:18:20 +08:00
Liu Zhi Fu
710055025e
esp32/lwip: adjust task stack size according 'nano' print
...
1. Adjust tcpip/main/event/timer task stack size according 'nano' print
2. If 'nano' print is disabled the task stack size reduces 512 bytes
2017-11-09 10:09:42 +08:00
Dmitry4Bh
a0cedb1f44
Fix type conversion error in components/lwip/api/pppapi.c
...
Pointer tcpip_api_call *m should be converted to pppapi_msg* instead of pppapi_msg_msg*
in pppapi_do_ppp_set_default(), pppapi_do_ppp_free() and so on.
It solve this issue https://github.com/espressif/esp-idf/pull/1028
so there is no need to patch ip4.c because now netif_defauilt is setted correctly.
Also it prevents memory corruption when pppapi_free() is called.
2017-11-03 16:42:56 +08:00
Angus Gratton
696dfbcfee
Merge branch 'bugfix/fix_tcp_crash' into 'master'
...
fix tcp crash
See merge request !1444
2017-10-31 06:18:49 +08:00
Angus Gratton
5c5d5f0acb
Merge branch 'bugfix/tcpip_stack_overflow_logging_printf' into 'master'
...
lwip: Increase minimum TCP/IP task stack size if log level is Debug or Verbose
See merge request !1396
2017-10-26 15:09:22 +08:00
zhangyanjiao
18dcbfa1e2
fix tcp crash
2017-10-24 09:44:44 +08:00
Ivan Grokhotkov
552ba35da5
add missing ioctl declaration
...
Previously ioctl was declared as a macro in lwip/sockets.h.
Disabling LWIP_POSIX_SOCKETS_IO_NAMES removed that declaration.
This adds sys/ioctl.h file and the missing declaration.
Also adds missing includes in vfs.c.
2017-10-23 19:47:33 +08:00
Angus Gratton
e5ae0f5927
lwip: Make LWIP_SOCKET_OFFSET signed, remove need for underflow check
...
This reverts commit 541493d877
.
2017-10-20 18:04:28 +08:00
Liu Zhi Fu
cf7ae8135b
tcpip_adapter/lwip: make dhcp domain name server option configurable
...
Add api to configure dhcp option: domain name server
1.closes https://github.com/espressif/esp-idf/issues/162
2.closes https://github.com/espressif/esp-idf/issues/705
2017-10-19 19:28:00 +08:00
Angus Gratton
86c89ff169
pthread: Add support for pthread thread local storage
...
Refactors LWIP to use this for the LWIP thread local semaphore
2017-10-17 14:46:08 +08:00
Angus Gratton
90bf40587e
Merge branch 'feature/sockets_files_shared_fd_space' into 'master'
...
lwip & vfs: POSIX I/O functions operate on sockets and files (first stage, no select() yet)
See merge request !1352
2017-10-17 14:17:09 +08:00
Jiang Jiang Jian
50c993a1b2
Merge branch 'feature/some_refactor_for_esp_ping' into 'master'
...
lwip: refactor to socket ping
See merge request !875
2017-10-16 17:30:00 +08:00
Angus Gratton
539262b5c2
vfs: Remove fd_offset member
...
This was intended for integrating LWIP, but a different approach was used.
2017-10-16 09:45:50 +08:00
Angus Gratton
541493d877
lwip: Check for underflow in FD_SET()/FD_GET()
...
select() only works with LWIP sockets which have a high LWIP_SOCKET_OFFSET,
so chance of accidental underflow is high.
2017-10-16 09:45:50 +08:00
Angus Gratton
3f83914f7a
lwip: Fix bug with LWIP_SOCKET_OFFSET & IGMP group support
2017-10-16 09:45:50 +08:00
Angus Gratton
3ebf7923d3
lwip: Route LWIP socket POSIX I/O functions via IDF VFS layer
...
No more conflicts between LWIP & newlib read(), write(), fcntl(), etc.
select() still only works if all of the fds are sockets.
Closes https://github.com/espressif/esp-idf/issues/273
2017-10-16 09:45:49 +08:00
Angus Gratton
0c50b65a34
lwip: Increase minimum TCP/IP task stack size if log level is Debug or Verbose
...
... unless nano formatting is enabled.
Fixes stack overflow in tcpip_adapter at the default level, as reported on forum:
https://esp32.com/viewtopic.php?f=2&t=3250&p=15538#p15447
2017-10-16 09:43:23 +08:00
Liu Zhi Fu
3bcaa592ee
lwip: refactor to socket ping
...
Do some refactor to socket ping:
1. Add ping_deinit to kill ping thread
2. Apply configuration set by esp_ping_set_target to socket ping
3. Limit only one ping thread
2017-10-13 16:37:09 +08:00
Liu Zhi Fu
e2d077cea1
lwip: init lwip error code
...
Init the error code to ERR_OK when call tcpip_apimsg
2017-10-13 15:59:04 +08:00
XiaXiaotian
5df39cd4b6
Allocate some memories in SPIRAM first.
...
Try to allocate some WiFi and LWIP memories in SPIRAM first. If
failed, try to allocate in internal RAM then.
2017-10-13 10:11:24 +08:00
XiaXiaotian
ad1350f0ac
Release DHCP structure memory when netif is down.
2017-10-12 17:03:44 +08:00
Angus Gratton
3fdb1944d3
lwip: Disable IPV4 Link-Local addressing by default
...
Keeps existing IDF behaviour the same. Can still be enabled via menuconfig.
2017-10-02 10:50:27 +11:00