pkarashchenko commented on code in PR #7862:
URL: https://github.com/apache/nuttx/pull/7862#discussion_r1047624408


##########
net/arp/arp_table.c:
##########
@@ -464,7 +475,16 @@ unsigned int arp_snapshot(FAR struct arp_entry_s *snapshot,
       if (tabptr->at_ipaddr != 0 &&
           now - tabptr->at_time <= ARP_MAXAGE_TICK)
         {
-          memcpy(&snapshot[ncopied], tabptr, sizeof(struct arp_entry_s));
+          outaddr = (FAR struct sockaddr_in *)&snapshot[ncopied].arp_pa;
+          outaddr->sin_family      = AF_INET;
+          outaddr->sin_port        = 0;
+          outaddr->sin_addr.s_addr = tabptr->at_ipaddr;
+          memcpy(snapshot[ncopied].arp_ha.sa_data,
+                 tabptr->at_ethaddr.ether_addr_octet,
+                 sizeof(struct ether_addr));
+          strlcpy((char *)snapshot[ncopied].arp_dev,

Review Comment:
   ```suggestion
             strlcpy((FAR char *)snapshot[ncopied].arp_dev,
   ```



-- 
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: commits-unsubscr...@nuttx.apache.org

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

Reply via email to