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

fix(conf) retain IPv6 brackets in proxy_listen and admin_listen #3508

Merged
merged 1 commit into from
Jun 5, 2018

Conversation

hishamhm
Copy link
Contributor

@hishamhm hishamhm commented Jun 4, 2018

Nginx requires brackets in IPv6 addresses, but normalize_ip does not include them (due to backwards compatibility with its other uses elsewhere in the codebase).

Fixes #3475.

ip = utils.normalize_ip(remainder)
-- nginx requires brackets in IPv6 addresses, but normalize_ip does
-- not include them (due to backwards compatibility with its other uses)
if ip and ip.host:find(":", 1, true) then
Copy link
Member

Choose a reason for hiding this comment

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

For the sake reference code and efficiency, probably better to rely on:

if ip and ip.type == "ipv6" then

end

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated!

nginx requires brackets in IPv6 addresses, but normalize_ip does not
include them (due to backwards compatibility with its other uses)

Fixes #3475.
@hishamhm hishamhm force-pushed the fix/ipv6-listen-directives branch from 1515683 to 13a4e76 Compare June 5, 2018 00:13
@thibaultcha thibaultcha merged commit c8c1ab3 into master Jun 5, 2018
@thibaultcha thibaultcha deleted the fix/ipv6-listen-directives branch June 5, 2018 01:18
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.

2 participants