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

Allow to config dns bind address in DnsNameResolver #11061

Merged
merged 1 commit into from
Mar 8, 2021

Conversation

shoothzj
Copy link
Contributor

@shoothzj shoothzj commented Mar 6, 2021

Motivation:

The DnsResolver default start address listen to "0.0.0.0", which may have some security risks.

Modification:

Add bindAddress as a param of DnsNameResolver

Result:

The DnsNameResolver's bind address can be configured.

Copy link
Member

@normanmaurer normanmaurer left a comment

Choose a reason for hiding this comment

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

Also please sign our icla: https://netty.io/s/icla

@shoothzj shoothzj force-pushed the netty-dns-resolver-bindAddress branch from 712cc53 to 6a98387 Compare March 6, 2021 10:28
/**
* Sets the udp client listen local Address
* @param localAddress
* @return {@code this}
Copy link
Contributor

Choose a reason for hiding this comment

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

Change {@code this to something else.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image
I saw the code below write this.
The "Dns name resolver Builder" will be better?

@shoothzj shoothzj force-pushed the netty-dns-resolver-bindAddress branch from 6a98387 to 5134bc4 Compare March 8, 2021 01:04
@normanmaurer normanmaurer merged commit 0f12472 into netty:4.1 Mar 8, 2021
@normanmaurer
Copy link
Member

@shoothzj thanks a lot!

normanmaurer pushed a commit that referenced this pull request Mar 8, 2021
Motivation:

The DnsResolver default start address listen to "0.0.0.0", which may be not what the user wants. 

Modification:

Add localAddress as a param of DnsNameResolver and its builder

Result:

The DnsNameResolver's bind address can be configured.
@normanmaurer normanmaurer linked an issue Mar 8, 2021 that may be closed by this pull request
@shoothzj shoothzj deleted the netty-dns-resolver-bindAddress branch March 8, 2021 14:07
@normanmaurer normanmaurer added this to the 4.1.60.Final milestone Mar 9, 2021
kodiakhq bot pushed a commit to shiruka/shiruka that referenced this pull request Mar 10, 2021
Bumps [netty-all](https://github.com/netty/netty) from 4.1.59.Final to 4.1.60.Final.
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/netty/netty/commit/eef26e8bb571612b76235841a84f605b9ae5d777"><code>eef26e8</code></a> [maven-release-plugin] prepare release netty-4.1.60.Final</li>
<li><a href="https://github.com/netty/netty/commit/23ff30c40f3420345567191849c3abac284eb4d7"><code>23ff30c</code></a> Try to stabilize docker build by using https (<a href="https://github.com/netty/netty/issues/11070">#11070</a>)</li>
<li><a href="https://github.com/netty/netty/commit/b8d843757b6291e32e920c0ce9c00d505c4e62f0"><code>b8d8437</code></a> [maven-release-plugin] rollback the release of netty-4.1.60.Final</li>
<li><a href="https://github.com/netty/netty/commit/4f099dd11fa3d1c9f4963a72a0f72f4809c1459b"><code>4f099dd</code></a> [maven-release-plugin] prepare for next development iteration</li>
<li><a href="https://github.com/netty/netty/commit/44e392e8512cce870d9b00da346e119f6323591e"><code>44e392e</code></a> [maven-release-plugin] prepare release netty-4.1.60.Final</li>
<li><a href="https://github.com/netty/netty/commit/89c241e3b1795ff257af4ad6eadc616cb2fb3dc4"><code>89c241e</code></a> Merge pull request from GHSA-wm47-8v5p-wjpj</li>
<li><a href="https://github.com/netty/netty/commit/bf9b90c3402683099b6da0e07fd55a4cebd21895"><code>bf9b90c</code></a> [HttpObjectDecoder] Include hex-value of illegal whitespace char (<a href="https://github.com/netty/netty/issues/11067">#11067</a>)</li>
<li><a href="https://github.com/netty/netty/commit/4f498709d49de63872118fbbea0ba305feac0f03"><code>4f49870</code></a> Always include the OS in the tcnative library name (<a href="https://github.com/netty/netty/issues/11064">#11064</a>)</li>
<li><a href="https://github.com/netty/netty/commit/0f12472b580bcbb34cbe84810077aa33c1091d14"><code>0f12472</code></a> Allow to config dns bind address in DnsNameResolver (<a href="https://github.com/netty/netty/issues/11061">#11061</a>)</li>
<li><a href="https://github.com/netty/netty/commit/7d4aaa268b8a536f61fbc7711365147c58238745"><code>7d4aaa2</code></a> Support session cache for client and server when using native SSLEngine imple...</li>
<li>Additional commits viewable in <a href="https://github.com/netty/netty/compare/netty-4.1.59.Final...netty-4.1.60.Final">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=io.netty:netty-all&package-manager=maven&previous-version=4.1.59.Final&new-version=4.1.60.Final)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>
This was referenced Mar 12, 2021
raidyue pushed a commit to raidyue/netty that referenced this pull request Jul 8, 2022
Motivation:

The DnsResolver default start address listen to "0.0.0.0", which may be not what the user wants. 

Modification:

Add localAddress as a param of DnsNameResolver and its builder

Result:

The DnsNameResolver's bind address can be configured.
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.

Allow to config the listen address on DnsResolver
3 participants