mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
Dispatch ICMP_POLL to device's callback list too since icmpv6_neighbor still append the callback into this list.
This commit is contained in:
@@ -365,9 +365,12 @@ static inline int devif_poll_icmpv6(FAR struct net_driver_s *dev,
|
|||||||
|
|
||||||
/* Traverse all of the allocated ICMPV6 connections and perform the poll action */
|
/* Traverse all of the allocated ICMPV6 connections and perform the poll action */
|
||||||
|
|
||||||
while (!bstop && (conn = icmpv6_nextconn(conn)) != NULL)
|
do
|
||||||
{
|
{
|
||||||
/* Perform the ICMPV6 poll */
|
/* Perform the ICMPV6 poll
|
||||||
|
* Note: conn equal NULL in the first iteration means poll dev's callback list
|
||||||
|
* since icmpv6_neighbor still append it's callback into this list.
|
||||||
|
*/
|
||||||
|
|
||||||
icmpv6_poll(dev, conn);
|
icmpv6_poll(dev, conn);
|
||||||
|
|
||||||
@@ -379,6 +382,7 @@ static inline int devif_poll_icmpv6(FAR struct net_driver_s *dev,
|
|||||||
|
|
||||||
bstop = callback(dev);
|
bstop = callback(dev);
|
||||||
}
|
}
|
||||||
|
while (!bstop && (conn = icmpv6_nextconn(conn)) != NULL);
|
||||||
|
|
||||||
return bstop;
|
return bstop;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ void icmpv6_poll(FAR struct net_driver_s *dev,
|
|||||||
|
|
||||||
/* Perform the application callback */
|
/* Perform the application callback */
|
||||||
|
|
||||||
(void)devif_conn_event(dev, conn, ICMPv6_POLL, conn->list);
|
devif_conn_event(dev, conn, ICMPv6_POLL, conn ? conn->list : &dev->d_conncb);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_NET_ICMPv6_SOCKET || CONFIG_NET_ICMPv6_NEIGHBOR */
|
#endif /* CONFIG_NET_ICMPv6_SOCKET || CONFIG_NET_ICMPv6_NEIGHBOR */
|
||||||
|
|||||||
Reference in New Issue
Block a user