镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

fix(gso): off by one error in gsoSplit on linux - #151

Open
encodeous wants to merge 1 commit into
WireGuard:masterfrom
encodeous:ac/wg-gsosplit-obo
Open

encodeous wants to merge 1 commit into
WireGuard:masterfrom
encodeous:ac/wg-gsosplit-obo

Conversation

@encodeous

Copy link
Copy Markdown

Upstream contrib of encodeous/nylon#140

gsoSplit returns number of packets read / buffers populated.

However, we return:

if i == len(outBuffs) {
	return i - 1, ErrTooManySegments
}

Meaning that we exclude the last packet only if we reach the end of the buffer. This seems like a logic error.

Signed-off-by: Adam Chen <encodeous7@gmail.com>
@encodeous
encodeous force-pushed the ac/wg-gsosplit-obo branch from 8d39475 to 26c47ae Compare July 26, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant