kohler / click

The Click modular router: fast modular packet processing and analysis
Other
740 stars 321 forks source link

ToDevice.u appending 14 extra bytes to packet #409

Closed drbarrett closed 6 years ago

drbarrett commented 6 years ago

This seems to be a Ubuntu issue with a recent update, but I'm logging it in case anyone has found a fix.

On Ubuntu 16.04 LTS after an update on 07/25/18 ToDevice appears to write the packet correctly and I see the correct # of bytes sent in the debugger, but packets on the wire contains an extra 14 bytes of trailing garbage. This happens with method PCAP and method LINUX.

Using Socket instead of ToDevice works correctly.

piotrjurkiewicz commented 6 years ago

It can be this bug, discovered by me two months ago: https://bugzilla.kernel.org/show_bug.cgi?id=199951

However, it was fixed already. Maybe Ubuntu LTS kernel maintainers pulled commit introducing the bug, but haven't pulled fix yet?

What exact version of linux-image-* package do you have after the update?

drbarrett commented 6 years ago

Thanks for the info, this sounds like it could be it.

We're seeing it with 4.4.0-130 and 4.4.0.131 on 16.04 LTS. Guess I'll try to get things working on 18.04 to see if it solves it for us.

piotrjurkiewicz commented 6 years ago

So it is it.

Both these versions:

https://packages.ubuntu.com/xenial-updates/linux-image-4.4.0-130-generic https://packages.ubuntu.com/xenial-updates/linux-image-4.4.0-131-generic

are based on 4.4.134 version of original kernel stable release. It contains the bug, as it was backported to stable release with this commit in version 4.4.133. The fix was backported with this commit and appeared in version 4.4.137.

So you have to wait until Ubuntu kernel maintainers rebase their packages on version 4.4.137 or higher.

drbarrett commented 6 years ago

I've rolled back to 4.4.0-128 for now as gcc7 in 18.04 doesn't get along with our current codebase.

drbarrett commented 5 years ago

In case anyone else hits it, this problem just came back on Ubuntu 18.04 with kernel 4.15.0-34.

4.15.0-33 and earlier seem fine.

bcronje commented 5 years ago

Do you know if a bug report was made?