<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>417682</bug_id>
          
          <creation_ts>2020-02-15 01:52:38 +0000</creation_ts>
          <short_desc>ipv6 not working</short_desc>
          <delta_ts>2020-03-06 16:14:50 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>Frameworks and Libraries</classification>
          <product>kio-extras</product>
          <component>Samba</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Harald Sitter">sitter</reporter>
          <assigned_to name="Harald Sitter">sitter</assigned_to>
          <cc>nate</cc>
          
          <cf_commitlink>https://commits.kde.org/kio-extras/bb83a071e0da384e464c5a79cca6359b84d27491</cf_commitlink>
          <cf_versionfixedin>20.04</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1910215</commentid>
    <comment_count>0</comment_count>
    <who name="Harald Sitter">sitter</who>
    <bug_when>2020-02-15 01:52:38 +0000</bug_when>
    <thetext>smb://[ff::1] which should be a valid ipv6 uri errors internally with error code 8216. Needs investigation</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1911072</commentid>
    <comment_count>1</comment_count>
    <who name="Harald Sitter">sitter</who>
    <bug_when>2020-02-18 10:35:59 +0000</bug_when>
    <thetext>Looks like uri parsing is busted vis a vis ipv6. Up to smbclient 4.11.1 at least It&apos;s a bit of a problem considering ipv4 is considered legacy :|

Trivial example that should stat localhost but instead comes back EINVAL.

    // https://tools.ietf.org/html/rfc3986#section-3.2.2
    if (smbc_stat(&quot;smb://[::1]&quot;, &amp;st) == 0) {
        printf(&quot;success\n&quot;);
    } else {
        perror(&quot;smb://[::1]&quot;);
    }

I&apos;ve also found https://bugzilla.gnome.org/show_bug.cgi?id=604116 which doesn&apos;t actually mention an upstream report, so I am guessing this wasn&apos;t forwarded? Also it looks like that workaround they pulled may not be nearly as easy for us. smb://::1 only works if the colons are percent encoded (otherwise that&apos;s an outright wrong uri), QUrl however is fairly strict about what it accepts for hosts and percent encoded random stuff is not part of it. We&apos;d have to construct the smb url manually.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1913106</commentid>
    <comment_count>2</comment_count>
    <who name="Harald Sitter">sitter</who>
    <bug_when>2020-02-26 14:03:00 +0000</bug_when>
    <thetext>upstream report https://bugzilla.samba.org/show_bug.cgi?id=14297

To implement a workaround I think I&apos;ll first want our smburl class grow some tests. There&apos;s an uncomfortable amount of hacks without tests in there. Also, bug #204423 adds further complexity to our url handling needs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1914820</commentid>
    <comment_count>3</comment_count>
    <who name="Harald Sitter">sitter</who>
    <bug_when>2020-03-06 16:14:50 +0000</bug_when>
    <thetext>Git commit bb83a071e0da384e464c5a79cca6359b84d27491 by Harald Sitter.
Committed on 06/03/2020 at 16:13.
Pushed by sitter into branch &apos;master&apos;.

smb: fix ipv6 support

Summary:
libsmbc doesn&apos;t presently support smb://[ABCD::DCBA]/ uris because it
has very opinionated colon parsing. as a workaround we convert hosts
that are ipv6 addresses to their windows ipv6 literal representation.
that is basically s/:/-/g and s/%/s/g and appending .ipv6-literal.net.
FIXED-IN: 20.04

Test Plan: builds, test passes, `&apos;smb://[::1]/foo&apos;` works as expected

Reviewers: ngraham

Reviewed By: ngraham

Subscribers: cfeck, thiago, kde-frameworks-devel, kfm-devel

Tags: #dolphin, #frameworks

Differential Revision: https://phabricator.kde.org/D27802

M  +27   -0    smb/autotests/smburltest.cpp
M  +37   -2    smb/smburl.cpp

https://commits.kde.org/kio-extras/bb83a071e0da384e464c5a79cca6359b84d27491</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>