In some cases, packets are still not sent behind the router. I found that NuttX sends the ARP requests not to the router but to the target. Mistake in file net/route/netdev_router.c. From Aleksandr Kazantsev

This commit is contained in:
Gregory Nutt
2017-09-20 13:19:05 -06:00
parent 2790c3b024
commit 12c4c4c8a6
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -290,7 +290,7 @@ int inode_stat(FAR struct inode *inode, FAR struct stat *buf)
else else
#endif #endif
#if defined(CONFIG_FS_SHM) #if defined(CONFIG_FS_SHM)
if (INODE_IS_SHM(inode)) */ if (INODE_IS_SHM(inode))
{ {
buf->st_mode = S_IFSHM; buf->st_mode = S_IFSHM;
} }
+2 -2
View File
@@ -211,7 +211,7 @@ void netdev_ipv4_router(FAR struct net_driver_s *dev, in_addr_t target,
{ {
/* We found a route. Return the router address. */ /* We found a route. Return the router address. */
net_ipv4addr_copy(*router, match.target); net_ipv4addr_copy(*router, match.router);
} }
else else
{ {
@@ -268,7 +268,7 @@ void netdev_ipv6_router(FAR struct net_driver_s *dev,
{ {
/* We found a route. Return the router address. */ /* We found a route. Return the router address. */
net_ipv6addr_copy(router, match.target); net_ipv6addr_copy(router, match.router);
} }
else else
{ {