Processing packets with unknown IPv6 extension headers

时间秒杀一切 提交于 2019-12-30 06:24:34

问题


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:


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.


来源:https://stackoverflow.com/questions/9847923/processing-packets-with-unknown-ipv6-extension-headers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!