mirror of
https://github.com/apache/nuttx.git
synced 2026-09-27 18:58:27 +08:00
Extend device specific callbacks to ICMPv6 and ARP. Fix some IPv6 compilation errors that have crept in
This commit is contained in:
@@ -162,7 +162,7 @@ int ipv6_input(FAR struct net_driver_s *dev)
|
||||
g_netstats.ipv6.vhlerr++;
|
||||
#endif
|
||||
|
||||
nlldbg("Invalid IPv6 version: %d\n", ipv6->vtc >> 4);
|
||||
nlldbg("ERROR: Invalid IPv6 version: %d\n", ipv6->vtc >> 4);
|
||||
goto drop;
|
||||
}
|
||||
|
||||
@@ -174,12 +174,12 @@ int ipv6_input(FAR struct net_driver_s *dev)
|
||||
*
|
||||
* The length reported in the IPv6 header is the length of the payload
|
||||
* that follows the header. The device interface uses the d_len variable for
|
||||
* holding the size of the entire packet, including the IP and link layer
|
||||
* headers.
|
||||
* holding the size of the entire packet, including the IP header and link
|
||||
* layer header.
|
||||
*/
|
||||
|
||||
pktlen = (ipv6->len[0] << 8) + ipv6->len[1] + IPv6_HDRLEN + netdev_ip +
|
||||
netdev_ipv6_hdrlen(dev);
|
||||
pktlen = ((uint16_t)ipv6->len[0] << 8) + (uint16_t)ipv6->len[1] +
|
||||
IPv6_HDRLEN + netdev_ipv6_hdrlen(dev);
|
||||
|
||||
if (pktlen <= dev->d_len)
|
||||
{
|
||||
@@ -187,7 +187,7 @@ int ipv6_input(FAR struct net_driver_s *dev)
|
||||
}
|
||||
else
|
||||
{
|
||||
nlldbg("IP packet shorter than length in IP header\n");
|
||||
nlldbg("ERROR: IP packet shorter than length in IP header\n");
|
||||
goto drop;
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ int ipv6_input(FAR struct net_driver_s *dev)
|
||||
* packets.
|
||||
*/
|
||||
|
||||
nlldbg("No IP address assigned\n");
|
||||
nlldbg("ERROR: No IP address assigned\n");
|
||||
goto drop;
|
||||
}
|
||||
|
||||
@@ -282,7 +282,7 @@ int ipv6_input(FAR struct net_driver_s *dev)
|
||||
g_netstats.ipv6.protoerr++;
|
||||
#endif
|
||||
|
||||
nlldbg("Unrecognized IP protocol: %04x\n", ipv6->proto);
|
||||
nlldbg("ERROR: Unrecognized IP protocol: %04x\n", ipv6->proto);
|
||||
goto drop;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user