Bug 419617 - kdeconnect: Truncated data in UDP packet
Summary: kdeconnect: Truncated data in UDP packet
Status: RESOLVED DUPLICATE of bug 446238
Alias: None
Product: kdeconnect
Classification: Applications
Component: android-application (other bugs)
Version First Reported In: unspecified
Platform: Android Android 9.x
: NOR normal
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-04 02:59 UTC by Keith Owens
Modified: 2022-06-05 19:22 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
tcpdump (1.54 KB, text/plain)
2020-04-04 02:59 UTC, Keith Owens
Details
tcpdump of phone startup (3.78 KB, text/plain)
2020-04-04 04:17 UTC, Keith Owens
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Owens 2020-04-04 02:59:52 UTC
Created attachment 127256 [details]
tcpdump

SUMMARY

Running kdeconnect 1.13.6 on a Samsung tablet SM-835 Android 9. Trying to connect to my laptop. UDP packets are getting through but the laptop complains about unterminated string. Tcpdump shows a single UDP packet to port 1716 with truncated data. Laptop is Ubuntu 18.04.

Connecting my Pixel phone (Android 10, also kdeconnect 1.13.6) to the laptop works fine.

STEPS TO REPRODUCE
1. Run kdeconnector on Samsung tablet
2. tcpdump on laptop
3. 

OBSERVED RESULT

Incomplete data in packet.

EXPECTED RESULT

Multiple packets or complete data.
Comment 1 Keith Owens 2020-04-04 04:17:23 UTC
Created attachment 127258 [details]
tcpdump of phone startup
Comment 2 Keith Owens 2020-04-04 04:19:10 UTC
The tcpdump of the phone starting is slightly different. Both have truncated data but the UDP length from the phone is larger than the packet size. The phone sends a second UDP packet containing the rest of the data, this seems to trigger the laptop into starting a TCP session.
Comment 3 Nicolas Fella 2020-06-25 23:22:04 UTC
I think I somewhat understand what is going on.

The UDP packet is too large to fit within the maximum transfer unit (MTU), usually 1500 bytes, or 1472 usable bytes. Therefore the "bad length 1631 > 1472" warning.

While it seems possible to get around that via packet fragmentation this is apparently handled differently by devices. This could explain quite some "devices can't see each other" reports.

I'm not quite sure how to address this. An obvious approach is to reduce the size of the identity packets, but that would be an incompatible change and would require careful rollout
Comment 4 benoit 2022-06-05 19:22:03 UTC

*** This bug has been marked as a duplicate of bug 446238 ***