You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/01/05 03:08:33 UTC

[GitHub] [apisix] gxthrj opened a new issue #6017: request help: Provide a configuration to disable ipv6

gxthrj opened a new issue #6017:
URL: https://github.com/apache/apisix/issues/6017


   ### Issue description
   
   When APISIX parses the upstream host, it may be parsed as `ipv6` or `ipv4`. 
   Hope to provide a configuration in `config.yaml` to have the ability to disable `ipv6`.
   
   ### Environment
   
   - apisix version (cmd: `apisix version`): master
   - OS (cmd: `uname -a`): centos 7
   - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`): 1.19.*
   - etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API): 3.4.14
   - apisix-dashboard version, if have: - 
   - the plugin runner version, if the issue is about a plugin runner (cmd: depended on the kind of runner): -
   - luarocks version, if the issue is about installation (cmd: `luarocks --version`): -
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] leslie-tsang commented on issue #6017: request help: Provide a configuration to disable ipv6

Posted by GitBox <gi...@apache.org>.
leslie-tsang commented on issue #6017:
URL: https://github.com/apache/apisix/issues/6017#issuecomment-1005357000


   Like [enable_ipv6](https://github.com/apache/apisix/blob/master/conf/config-default.yaml#L35) ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander closed issue #6017: request help: Provide a configuration to disable ipv6

Posted by GitBox <gi...@apache.org>.
spacewander closed issue #6017:
URL: https://github.com/apache/apisix/issues/6017


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] leslie-tsang commented on issue #6017: request help: Provide a configuration to disable ipv6

Posted by GitBox <gi...@apache.org>.
leslie-tsang commented on issue #6017:
URL: https://github.com/apache/apisix/issues/6017#issuecomment-1005403472


   ```patch
   diff --git a/apisix/cli/ngx_tpl.lua b/apisix/cli/ngx_tpl.lua
   index b3fd0d6e..9655723b 100644
   --- a/apisix/cli/ngx_tpl.lua
   +++ b/apisix/cli/ngx_tpl.lua
   @@ -248,7 +248,7 @@ http {
    
        lua_socket_log_errors off;
    
   -    resolver {% for _, dns_addr in ipairs(dns_resolver or {}) do %} {*dns_addr*} {% end %} {% if dns_resolver_valid then %} valid={*dns_resolver_valid*}{% end %};
   +    resolver {% for _, dns_addr in ipairs(dns_resolver or {}) do %} {*dns_addr*} {% end %} {% if dns_resolver_valid then %} valid={*dns_resolver_valid*}{% end %} ipv6={% if enable_ipv6 then %}on{% else %}off{% end %};
        resolver_timeout {*resolver_timeout*};
    
        lua_http10_buffering off;
   ```
   Might this solve the problem ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] haoxins commented on issue #6017: request help: Provide a configuration to disable ipv6

Posted by GitBox <gi...@apache.org>.
haoxins commented on issue #6017:
URL: https://github.com/apache/apisix/issues/6017#issuecomment-1008580867


   I'm not sure `enable_ipv6` is a good naming for this case, `enable_ipv6` is a bit general.
   Maybe `dns_resolver_disable_ipv6` is better?
   
   ---
   
   If we can get an agreement, I think I can help to implement and test the change.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #6017: request help: Provide a configuration to disable ipv6

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #6017:
URL: https://github.com/apache/apisix/issues/6017#issuecomment-1009536726


   @haoxins 
   Thanks for your attention! However,
   @leslie-tsang 
   Could you link your PR to this issue so that people know you are working on it?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org