In any Wi-Fi firmware that I write with nRF Connect SDK I get this error message in my console logs:
<err> net_icmpv6: ICMPv6 handling failure (-2)
This happens in every app I've run, including all the code in your Wi-Fi Fundamentals course, samples and my own firmware. It happens due to incoming messages from my network, even when my app is sitting idle (not sending anything). I sometimes get 1 or 2 per second, and other times it is many seconds between these errors.
I traced it down a little and it appears to be from incoming ICMP messages that the Zephyr or Nordic firmware doesn't know how to deal with.
I am using v2.6.1 of the SDK.
Do you know what this error message means, and how to get rid of it?
----
I turned on debug logging in the icmpv6.c module and it looks like ICMPv6 input that triggers the error is an ICMPv6 Redirect Message type 137:
[00:00:06.478,851] <inf> tftp_test: Band: 5GHz [00:00:06.478,881] <inf> tftp_test: Channel: 153 [00:00:06.478,881] <inf> tftp_test: Security: WPA2-PSK [00:00:06.478,881] <inf> tftp_test: MFP: Optional [00:00:06.478,912] <inf> tftp_test: RSSI: -41 [00:00:06.478,942] <inf> tftp_test: Got Wi-Fi Connection [00:00:06.478,942] <inf> tftp_test: Waiting for Wi-Fi DHCP [00:00:07.301,116] <dbg> net_icmpv6: net_icmpv6_input: (rx_q[0]): ICMPv6 Router Advertisement received type 134 code 0 [00:00:07.307,861] <dbg> net_icmpv6: net_icmpv6_input: (rx_q[0]): ICMPv6 Neighbor Advertisement received type 136 code 0 [00:00:07.309,082] <dbg> net_icmpv6: net_icmpv6_input: (rx_q[0]): ICMPv6 Neighbor Advertisement received type 136 code 0 [00:00:07.384,490] <dbg> net_icmpv6: net_icmpv6_input: (rx_q[0]): ICMPv6 Router Advertisement received type 134 code 0 [00:00:07.389,556] <dbg> net_icmpv6: net_icmpv6_input: (rx_q[0]): ICMPv6 Neighbor Advertisement received type 136 code 0 [00:00:07.390,747] <dbg> net_icmpv6: net_icmpv6_input: (rx_q[0]): ICMPv6 Neighbor Advertisement received type 136 code 0 [00:00:07.484,863] <inf> net_config: IPv6 address: 2601:19b:e00:50bc:f6ce:36ff:fe00:1caa [00:00:09.841,979] <dbg> net_icmpv6: net_icmpv6_input: (rx_q[0]): ICMPv6 Echo Request received type 128 code 0 [00:00:09.842,071] <dbg> net_icmpv6: icmpv6_handle_echo_request: (rx_q[0]): Received Echo Request from fe80::ea9f:80ff:fee4:45ec to ff02::1 [00:00:09.842,163] <dbg> net_icmpv6: icmpv6_handle_echo_request: (rx_q[0]): Sending Echo Reply from fe80::f6ce:36ff:fe00:1caa to fe80::ea9f:80ff:fee4:45ec [00:00:09.848,693] <dbg> net_icmpv6: net_icmpv6_input: (rx_q[0]): ICMPv6 Redirect Message received type 137 code 0 [00:00:09.848,724] <err> net_icmpv6: ICMPv6 handling failure (-2) [00:00:11.491,394] <inf> net_dhcpv4: Received: 192.168.1.121 [00:00:11.491,455] <inf> net_config: IPv4 address: 192.168.1.121 [00:00:11.491,455] <inf> net_config: Lease time: 86400 seconds [00:00:11.491,485] <inf> net_config: Subnet: 255.255.255.0 [00:00:11.491,516] <inf> net_config: Router: 192.168.1.1 [00:00:11.491,546] <inf> tftp_test: IP address: 192.168.1.121 [00:00:11.491,729] <inf> tftp_test: Got Wi-Fi DHCP
I traced the code out a bit with the debugger, and when a redirect message comes in and icmp_call_handlers() in zephyr/subsys/net/ip/icmp.c is called, it looks through the list of handlers for different ICMP message types and doesn't find one for Redirect type 137.
Is this handler something I have to enable via a CONFIG option or something?