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



##########
File path: net/netdev/netdev_register.c
##########
@@ -333,6 +335,18 @@ int netdev_register(FAR struct net_driver_s *dev, enum 
net_lltype_e lltype)
             return -EINVAL;
         }
 
+      /* Update the package length */
+
+      if (dev->d_llhdrlen == 0)
+        {
+          dev->d_llhdrlen = llhdrlen;
+        }
+
+      if (dev->d_pktsize == 0)
+        {
+          dev->d_pktsize = pktsize;
+        }
+

Review comment:
       This could break network drivers that do not initialilze dev->d_llhdrlen 
and d_pktsize to zero.  Did you verify that all network drivers do this?




----------------------------------------------------------------
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:
[email protected]


Reply via email to