【问题标题】:Where does the urgent pointer field in TCP header point to?TCP头中的紧急指针字段指向哪里?
【发布时间】:2021-09-20 00:15:13
【问题描述】:

是指向紧急数据的最后一个字节,还是指向紧急数据后面的字节?

更新: RFC 6093:

2.2.  Semantics of the Urgent Pointer

 RFC 1011 [RFC1011] clarified this ambiguity in RFC 793 stating that
 "Page 17 is wrong.  The urgent pointer points to the last octet of
 urgent data (not to the first octet of non-urgent data)".  RFC 1122
 [RFC1122] formally updated RFC 793 by stating, in Section 4.2.2.4
 (page 84), that "the urgent pointer points to the sequence number of
 the LAST octet (not LAST+1) in a sequence of urgent data".

TCP/IP 图解:

There is continuing debate about whether the urgent pointer points
 to the last byte of urgent data, or to the byte following the last byte
 of urgent data. The original TCP specification gave both interpretations 
but the Host Requirements RFC identifies which is correct: 
the urgent pointer points to the last byte of urgent data. 

The problem, however, is that most implementations
 (i.e., the Berkeley-derived implementations) continue to use the wrong 
interpretation. An implementation that follows the specification in the 
Host Requirements RFC might be compliant, but might not communicate 
correctly with most other hosts.

【问题讨论】:

    标签: linux networking tcp


    【解决方案1】:

    这最初是在the TCP standard中定义的:

    紧急指针:16 位
    该字段将紧急指针的当前值作为 与此段中的序列号的正偏移量。这 紧急指针指向后面八位字节的序号 紧急数据。该字段仅在分段中解释为 URG 控制位设置。

    但后来改成RFC 1122

    [关于RFC-793 Section 3.1] ...
    第二句有误:紧急指针指向LAST octet (not LAST+1)的序列号一系列紧急数据。第56页(最后一句)的描述是正确的。

    有自己的RFC 6093 只是为了讨论由此产生的混乱,即不同的实现遵循不同的解释。

    【讨论】:

    • @d0nt18:很好的发现。为什么不自己做一个答案呢?另外,这种问题最好在Network Engineering 提出。
    • @d0nt18,RFC 6093 专门更新了 RFC 793 中的措辞。请参阅我的答案的更新。
    • @SteffenUllrich 抱歉,我不知道哪个是正确答案。
    • @d0nt18:正确答案是最新的 RFC。这并不意味着正确的方式也是普遍实施的方式。此类因标准不一致或模糊导致的问题在其他地方也有发生
    【解决方案2】:

    此类问题,请先参考出处(直接搜索rfc tcp):RFC 793, Transmission Control Protocol,这是TCP的定义,其说明:

    紧急指针:16 位

    此字段将紧急指针的当前值作为 与此段中的序列号的正偏移量。紧急的 指针指向后面的八位字节的序列号 紧急数据。该字段仅在分段中解释 URG 控制位设置。


    编辑以适应您的 RFC 6093 更新:

    您对 RFC 6093, On the Implementation of the TCP Urgent Mechanism 的引用强化了 RFC 793:

    4。更新 RFC 793、RFC 1011 和 RFC 1122

    考虑到只要 TCP 发送方和 TCP 接收方 为紧急指针实现相同的语义没有 使紧急指针指向“ 紧跟在紧急数据后面的八位字节的序列号”与“最后一个 紧急数据的八位字节”,并且所有已知的实现都解释 紧急指针的语义指向“序列 紧急数据后面的八位字节数”,我们特此更新 RFC 793 [RFC0793]、RFC 1011 [RFC1011] 和 RFC 1122 [RFC1122] 使得 "紧急指针指向八位字节的序号 在紧急数据之后”(在设置了 URG 控制位的段中), 从而适应几乎所有现有的 TCP 实现。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-12-13
      • 1970-01-01
      • 2016-07-12
      • 2010-10-10
      • 1970-01-01
      • 2019-08-08
      • 1970-01-01
      相关资源
      最近更新 更多