您的 802.1X 标头表明数据包为 227 字节。有 199 个字节突出显示,28 个字节未突出显示,因此总计为 227。很好。
因此,如果您的整个数据包为 227 字节,那么您的 EAP 标头肯定必须小于该值。除了您的 EAP 标头表明 EAP 数据也是 227 字节之外。
您的 EAP 标头应如下所示:
+------+------+------------+------+----
| code | ID | length | type | data ...
+------+------+------------+------+----
1 byte 1 byte 2 bytes 1 byte n bytes
RFC2716 http://www.ietf.org/rfc/rfc2716.txt says:
Length
The Length field is two octets and indicates the length of the EAP
packet including the Code, Identifier, Length, Type, and Data
fields. Octets outside the range of the Length field should be
treated as Data Link Layer padding and should be ignored on
reception.
所以长度是从开始的字节数code
并转到数据包的末尾,在这种情况下我想是227 - 18 = 209
.
接下来,我们看到消息类型是 13,因此它是一个 EAP-TLS 数据包。我看到S
位未设置,这意味着该数据包是片段确认。那是对的吗? (可能不是,但只有你自己知道)
S位
(EAP-TLS开始)被设置在EAP-TLS开始消息中。这
区分 EAP-TLS 开始消息和片段
确认。
了解 EAP-TLS 长度,它告诉我们消息的总长度,以防您的负载分散在许多数据包中。我们正在查看的数据包是您的整个 TLS 消息吗?只有您知道您的消息有多长以及它的长度是多少。
TLS 消息长度
The TLS Message Length field is four octets, and is present only
if the L bit is set. This field provides the total length of the
TLS message or set of messages that is being fragmented.
我假设整个消息就是您突出显示的内容,因此其长度将为 199。
即使上面的一些详细信息对于您的数据包来说是错误的,但一般的想法是您的长度错误,而且也许标志也错误。
资源:
http://www.netcraftsmen.net/resources/archived-articles/429-examining-8021x-and-eap.html http://www.netcraftsmen.net/resources/archived-articles/429-examining-8021x-and-eap.html
http://www.ietf.org/rfc/rfc2716.txt http://www.ietf.org/rfc/rfc2716.txt