Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backport to 1.13: udp: properly handle truncated/dropped datagrams (#14122) #14198

Merged
merged 3 commits into from
Dec 1, 2020

Conversation

cpakulski
Copy link
Contributor

Commit Message:
properly handle truncated/dropped datagrams

Additional Description:
Risk Level: Med
Testing:Unit tests
Docs Changes: No
Release Notes: Yes

Fixes #14113

cpakulski and others added 2 commits November 26, 2020 21:04
Signed-off-by: Matt Klein <[email protected]>
Signed-off-by: Christoph Pakulski <[email protected]>
Co-authored-by: Matt Klein <[email protected]>
Co-authored-by: Christoph Pakulski <[email protected]>
Signed-off-by: Christoph Pakulski <[email protected]>
@cpakulski
Copy link
Contributor Author

/retest

@repokitteh-read-only
Copy link

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #14198 (comment) was created by @cpakulski.

see: more, trace.

@cpakulski cpakulski marked this pull request as ready for review November 27, 2020 22:51
test/common/network/udp_listener_impl_test.cc Outdated Show resolved Hide resolved
return Api::SysCallSizeResult{5u, 0};
}));
Network::IoHandle::RecvMsgOutput output(1, nullptr);
EXPECT_CALL(os_sys_calls_, recvmsg(fd, _, messageTruncatedOption()))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's curious that you had to introduce messageTruncatedOption in the backport. I wonder what's going on in the master branch.

Copy link
Contributor Author

@cpakulski cpakulski Dec 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was getting macos test failures and could not access log artifact. So, after scrutinizing changes introduced in this PR, I noticed that the test expected recvmsg with MSG_TRUNC, which on macos is not used. It fixed the macos test issue on this 1.13 branch. On master it clearly expects recvmsg to be called with MSG_TRUNC. But I am not sure if on master CI tests execute all unit tests for macos build or only integration ones. Anyways, I believe that messageTruncatedOption should be put somewhere in a header file and used in both: source and test without referring to MSG_TRUNC directly. I can open PR for that if you agree.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @ggreenway

Yeah, I think that some tests being excluded from CI at HEAD is the best way to explain the difference in behavior in macos tests.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most tests aren't run in mac CI.

In fact, integration tests don't even build right now on mac.

@cpakulski
Copy link
Contributor Author

/retest

@repokitteh-read-only
Copy link

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #14198 (comment) was created by @cpakulski.

see: more, trace.

@antoniovicente antoniovicente merged commit 605560f into envoyproxy:release/v1.13 Dec 1, 2020
@cpakulski cpakulski deleted the rel1.13/141122 branch December 14, 2020 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants