Skip to content

Fixes a panic in the DNS resolver#2540

Merged
arkodg merged 1 commit intomoby:masterfrom
SamWhited:resolver_panic
Mar 18, 2020
Merged

Fixes a panic in the DNS resolver#2540
arkodg merged 1 commit intomoby:masterfrom
SamWhited:resolver_panic

Conversation

@SamWhited
Copy link
Contributor

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

@SamWhited
Copy link
Contributor Author

Tests passing!

@arkodg
Copy link
Contributor

arkodg commented Mar 18, 2020

LGTM on the fix, can you please add a better description in the commit message @SamWhited

Under certain conditions it appears that the DNS response and returned
error can be nil. When this happens, checking resp.Truncated results in
a nil panic so we must first check that the response is not nil before
checking if a truncated response was received.

See moby/moby#40715

Signed-off-by: Sam Whited <[email protected]>
@SamWhited
Copy link
Contributor Author

Added a paragraph explaining what changed.

Copy link
Contributor

@arkodg arkodg left a comment

Choose a reason for hiding this comment

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

LGTM thanks !

@arkodg arkodg merged commit ef149a9 into moby:master Mar 18, 2020
@thaJeztah
Copy link
Member

did you re-cherry-pick the 19.03 backport as well?

@SamWhited
Copy link
Contributor Author

Sure did

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