net: fix ipv6_input for 6lowpan

6lowpan response for tcp and icmp was mssing because of wrong evaluation
of `dev->d_lltype`.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
This commit is contained in:
Laczen JMS
2025-02-12 10:19:50 -03:00
committed by Alan C. Assis
parent 381d3fe64f
commit 31270a8479
+10 -6
View File
@@ -455,11 +455,13 @@ static int ipv6_in(FAR struct net_driver_s *dev)
*
* Case 3 is handled here. Logic here detects if (1) an attempt
* to return with d_len > 0 and (2) that the device is an
* IEEE802.15.4 MAC network driver. Under those conditions, 6LoWPAN
* logic will be called to create the IEEE80215.4 frames.
* IEEE802.15.4 MAC or PKTRADIO network driver .
* Under those conditions, 6LoWPAN logic will be called to create the
* IEEE80215.4 or PKTRADIO frames.
*/
if (dev->d_len > 0 && dev->d_lltype == CONFIG_NET_6LOWPAN)
if ((dev->d_len > 0 && dev->d_lltype == NET_LL_IEEE802154) ||
(dev->d_len > 0 && dev->d_lltype == NET_LL_PKTRADIO))
{
/* Let 6LoWPAN handle the TCP output */
@@ -501,11 +503,13 @@ static int ipv6_in(FAR struct net_driver_s *dev)
*
* Case 2 is handled here. Logic here detects if (1) an attempt
* to return with d_len > 0 and (2) that the device is an
* IEEE802.15.4 MAC network driver. Under those conditions, 6LoWPAN
* logic will be called to create the IEEE80215.4 frames.
* IEEE802.15.4 MAC or PKTRADIO network driver.
* Under those conditions, 6LoWPAN logic will be called to create the
* IEEE80215.4 or PKTRADIO frames.
*/
if (dev->d_len > 0 && dev->d_lltype == CONFIG_NET_6LOWPAN)
if ((dev->d_len > 0 && dev->d_lltype == NET_LL_IEEE802154) ||
(dev->d_len > 0 && dev->d_lltype == NET_LL_PKTRADIO))
{
/* Let 6LoWPAN handle the ICMPv6 output */