Commit Graph

122 Commits (4b3cddff2a66d5b13ad861e8782d1d630c2479c1)

Author SHA1 Message Date
Antti Kauppila 7904ff05b3 more error handling added for ctr and hmac 2020-03-31 15:59:56 +03:00
Teppo Järvelin c5d5d21f05 Added missing optimizations based on mbedtls/baremetal.h config 2020-03-31 14:21:45 +03:00
Teppo Järvelin 17e513891b Added new global rng, needed for MbedTLS optimisations 2020-03-31 14:21:44 +03:00
Michal Paszta dc142979d8 LWIP: propagate the apimsg->err out of netconn_apimsg() 2020-03-26 13:45:50 +02:00
Arun S 19cbfd7c15 Reverting #12312 as it breaking current WiFI
connect()->Disconnect() sequence

This reverts commit 18285e1fc1
2020-03-05 16:44:59 +05:30
Kevin Bracey aa9058a293 C++11-ify virtualisation in lwIP classes
Use `override` and `final` where appropriate, and eliminate unnecessary
`virtual`.

Some other C++11 simplifications.
2020-02-25 10:09:10 +02:00
Kevin Bracey b4c1f7f3da Correct LWIP::get_ip_address
Previous change that removed string-based APIs missed
`LWIP::get_ip_address`. Remove string-based method (which is not
overriding anything in `NetworkInterface`) and add missing binary form
to implement `NetworkInterface::get_ip_address`.
2020-02-25 09:57:56 +02:00
Michal Paszta f21b8c7fc1 Remove remaining string-based API functions
This removes any compiler warnings.
2020-02-06 11:27:50 +02:00
Martin Kojtal 8b829e5c41
Merge pull request #12312 from cy-arsm/cy-arsm/pr/ipv6-fix-SoftAPmode
Fix to sending IPV6 UPD packet fails IPv6 enabled in SoftAP intf
2020-02-03 16:55:09 +00:00
Arun S 18285e1fc1 Pairing fails when IPv6 enabled in SoftAP intf
Issue: udp_sendto() Fails for multicast IPV6 packet when interface is switched from SoftAP to STA mode.
When SoftAP start is called,  add_ethernet_interface() will be called internally to add interface details into  netif_list.
When switching from SoftAP to STA mode,  add_ethernet_interface() will be called again to append the interace details into netif_list.
When udp_sendto() is called, ip6_route() will return interface as NULL since it consider device as single interface.
Fix: SoftAP mode Stop, call remove_ethernet_interface() to remove the interface from the netif_list.
2020-01-29 15:07:52 +05:30
Kevin Bracey 988ef099c7 LWIP: don't pbuf_free(NULL) on socket close
`pbuf_free(NULL)` causes an `LWIP_ASSERT`. Make the call conditional.

Fixes #12184
2020-01-07 13:20:14 +02:00
Anna Bridge 5bef46b71a
Merge pull request #12063 from michalpasztamobica/get_ip_address_if_fixed
Move get_ip_address_if() to NetworkStack and include it in multihoming test
2019-12-24 11:04:59 +00:00
Michal Paszta 02a23e50ba LWIP: Remove unused MBOX configs
The configs have never been used and LWIP just uses its own settings.
2019-12-18 12:27:07 +02:00
Michal Paszta c2856ef710 Remove deprecated string-based get_ip_address_if 2019-12-12 09:22:32 +02:00
Michal Paszta d5d04ebb90 Move get_ip_address_if to the right class
get_ip_address_if was wrongly added to OnboardNetworkStack::Interface, while it should in fact be placed directly in OnboardNetworkStack.
2019-12-12 09:20:27 +02:00
Piotr Stolarz 9a70621507 Review fixes 2019-12-03 18:04:15 +01:00
Piotr Stolarz feb6a46619 [BUGFIX] LWIP system mailbox overflow fix 2019-11-28 14:32:36 +01:00
Martin Kojtal 1a2ecebc62
Merge pull request #11881 from hugueskamba/hk-UBLOX_EVK_ODIN_W2-enable-baremetal
UBLOX_EVK_ODIN_W2: Fix baremetal build and greentea tests
2019-11-25 08:40:33 +01:00
Martin Kojtal 38a8c0e28f
Merge pull request #11914 from michalpasztamobica/refactor_string_based_apis
Deprecate string-based APIs in IPCore
2019-11-22 12:00:56 +01:00
Hugues Kamba 157d126769 UBLOX_EVK_ODIN_W2: Fix baremetal build and greentea tests
Remove lwIP reliant networking and BLE tests for baremetal

Mbed OS 5 ported lwIP in its OS mode and uses threads. Networking
that rely on lwIP needs to be removed so it can be compiled with the
baremetal profile.

The BLE cordio Greentea tests are also disabled given that the feature
is not supported without an RTOS.
2019-11-22 10:55:39 +00:00
Michal Paszta fd5b4b9119 Deprecate string-based APIs in IPCore
MBED_DEPRECATE macros is added to string-based APIs.
New, non-string-based APIs are added in their place.
Wiced binaries rebuilt
Any existing stubs or mocks are adjusted to compile and run with the newly added non-string based functions.
2019-11-22 11:31:12 +02:00
Martin Kojtal 784b03b8b4
Merge pull request #11877 from cy-arsm/cy-arsm/topic/dualstack-ipv6-linklocal-fix
Fix for sending IPv6 UDP packet over link local interface
2019-11-21 14:27:43 +01:00
Arun S dc7178f176 Modified LwIP stack and LwIP mbed-os wrapper to support sending IPv6
UDP packets when IPv4 and IPv6 dual mode stack is enabled and the IPv6
packet is sent over link-local inerface.
2019-11-18 17:18:50 +05:30
Anna Bridge 7cfa6faa5b
Merge pull request #11714 from tymoteuszblochmobica/linklocal
LWIP::get_ipv6_addr for link-local only
2019-11-15 12:32:54 +00:00
Tymoteusz Bloch 6514433b68 LWIP::get_ipv6_addr fixed to avoid returning NULL even if only linklocal adress exits. 2019-11-14 17:19:54 +01:00
Martin Kojtal f27aec3377
Merge pull request #11279 from cy-jayasankar/pr/added-ipv6-link-local-address-api
Add API to get ipv6 link local address
2019-11-04 15:28:41 +01:00
Jayasankar Nara cb51fa57e2 Add API to get ipv6 link local address.
Protocols like mdns requires IPv6 link local address to be advertised in its
records (AAAA record). LWIP::Interface::bringup() API is creating IPv6 link
local address;But as of now there is no API exposed by mbed-os to get the
IPv6 link local address.

This new API is required to deliver mDNS library support on mbed-os for Cypress
platforms. Unit tested it by invoking get_ipv6_link_local_address with a simple
application.
2019-11-01 03:43:36 +05:30
Balaji 5b9291628e rebase mbed_lib.json to upstream/master 2019-10-25 12:39:27 -07:00
Balaji 948e989d27 fix mbed_lib.json add , 2019-10-25 12:14:31 -07:00
Balaji d9045b4840 index on lwip-rawsocket: 6905b1b547 Incorporate review comments from @kjbracey-arm 2019-10-25 11:00:55 -07:00
Balaji 6905b1b547 Incorporate review comments from @kjbracey-arm 2019-10-25 10:51:50 -07:00
Balaji ab883350a0 Incorporate review comments from @kjbracey-arm 2019-10-25 10:48:12 -07:00
Balaji b91836a94d fix astyle convention 2019-10-25 10:48:12 -07:00
Balaji 1a7288d220 fix astyle convention 2019-10-25 10:48:12 -07:00
Balaji d92a946b78 fix astyle convention 2019-10-25 10:48:12 -07:00
Balaji 0b5dea5f99 Changes to the PR 10978 (LWIP: Add RAWIPSocket support) 2019-10-25 10:48:12 -07:00
Martin Kojtal f6c28e54b6
Merge pull request #11586 from AnttiKauppila/lwip_improvements
Cleaned up Mbed LWIP configurations
2019-10-21 09:35:52 +02:00
Sathish Kumar Mani 5b791a4345 Fixes IPv6 multicast join issue
Problem Statement:
During multicast join sequence, InternetSocket::join_multicast_group() calls InternetSocket::modify_multicast_group(). modify_multicast_group() sets up the multicast group address (i.e., mreq.imr_multiaddr) to be joined and the interface address (i.e., mreq.imr_interface) to be used for the multicast join request. The interface address is initialized with the default value, which sets the version of interface address to NSAPI_UNSPEC. This results in LWIP::setsockopt() API to attempt IPv6 multicast join on the IPv4 interface address, hence IPv6 multicast join always fails with the protocol error.

Fix:
Initialize interface address version based on the multicast address version in LWIP::setsockopt(), before attempting multicast join operation.
2019-10-14 17:41:27 +05:30
Antti Kauppila 691fc5525d Fix build issue 2019-10-11 15:25:50 +03:00
Antti Kauppila d34a40a745 Cleaned up Mbed LWIP configurations 2019-09-27 15:52:40 +03:00
Balaji 4f8036b682 TCP Packet loss when TCP Receive mailbox is full. 2019-09-25 10:58:25 -07:00
Martin Kojtal c1f1b2a609
Merge pull request #11339 from sathishm6/topic/pr-bct-auto-ip-fix
mbed-os/LwIP changes and fixes in auto-IP for Bonjour Conformance Test
2019-08-29 08:38:32 +02:00
Martin Kojtal 95fc8cfa2c
Merge pull request #11322 from kyle-cypress/pr/lwip-buffer-size
Updated the LWIP buffer pool size for PSoC6
2019-08-28 19:05:55 +02:00
Tymoteusz Bloch 83aa8b038b Supressed coverity warnings for intentional NULL passing to ip_reass_dequeue_datagram 2019-08-28 13:12:07 +01:00
Sathish Kumar Mani a4aeee941d mbed-os/LwIP changes and fixes in auto-IP for Bonjour Conformance Test
This PR is to fix the issues in LwIP for AutoIP which is required for passing Bonjour Conformance Test for mDNS. Following gives the summary of the changes/fixes added.

Changes:

1. Following issues are fixed in LwIP for AutoIP.
- Fixed bug in max conflict rate limiting: According to RFC section RFC 3927 Section 2.2.1 conflict probe interval should be increased to 60 seconds, once conflict count reaches after MAX_CONFLICTS (i.e., 10) counts. The initial value of 'autoip->tried_llipaddr' is 0. Hence the probe interval (i.e., autoip->ttw) should be increased to 60 secs when 'autoip->tried_llipaddr >= MAX_CONFLICTS'
- Added code to free 'autoip' client in autoip_stop() API: New 'autoip' client is allocated in autoip_start() API, and the client is not freed during autoip_stop(). This would result in memory leak, if not freed. Updated autoip_stop() API to take care of releasing the memory allocated for 'autoip' client.

2. Introduced a configurable macro "MBED_CONF_LWIP_DHCP_TIMEOUT" in "lwipopts.h" to configure DHCP timeout based on the usecase requirement. For example: bonjour conformance test would need a DHCP timeout value which is grater than 320 secs to run mDNS probing test to verify protocol compilance of the implementation.

Tested the fixes using Bonjour Conformance Test tool Version 1.5.0 for IPv4. It has successfully passed Bonjour Conformance Test.
2019-08-28 15:57:36 +05:30
Sathish Kumar Mani fe252a77c1 mbed-os/LwIP changes and fixes in auto-IP for Bonjour Conformance Test.
Changes:
  1. Following issues are fixed in LwIP for AutoIP.
     a) Fixed bug in max conflict rate limitting.
        - According to RFC section RFC 3927 Section 2.2.1 conflict probe interval
          should be increased to 60 seconds, once conflict count reaches after
          MAX_CONFLICTS (i.e., 10) counts.
        - The initial value of 'autoip->tried_llipaddr' is 0. Hence the probe
          interval (i.e., autoip->ttw) should be increased to 60 secs
          when 'autoip->tried_llipaddr >= MAX_CONFLICTS'

     b) Added code to free 'autoip' client in autoip_stop() API.
        - New 'autoip' client is allocated in autoip_start() API, and the client
          is not freed during autoip_stop(). This would result in memory leak
          if not freed.
        - Updated autoip_stop() API to take care of releasing the memory allocated
          for 'autoip' client.
  2. Introduced a configurable macro "MBED_CONF_LWIP_DHCP_TIMEOUT" in "lwipopts.h"
     to configure DHCP timeout based on the usecase requirement. For example:
     bonjour conformance test would need a DHCP timeout value which is grater than
     320 secs to run mDNS probing test to verify protocol compilance of the implementation.
2019-08-27 08:17:43 +05:30
midd 2168b40948 Updated the LWIP buffer pool size for PSoC6
Increase size to 14 for all devices to increase heap availability.
2019-08-23 17:54:14 -07:00
Martin Kojtal d0c917cb32
Merge pull request #11274 from VVESTM/vve_eth_h7
Add ethernet support on NUCLEO_H743ZI board
2019-08-22 09:42:45 +02:00
Vincent Veron 93b8164830 lwip: STM32H7: specify heap location
Signed-off-by: Vincent Veron <vincent.veron@st.com>
2019-08-21 11:41:37 +02:00
Mika Leppänen 4e60d2f39c Corrected PPP thread stack sizes and network interface
Corrected PPP thread stack size for RZ_A1_EMAC, CYW943012P6EVB_01,
CY8CPROTO_062_4343W, CY8CKIT_062_WIFI_BT and CY8CKIT_062S2_43012
that have special configuration for PPP thread size. Removed
pppInterface() helper call from network interface. It causes binary
compatibility break with precompiled network interface classes. Call
is helper function to check network interface type in case it is
unknown, and is not mandatory or used with PPP.
2019-08-20 13:37:13 +03:00