Skip to content

计算校验和的结果与处理器字节顺序相关 #1

Description

@XeonKHJ

在ShadowUtilities.c文件中的
unsigned short CalculateCheckSum(char* bytes, char* fakeHeader, int byteCounts, int fakeHeaderCounts, int marginBytes)
该方法计算好像与处理器大小端相关,具体表现为:
在Windows内核开发下使用该方法计算出来后返回的short结果直接放在IP头部的缓冲区中(用指针)没问题,但在用Hyper-V中的Ubuntu会使顺序相反。

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions