You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by jablko <gi...@git.apache.org> on 2017/02/10 18:34:10 UTC

[GitHub] trafficserver pull request #1438: BoringSSL doesn't have BIO_sock_non_fatal_...

GitHub user jablko opened a pull request:

    https://github.com/apache/trafficserver/pull/1438

    BoringSSL doesn't have BIO_sock_non_fatal_error()

    Fixes #1437

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

    $ git pull https://github.com/jablko/trafficserver non_fatal_error

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

    https://github.com/apache/trafficserver/pull/1438.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 #1438
    
----

----


---
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] trafficserver pull request #1438: BoringSSL doesn't have BIO_sock_non_fatal_...

Posted by jablko <gi...@git.apache.org>.
Github user jablko commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/1438#discussion_r100697717
  
    --- Diff: iocore/net/BIO_fastopen.cc ---
    @@ -27,6 +27,67 @@
     
     #include "BIO_fastopen.h"
     
    +// For BoringSSL, which for some reason doesn't have this function.
    +// (In BoringSSL, sock_read() and sock_write() use the internal
    +// bio_fd_non_fatal_error() instead.) #1437
    +//
    +// The following is copied from
    +// https://github.com/openssl/openssl/blob/3befffa39dbaf2688d823fcf2bdfc07d2487be48/crypto/bio/bss_sock.c
    --- End diff --
    
    That works ... Is the purpose to avoid having to attribute it?
    
    In general, I like to code for OpenSSL, and add fixes to make other environments conform to it -- unless there's a reason not to. So in this case I'd continue calling BIO_sock_non_fatal_error(), and copy it verbatim from OpenSSL if it's missing.
    
    Functionally, your solution is equivalent (and cleaner!), but unless there's a reason not to use OpenSSL's function, that's the style I prefer. I'm happy either way, though :-)
    
    I'll open a PR to add attribution to the NOTICE file.


---
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] trafficserver pull request #1438: BoringSSL doesn't have BIO_sock_non_fatal_...

Posted by masaori335 <gi...@git.apache.org>.
Github user masaori335 commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/1438#discussion_r100724390
  
    --- Diff: iocore/net/BIO_fastopen.cc ---
    @@ -27,6 +27,67 @@
     
     #include "BIO_fastopen.h"
     
    +// For BoringSSL, which for some reason doesn't have this function.
    +// (In BoringSSL, sock_read() and sock_write() use the internal
    +// bio_fd_non_fatal_error() instead.) #1437
    +//
    +// The following is copied from
    +// https://github.com/openssl/openssl/blob/3befffa39dbaf2688d823fcf2bdfc07d2487be48/crypto/bio/bss_sock.c
    --- End diff --
    
    I understood. Let's add the attribution to the NOTICE file and use code from OpenSSL.


---
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] trafficserver issue #1438: BoringSSL doesn't have BIO_sock_non_fatal_error()

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the issue:

    https://github.com/apache/trafficserver/pull/1438
  
    clang-analyzer build *successful*! See https://ci.trafficserver.apache.org/job/clang-analyzer-github/81/ for details.
     



---
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] trafficserver issue #1438: BoringSSL doesn't have BIO_sock_non_fatal_error()

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the issue:

    https://github.com/apache/trafficserver/pull/1438
  
    Linux build *successful*! See https://ci.trafficserver.apache.org/job/linux-github/1411/ for details.
     



---
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] trafficserver issue #1438: BoringSSL doesn't have BIO_sock_non_fatal_error()

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the issue:

    https://github.com/apache/trafficserver/pull/1438
  
    Linux build *successful*! See https://ci.trafficserver.apache.org/job/linux-github/1410/ for details.
     



---
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] trafficserver pull request #1438: BoringSSL doesn't have BIO_sock_non_fatal_...

Posted by masaori335 <gi...@git.apache.org>.
Github user masaori335 commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/1438#discussion_r100646468
  
    --- Diff: iocore/net/BIO_fastopen.cc ---
    @@ -27,6 +27,67 @@
     
     #include "BIO_fastopen.h"
     
    +// For BoringSSL, which for some reason doesn't have this function.
    +// (In BoringSSL, sock_read() and sock_write() use the internal
    +// bio_fd_non_fatal_error() instead.) #1437
    +//
    +// The following is copied from
    +// https://github.com/openssl/openssl/blob/3befffa39dbaf2688d823fcf2bdfc07d2487be48/crypto/bio/bss_sock.c
    --- End diff --
    
    It looks like we need to add "OpenSSL License" in LICENSE file, because this is just copy.
    (Sorry for I should have noticed this before merge) 


---
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] trafficserver pull request #1438: BoringSSL doesn't have BIO_sock_non_fatal_...

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

    https://github.com/apache/trafficserver/pull/1438


---
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] trafficserver issue #1438: BoringSSL doesn't have BIO_sock_non_fatal_error()

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the issue:

    https://github.com/apache/trafficserver/pull/1438
  
    FreeBSD build *successful*! See https://ci.trafficserver.apache.org/job/freebsd-github/1516/ for details.
     



---
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] trafficserver pull request #1438: BoringSSL doesn't have BIO_sock_non_fatal_...

Posted by masaori335 <gi...@git.apache.org>.
Github user masaori335 commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/1438#discussion_r100647168
  
    --- Diff: iocore/net/BIO_fastopen.cc ---
    @@ -27,6 +27,67 @@
     
     #include "BIO_fastopen.h"
     
    +// For BoringSSL, which for some reason doesn't have this function.
    +// (In BoringSSL, sock_read() and sock_write() use the internal
    +// bio_fd_non_fatal_error() instead.) #1437
    +//
    +// The following is copied from
    +// https://github.com/openssl/openssl/blob/3befffa39dbaf2688d823fcf2bdfc07d2487be48/crypto/bio/bss_sock.c
    --- End diff --
    
    How about just add a function like this? We don't support WINDOWS and don't need those "#ifdef". Just checking error codes looks enough.
    ```
    static int
    non_fetal_error(int err)
    {
      if (err == EWOULDBLOCK || err == ENOTCONN || err == EINTR || err == EAGAIN || err == EPROTO || err == EINPROGRESS || err == EALREADY) {
        return 1;
      }
      return 0;
    }
    ```


---
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] trafficserver issue #1438: BoringSSL doesn't have BIO_sock_non_fatal_error()

Posted by zwoop <gi...@git.apache.org>.
Github user zwoop commented on the issue:

    https://github.com/apache/trafficserver/pull/1438
  
    Did we add the necessary attribution to NOTICES files? If not, please do so.


---
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] trafficserver issue #1438: BoringSSL doesn't have BIO_sock_non_fatal_error()

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the issue:

    https://github.com/apache/trafficserver/pull/1438
  
    FreeBSD build *successful*! See https://ci.trafficserver.apache.org/job/freebsd-github/1517/ for details.
     



---
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] trafficserver issue #1438: BoringSSL doesn't have BIO_sock_non_fatal_error()

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the issue:

    https://github.com/apache/trafficserver/pull/1438
  
    clang-analyzer build *successful*! See https://ci.trafficserver.apache.org/job/clang-analyzer-github/82/ for details.
     



---
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.
---