Uploaded image for project: 'C++ Couchbase Client'
  1. C++ Couchbase Client
  2. CXXCBC-333

Fix load_resolv_conf logic to only use the nameserver

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.0.0-dp.7
    • 1.0.0-dp.6
    • None
    • None
    • 1
    • SDK22

    Description

      It looks like if users have inline comments next to the IP of their nameserver the C++ client can potentially pick up part of the comment as the value of the nameserver.

      example resolv.conf line:

      nameserver 10.10.255.83    # name-d01.sub.example.com
      

      Currently our logic would use

      10.10.255.83    # name-
      

      as the nameserver value.

      I believe we want to change (see code here).

      auto nameserver = line.substr(offset, space);
      

      to

      auto nameserver = line.substr(offset, (space-offset));
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              avsej Sergey Avseyev
              jared.casey Jared Casey
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes