You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/04/23 13:53:08 UTC

[GitHub] [incubator-nuttx] patacongo commented on a change in pull request #3598: net/ip: bypass UDP input only when the device address is invalid

patacongo commented on a change in pull request #3598:
URL: https://github.com/apache/incubator-nuttx/pull/3598#discussion_r619238232



##########
File path: net/devif/ipv6_input.c
##########
@@ -433,7 +433,17 @@ int ipv6_input(FAR struct net_driver_s *dev)
             }
           else
 #endif
-          if (nxthdr != IP_PROTO_UDP)
+#ifdef NET_UDP_HAVE_STACK
+          if (nxthdr == IP_PROTO_UDP &&
+              net_ipv6addr_cmp(dev->d_ipv6addr, g_ipv6_unspecaddr))
+            {
+              /* Accecpt the UDP packet if the devices has not obtained
+               * the IP address to solve the compatibility issue of DHCP
+               * BOOTP working on unicast mode.
+               */
+            }
+          else
+#endif

Review comment:
       What is the rationale for this?  I think it is incorrect... at a minimum, the comment is incorrect.  DHCP is IPv4 only.  Address assignment is normally done using other ICMPv6-based logic (router commands, auto configuration, neighbor discovery.
   
   There is a UDP-based version of DHCPv6, but it is not frequently used.  And neither client nor server DHCPv6 is available in NuttX.
   
   I think that any UDP-based hacks in IPv6 should be removed.




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org