summaryrefslogtreecommitdiff
path: root/nuttx/net/socket/recvfrom.c
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-11-23 11:00:22 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-11-23 11:00:22 -0600
commit6796a8dde653598dec5c234bf68b2b3bd246a099 (patch)
tree6377c22fd0583404c4411a1bc71640bdfbc754cb /nuttx/net/socket/recvfrom.c
parent2d0aca092dfe254563e9cc148fb1eed82522d74c (diff)
downloadnuttx-6796a8dde653598dec5c234bf68b2b3bd246a099.tar.gz
nuttx-6796a8dde653598dec5c234bf68b2b3bd246a099.tar.bz2
nuttx-6796a8dde653598dec5c234bf68b2b3bd246a099.zip
Add logic to netdev_findbyaddr() to return the correct network device for the case where a broadcast address is used. This change caused trivial ripples through other files because additional parameters are required for netdev_findbyaddr() when CONFIG_NET_MULTINIC
Diffstat (limited to 'nuttx/net/socket/recvfrom.c')
-rw-r--r--nuttx/net/socket/recvfrom.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/nuttx/net/socket/recvfrom.c b/nuttx/net/socket/recvfrom.c
index 992eb40b3..160246715 100644
--- a/nuttx/net/socket/recvfrom.c
+++ b/nuttx/net/socket/recvfrom.c
@@ -1090,7 +1090,13 @@ static ssize_t pkt_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len,
/* Notify the device driver of the receive call */
- /* netdev_rxnotify(conn->ripaddr); */
+#if 0 /* No */
+#ifdef CONFIG_NET_MULTILINK
+ netdev_rxnotify(conn->lipaddr, conn->ripaddr);
+#else
+ netdev_rxnotify(conn->ripaddr);
+#endif
+#endif
/* Wait for either the receive to complete or for an error/timeout to occur.
* NOTES: (1) net_lockedwait will also terminate if a signal is received, (2)
@@ -1184,7 +1190,11 @@ static ssize_t udp_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len,
/* Notify the device driver of the receive call */
+#ifdef CONFIG_NET_MULTILINK
+ netdev_rxnotify(conn->lipaddr, conn->ripaddr);
+#else
netdev_rxnotify(conn->ripaddr);
+#endif
/* Wait for either the receive to complete or for an error/timeout to occur.
* NOTES: (1) net_lockedwait will also terminate if a signal is received, (2)