You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by sharpdevel <gi...@git.apache.org> on 2015/02/13 13:26:30 UTC

[GitHub] thrift pull request: Issue with IPv6 an IPv4 on windows machines

GitHub user sharpdevel opened a pull request:

    https://github.com/apache/thrift/pull/377

    Issue with IPv6 an IPv4 on windows machines

    When using TcpListener and TcpClient it depends on the network configuration if IPv4 or IPv6 is used. By upgrading the framework to .NET 4.5 the DualMode can be set on the sockets of the listener and the client. The sockets then try to estabild IPv6 sockets before they fallback to IPv4. For example IPv4 is preferred on Windows 7 machines while on Windows 8 and 8.1 machines IPv6 is preferred. This patch works on Window 7, 8 and 8.1.
    
    Additionally the AssemblyFileVersion must not contain an asterix. By removing the AssemblyFileVersion it alsways corresponds the the generated value of AsemblyVersion
    
    In the PreBuild command of the ThriftTest project I added "" around the MSBuildToolPath to make the script work on english windows machine wheren the folder equals to sth like "C:\program files\....."


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sharpdevel/thrift master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/thrift/pull/377.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #377
    
----
commit 9bed8db267bf4b48cc9d6dd5d0a809d83e1e2fb1
Author: sharpdevel <ic...@github>
Date:   2015-02-13T12:19:44Z

    - When using TcpListener and TcpClient it depends on the network configuration if IPv4 or IPv6 is used. By upgrading the framework to .NET 4.5 the DualMode can be set on the sockets of the listener and the client. The sockets then try to estabild IPv6 sockets before they fallback to IPv4

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift pull request: Issue with IPv6 an IPv4 on windows machines

Posted by sharpdevel <gi...@git.apache.org>.
Github user sharpdevel commented on the pull request:

    https://github.com/apache/thrift/pull/377#issuecomment-93936892
  
    I'm afraid I don't know how to reopen this pull request. Do I have to create a new one? I already create a Jira-Ticket https://issues.apache.org/jira/browse/THRIFT-3000. Do I have to recreate that too?



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift pull request: Issue with IPv6 an IPv4 on windows machines

Posted by jfarrell <gi...@git.apache.org>.
Github user jfarrell closed the pull request at:

    https://github.com/apache/thrift/pull/377


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift pull request: Issue with IPv6 an IPv4 on windows machines

Posted by jfarrell <gi...@git.apache.org>.
Github user jfarrell commented on the pull request:

    https://github.com/apache/thrift/pull/377#issuecomment-93617632
  
    Thanks for your patch @sharpdevel, in order for us to accept a pull request we need to have a jira ticket associated with it. Please see our contributing guide at http://thrift.apache.org/docs/HowToContribute


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift pull request: Issue with IPv6 an IPv4 on windows machines

Posted by Jens-G <gi...@git.apache.org>.
Github user Jens-G commented on the pull request:

    https://github.com/apache/thrift/pull/377#issuecomment-75319740
  
    I don't have a better idea, so yes. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift pull request: Issue with IPv6 an IPv4 on windows machines

Posted by sharpdevel <gi...@git.apache.org>.
Github user sharpdevel commented on the pull request:

    https://github.com/apache/thrift/pull/377#issuecomment-75016334
  
    You are right. Die DualMode also has to be set using reflection. If you agree with me to head in this direction I will fix it and make another pull request - d'accord?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift pull request: Issue with IPv6 an IPv4 on windows machines

Posted by Jens-G <gi...@git.apache.org>.
Github user Jens-G commented on the pull request:

    https://github.com/apache/thrift/pull/377#issuecomment-74975485
  
    I just gave it a shot and it doesn't compile. That's more or less what I expected, because the compiler still wants to resolve the symbol:
    
          src/Transport/TSocket.cs(64,18): error CS1061: Type `System.Net.Sockets.Socket' does
          not contain a definition for `DualMode' and no extension method `DualMode' of type 
          `System.Net.Sockets.Socket' could be found. Are you missing an assembly reference?
          



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift pull request: THRIFT-3000: Issue with IPv6 an IPv4 on windo...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/thrift/pull/377


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift pull request: Issue with IPv6 an IPv4 on windows machines

Posted by sharpdevel <gi...@git.apache.org>.
Github user sharpdevel commented on the pull request:

    https://github.com/apache/thrift/pull/377#issuecomment-74635670
  
    I could imagine something like this:
    
    
                if (typeof(TcpClient).GetProperty("DualMode") == null)
                {
                    client = new TcpClient(AddressFamily.InterNetwork);
                }
                else
                {
                    client = new TcpClient(AddressFamily.InterNetworkV6);
                    client.Client.DualMode = true;
                }?
    
    but I must admit that I'm not that fit in Mono and cornercasing it with ifdefs
    
    
    ________________________________
    Von: Jens Geyer <no...@github.com>
    Gesendet: Montag, 16. Februar 2015 22:13
    An: apache/thrift
    Cc: Tobias Mundt
    Betreff: Re: [thrift] Issue with IPv6 an IPv4 on windows machines (#377)
    
    
    Can we do something with #ifdefs to protect against when it is not available?
    
    -
    Reply to this email directly or view it on GitHub<https://github.com/apache/thrift/pull/377#issuecomment-74573196>.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift pull request: Issue with IPv6 an IPv4 on windows machines

Posted by Jens-G <gi...@git.apache.org>.
Github user Jens-G commented on the pull request:

    https://github.com/apache/thrift/pull/377#issuecomment-74369726
  
    May I ask you to [create a JIRA ticket for that](thrift.apache.org/docs/HowToContribute)? 
    
    Thanks,
    JensG


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift pull request: Issue with IPv6 an IPv4 on windows machines

Posted by sharpdevel <gi...@git.apache.org>.
GitHub user sharpdevel reopened a pull request:

    https://github.com/apache/thrift/pull/377

    Issue with IPv6 an IPv4 on windows machines

    When using TcpListener and TcpClient it depends on the network configuration if IPv4 or IPv6 is used. By upgrading the framework to .NET 4.5 the DualMode can be set on the sockets of the listener and the client. The sockets then try to estabild IPv6 sockets before they fallback to IPv4. For example IPv4 is preferred on Windows 7 machines while on Windows 8 and 8.1 machines IPv6 is preferred. This patch works on Window 7, 8 and 8.1.
    
    Additionally the AssemblyFileVersion must not contain an asterix. By removing the AssemblyFileVersion it alsways corresponds the the generated value of AsemblyVersion
    
    In the PreBuild command of the ThriftTest project I added "" around the MSBuildToolPath to make the script work on english windows machine wheren the folder equals to sth like "C:\program files\....."


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sharpdevel/thrift master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/thrift/pull/377.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #377
    
----
commit 9bed8db267bf4b48cc9d6dd5d0a809d83e1e2fb1
Author: sharpdevel <ic...@github>
Date:   2015-02-13T12:19:44Z

    - When using TcpListener and TcpClient it depends on the network configuration if IPv4 or IPv6 is used. By upgrading the framework to .NET 4.5 the DualMode can be set on the sockets of the listener and the client. The sockets then try to estabild IPv6 sockets before they fallback to IPv4

commit 7704ab0ce8e9dfa180d5351ffdd3e4065b09fa95
Author: sharpdevel <ic...@github>
Date:   2015-02-26T12:45:57Z

    TcpListener and TcpClient are created based on the capabilities of the used runtime framework. For windows the changes automatically handle IPv4 and IPv6 sockets. In mono it behaves as before.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift pull request: Issue with IPv6 an IPv4 on windows machines

Posted by Jens-G <gi...@git.apache.org>.
Github user Jens-G commented on the pull request:

    https://github.com/apache/thrift/pull/377#issuecomment-93822001
  
    @sharpdevel: Didn't recognize that PR, it somehow got lost in the mails. Could you file a JIRA ticket and reopen the PR mentioning the ticket number? I'll take a look at the stuff then. Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift pull request: Issue with IPv6 an IPv4 on windows machines

Posted by Jens-G <gi...@git.apache.org>.
Github user Jens-G commented on the pull request:

    https://github.com/apache/thrift/pull/377#issuecomment-74573196
  
    Can we do something with #ifdefs to protect against when it is not available?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift pull request: Issue with IPv6 an IPv4 on windows machines

Posted by sharpdevel <gi...@git.apache.org>.
Github user sharpdevel commented on the pull request:

    https://github.com/apache/thrift/pull/377#issuecomment-74489056
  
    You a right: Mono 3.12.0 has no support for the Socket.DualMode property which I used in my patch. Sorry for not double checking that. As requested I opened a jira issue: https://issues.apache.org/jira/browse/THRIFT-3000
    
    Thanks
    sharpdevel


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---