ICMPV6 - Linux

The ICMP protocol for IPv6 is similar to ICMP for IPv4, but it has a few significant changes. For example, the destination unreachable, echo request, and echo reply messages are similar [RFC 2463]. In addition, the ICMPv6 implementation is similar to ICMPv4 discussed in Chapter 9. The function icmpv6_rcv is the handler for ICMPv6 packets, IPPROTO_ICMPV6. It is implemented in file linux /net /ipv6 /icmp.c.

We will skip the preliminaries and show how each type of ICMPv6 packet is processed.

We don’t need to do anything special for an incoming echo reply.

There is a note in the comments that suggests that we should update the destination cache if the packet contained a router header. However, the current version of the destination cache won’t support this.

If the packet was 2 bit, we try to do a path MTU discovery, which hopefully will reduce the size of the MTU for this route.

Here we drop through to do the notification. By notifying, we will inform the application of the problem via the open socket.

The next four packet types are neighbor discover packets..

In IPv6, the multicast group management reports and queries are defined as ICMP messages [RFC 2710]. When we receive these messages we forward to the “IGMP” protocol for IPv6. These message types are discussed later.

This type is informational.

We have an unknown error. We will notify the upper layers.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Linux Topics