Summary: | IPv6: file browsing freezes on IPv4/IPv6 hydrid network due to nonsensical address passed to ssh | ||
---|---|---|---|
Product: | [Applications] kdeconnect | Reporter: | Thiago Macieira <thiago> |
Component: | common | Assignee: | Albert Vaca Cintora <albertvaka> |
Status: | ASSIGNED --- | ||
Severity: | normal | CC: | nate |
Priority: | NOR | ||
Version First Reported In: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Thiago Macieira
2021-03-30 22:21:47 UTC
sshfs command-line seems to be: /usr/bin/sshfs kdeconnect@2601:1c0:xxxx:yyyy:4501:635c:ccfc:6576:1c93:dd1d:/ /run/user/1000/2f299915d02c5133 -p 1743 -s -f -F /dev/null -o IdentityFile=/home/tjmaciei/.config/kdeconnect/privateKey.pem -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o HostKeyAlgorithms=+ssh-dss -o uid=1000 -o gid=100 -o reconnect -o ServerAliveInterval=30 -o password_stdin Which is also incorrect. A possibly relevant merge request was started @ https://invent.kde.org/network/kdeconnect-kde/-/merge_requests/389 (In reply to Bug Janitor Service from comment #2) > A possibly relevant merge request was started @ > https://invent.kde.org/network/kdeconnect-kde/-/merge_requests/389 I have a similar change that I was going to push to MR, but I can't test it. After updating kdeconnect with my change, it starts sshfs with the IPv4 of my phone. How does the discovery decide what address(es) to try? My network is also IPv4/IPv6 hybrid, and it seems that if I unpair and pair the devices again, and then browse the device via Dolphin, IPv6 will be used. But after a period of time, it will fallback to IPv4 again. It seems that IPv4 is preferred most of the times. (In reply to 2wxsy58236r3 from comment #4) > My network is also IPv4/IPv6 hybrid, and it seems that if I unpair and pair > the devices again, and then browse the device via Dolphin, IPv6 will be used. > > But after a period of time, it will fallback to IPv4 again. It seems that > IPv4 is preferred most of the times. That's not good. The selection should be deterministic, preferably using established RFCs (3484 and 6724 come to mind, but I don't think they are correct for this purpose). Since they are always intra-network (link-local) addresses, I suppose we should prefer the local addresses to avoid accidentally trafficking over routers and over the Internet, in which case the order should be: 1) IPv6 link-local addresses, if possible (fe80::/64) - not always possible because they need a scope identifier in the address and some tools will not like that 2) IPv4 link-local addresses (169.254.0.0/16) 3) IPv6 realm-local addresses (you can probably ignore this) 4) IPv6 site-local addresses (fec0::/8 [deprecated], you can probably ignore this) 5) IPv6 unique local addresses (fc00::/7) 6) IPv4 addresses reserved by RFC 1918 and 6598 (10.0.0.0/8, 100.64.0.0/10, 172.16.0.0/12, 192.168.0.0/16) 7) IPv6 global addresses 8) IPv4 global addresses Or, alternatively speaking, sort addresses by ascending scope by grouping the IPv6 local addresses with IPv4 private-use and shared-use ones, and IPv6 preferred over IPv4 in each scope. See https://www.iana.org/assignments/ipv6-multicast-addresses/ipv6-multicast-addresses.xml#ipv6-scope for the full list. IPv6 v4-compat (::/96), Teredo (2001:0::/32) and 6to4 (2002::/16) addresses should be excluded. IPv6 v4-mapped addresses (::ffff:0.0.0.0/32) should be treated like IPv4. |