Processing packets with unknown IPv6 extension hea

2020-03-02 04:27发布

Question

Should one discard a packet with an unknown IPv6 extension header?

Details

I could not find an answer to this question by examining the RFC. The book IPv6 Essentials states on page 22:

If a node is required the next header but cannot identify the value in the Next Header field, it is required to discard the packet and send an ICMPv6 Parameter Problem message back to the source of the packet.

I read this as: a IPv6 packet with a custom extension header cannot will be dropped unless all IPv6 stacks along the path know how to deal with the header. Or equivalently, if a single IPv6 device along the path does not know how to handle a custom header, it discards the packet.

This seems at odds with the general idea of extension: I cannot introduce a new extension without upgrading the whole network, even if the custom extension does not influence a generic IPv6 stack.

1条回答
狗以群分
2楼-- · 2020-03-02 05:20

From RFC2460 (Internet Protocol, Version 6 (IPv6)):

If, as a result of processing a header, a node is required to proceed
to the next header but the Next Header value in the current header is
unrecognized by the node, it should discard the packet and send an
ICMP Parameter Problem message to the source of the packet, with an
ICMP Code value of 1 ("unrecognized Next Header type encountered")
and the ICMP Pointer field containing the offset of the unrecognized
value within the original packet.  The same action should be taken if
a node encounters a Next Header value of zero in any header other
than an IPv6 header.

As extension headers use the Next Header field I'd interpret this as meaning you're expected to discard the packet and send an ICMP error back. Note that his only applies to the destination host. Routers are supposed to ignore all extension headers:

With one exception, extension headers are not examined or processed
by any node along a packet's delivery path, until the packet reaches
the node (or each of the set of nodes, in the case of multicast)
identified in the Destination Address field of the IPv6 header.
查看更多
登录 后发表回答