Kernel variable net.ipv4.tcp_ecn causing network problem

Asked by Aaron A Aardvark

A new change in Ubuntu 18.10 sets the kernel variable net.ipv4.tcp_ecn to 1. It used to be set to 2, its default value if not explicitly set (see https://en.wikipedia.org/wiki/Explicit_Congestion_Notification#Linux).

This is done in the file /usr/lib/sysctl.d/50-default.conf, and ultimately seems to be a result of this proposal - https://github.com/systemd/systemd/issues/9087

This change has, I think, caused a problem on my local network. After upgrading my two desktop PCs to Ubuntu 18.10, I found that a Pixel-2 phone (running Android Pie) had taken to intermittently sending corrupt data over TCP. This caused files transferred with FTP from the device to be corrupted, and transfers using SFTP to abort (SFTP has additional built-in error checking compared to plain FTP).

By comparing valid files, corrupted files, and packet capture files in Wireshark, I found that the corrupt data was always contained in TCP packets from the phone with the CWR flag set, which I understand is related to this ECN feature. Setting the variable net.ipv4.tcp_ecn back to 2 on the PCs restored normal behaviour. In case anyone is interested, I have uploaded example packet capture files here https://drive.google.com/drive/folders/12pUBDOIJDSgRvBgRURlzU22TUPmjXZ9b

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.