您的 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 说:
长度
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.ietf.org/rfc/rfc2716.txt