diff --git a/ChangeLog b/ChangeLog index 8740afb4c8b..81893ba16f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5713,3 +5713,6 @@ looking the the correct router IP address to use in the ARP request. In that case, we want the MAC address of the router, not of the the target endpoint (2013-10-5). + * net/netdev_rxnotify.c and others: Use the new signature of rxnotify + caused by the routing table. From Max Holtzberg (2013-10-6). + diff --git a/net/netdev_rxnotify.c b/net/netdev_rxnotify.c index 8c342550794..f4352661bd6 100644 --- a/net/netdev_rxnotify.c +++ b/net/netdev_rxnotify.c @@ -80,7 +80,7 @@ * Notify the device driver that the application waits for RX data. * * Parameters: - * raddr - Pointer to the remote address to send the data + * raddr - The remote address to send the data * * Returned Value: * None @@ -90,13 +90,12 @@ * ****************************************************************************/ -void netdev_rxnotify(const uip_ipaddr_t *raddr) +void netdev_rxnotify(const uip_ipaddr_t raddr) { + /* Find the device driver that serves the subnet of the remote address */ - /* @HACK how to get the interface with INADDR_ANY? */ - - struct uip_driver_s *dev = netdev_findbyname("eth0"); + struct uip_driver_s *dev = netdev_findbyaddr(raddr); if (dev && dev->d_rxavail) { diff --git a/net/netdev_txnotify.c b/net/netdev_txnotify.c index 18e4e1b702e..fe4c1d3dded 100644 --- a/net/netdev_txnotify.c +++ b/net/netdev_txnotify.c @@ -80,7 +80,7 @@ * Notify the device driver that new TX data is available. * * Parameters: - * raddr - Pointer to the remote address to send the data + * raddr - The remote address to send the data * * Returned Value: * None diff --git a/net/recvfrom.c b/net/recvfrom.c index 388db3930b8..99802a80ad7 100644 --- a/net/recvfrom.c +++ b/net/recvfrom.c @@ -959,7 +959,7 @@ static ssize_t udp_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, /* Notify the device driver of the receive call */ - netdev_rxnotify(&conn->ripaddr); + netdev_rxnotify(conn->ripaddr); /* Wait for either the receive to complete or for an error/timeout to occur. * NOTES: (1) uip_lockedwait will also terminate if a signal is received, (2)