diff --git a/net/devif/devif_poll.c b/net/devif/devif_poll.c index 0418e1188d..3070584b61 100644 --- a/net/devif/devif_poll.c +++ b/net/devif/devif_poll.c @@ -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) diff --git a/net/icmpv6/icmpv6_input.c b/net/icmpv6/icmpv6_input.c index 4e2f223661..cb375e213f 100644 --- a/net/icmpv6/icmpv6_input.c +++ b/net/icmpv6/icmpv6_input.c @@ -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; diff --git a/net/icmpv6/icmpv6_ping.c b/net/icmpv6/icmpv6_ping.c index 5e67ac86de..f389bcca13 100644 --- a/net/icmpv6/icmpv6_ping.c +++ b/net/icmpv6/icmpv6_ping.c @@ -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