This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit b0d32b5bd78108a97deba2423a62504371d97283
Author: raiden00pl <[email protected]>
AuthorDate: Thu Oct 22 13:22:25 2026 +0200

    wireless/pktradio: turn the loopback carrier on in ifup
    
    The packet radio loopback never set IFF_RUNNING, and routing by address
    skips a device that is not running, so connect() failed with
    ENETUNREACH.
    
    Assisted-by: Claude Code
    Signed-off-by: raiden00pl <[email protected]>
---
 wireless/pktradio/pktradio_loopback.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/wireless/pktradio/pktradio_loopback.c 
b/wireless/pktradio/pktradio_loopback.c
index 8f8f89b0c18..ff7d44ef160 100644
--- a/wireless/pktradio/pktradio_loopback.c
+++ b/wireless/pktradio/pktradio_loopback.c
@@ -432,6 +432,7 @@ static int lo_ifup(FAR struct net_driver_s *dev)
 #endif
 
   priv->lo_bifup = true;
+  netdev_carrier_on(dev);
   return OK;
 }
 
@@ -460,6 +461,7 @@ static int lo_ifdown(FAR struct net_driver_s *dev)
   /* Mark the device "down" */
 
   priv->lo_bifup = false;
+  netdev_carrier_off(dev);
   return OK;
 }
 

Reply via email to