xiaoxiang781216 commented on code in PR #18247:
URL: https://github.com/apache/nuttx/pull/18247#discussion_r2736794710


##########
net/netdev/netdev_findbyaddr.c:
##########
@@ -346,8 +346,11 @@ FAR struct net_driver_s *netdev_findby_ripv4addr(in_addr_t 
lipaddr,
            * sure of that and, in any event, there is nothing we can do
            * about that here.
            */
-
-          return netdev_default();
+          dev = netdev_default();
+          if (dev && net_ipv4addr_cmp(dev->d_ipaddr, INADDR_ANY))
+            return NULL;

Review Comment:
   add {}



##########
net/netdev/netdev_findbyaddr.c:
##########
@@ -393,7 +396,11 @@ FAR struct net_driver_s *netdev_findby_ripv4addr(in_addr_t 
lipaddr,
    * try the default network device.
    */
 
-  return netdev_default();
+  dev = netdev_default();
+  if (dev && net_ipv4addr_cmp(dev->d_ipaddr, INADDR_ANY))

Review Comment:
   ditto



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to