| Summary: | UDP broadcast to port 1716 is oversized due to featureitis. the UDP payload size is 1900, the ethernet MTU is 1500 | ||
|---|---|---|---|
| Product: | [Applications] kdeconnect | Reporter: | Riegler Bernhard <riegler.b> |
| Component: | android-application | Assignee: | Albert Vaca Cintora <albertvaka> |
| Status: | CONFIRMED --- | ||
| Severity: | normal | CC: | coot, kaos.ocs, nebras30 |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Android | ||
| OS: | Android 11.x | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | pcap file | ||
|
Description
Riegler Bernhard
2021-11-29 13:11:53 UTC
Created attachment 147491 [details]
pcap file
The bug can be observed in the attached pcap file. Protocol content is truncated at the 1500 bytes, which is standard MTU size on many systems.
Comment on attachment 147491 [details]
pcap file
The attachment shows the problem, the protocol data is truncated at 1500 bytes (common MTU size).
*** Bug 419617 has been marked as a duplicate of this bug. *** just my thoughts for a fix. the UDP payload is "XML hypertext" bring this hypertext into a dictionary of limited words and index this word-list just transmit on the LAN the index of the features. this should give a UDP payload below the UDP limit of 1472 Bytes. no more IPv4 fragments after this version2 of the "feature broadcast". This is still an issue, especially on enterprise networks which limit udp packets a lot more The solution is very simple, the initial discovery packet is too large because kdeconnect sends all incomingcapabilities and outgoingcapabilities in it, which is unnecessary, I've created a simple code to intercept and modify the packet just removing everything in incomingcapabilities and outgoingcapabilities and everything works fine. This is solved with protocol version 8, but we still send the extra info in the UDP packet for backwards compatibility with protocol version 7. When we drop support for that, we can shrink the UDP packets down. |