mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 10:58:49 +08:00
Networking: Various bugfixes related to IPv6 ping
This commit is contained in:
parent
469bb6075f
commit
8e844a3c27
3 changed files with 12 additions and 11 deletions
|
@ -70,8 +70,8 @@
|
|||
* Poll all packet connections for available packets to send.
|
||||
*
|
||||
* Assumptions:
|
||||
* This function is called from the MAC device driver and may be called from
|
||||
* the timer interrupt/watchdog handle level.
|
||||
* This function is called from the MAC device driver and may be called
|
||||
* from the timer interrupt/watchdog handle level.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
@ -150,8 +150,8 @@ static inline int devif_poll_icmpv6(FAR struct net_driver_s *dev,
|
|||
* Poll all IGMP connections for available packets to send.
|
||||
*
|
||||
* Assumptions:
|
||||
* This function is called from the MAC device driver and may be called from
|
||||
* the timer interrupt/watchdog handle level.
|
||||
* This function is called from the MAC device driver and may be called
|
||||
* from the timer interrupt/watchdog handle level.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
@ -251,8 +251,8 @@ static inline int devif_poll_tcp_connections(FAR struct net_driver_s *dev,
|
|||
* TCP connection.
|
||||
*
|
||||
* Assumptions:
|
||||
* This function is called from the MAC device driver and may be called from
|
||||
* the timer interrupt/watchdog handle level.
|
||||
* This function is called from the MAC device driver and may be called
|
||||
* from the timer interrupt/watchdog handle level.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
@ -430,7 +430,7 @@ int devif_timer(FAR struct net_driver_s *dev, devif_poll_callback_t callback,
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
/* Perform aging on the entries in the Neighbor Table */
|
||||
/* Perform ageing on the entries in the Neighbor Table */
|
||||
|
||||
neighbor_periodic();
|
||||
#endif
|
||||
|
@ -494,11 +494,11 @@ int devif_timer(FAR struct net_driver_s *dev, devif_poll_callback_t callback,
|
|||
|
||||
if (!bstop)
|
||||
#endif
|
||||
#if defined(CONFIG_NET_ICMP6) && defined(CONFIG_NET_ICMPv6_PING)
|
||||
#if defined(CONFIG_NET_ICMPv6) && defined(CONFIG_NET_ICMPv6_PING)
|
||||
{
|
||||
/* Traverse all of the tasks waiting to send an ICMP ECHO request. */
|
||||
|
||||
bstop = devif_poll_icmp6(dev, callback);
|
||||
bstop = devif_poll_icmpv6(dev, callback);
|
||||
}
|
||||
|
||||
if (!bstop)
|
||||
|
|
|
@ -291,7 +291,7 @@ void icmpv6_input(FAR struct net_driver_s *dev)
|
|||
* a thread waiting to received the echo response.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_NET_ICMPv6v6_PING
|
||||
#ifdef CONFIG_NET_ICMPv6_PING
|
||||
else if (icmp->type == ICMPv6_ECHO_REPLY && g_icmpv6_echocallback)
|
||||
{
|
||||
uint16_t flags = ICMPv6_ECHOREPLY;
|
||||
|
|
|
@ -187,7 +187,7 @@ static void icmpv6_echo_request(FAR struct net_driver_s *dev,
|
|||
icmp->len[1] = (reqlen & 0xff);
|
||||
|
||||
icmp->proto = IP_PROTO_ICMP6; /* Next header */
|
||||
icmp->ttl = 255; /* Hop limit */
|
||||
icmp->ttl = IP_TTL; /* Hop limit */
|
||||
|
||||
/* Set the multicast destination IP address */
|
||||
|
||||
|
@ -261,6 +261,7 @@ static uint16_t ping_interrupt(FAR struct net_driver_s *dev, FAR void *conn,
|
|||
FAR struct icmpv6_ping_s *pstate = (struct icmpv6_ping_s *)pvpriv;
|
||||
|
||||
nllvdbg("flags: %04x\n", flags);
|
||||
|
||||
if (pstate)
|
||||
{
|
||||
/* Check if this is a ICMPv6 ECHO reply. If so, return the sequence
|
||||
|
|
Loading…
Reference in a new issue