I was reading the implementation of wireguard-go, and found it handles reading less than 4 bytes from the TUN device file when the no packet information flag is not set.
I wonder is it possible that this can happen without any error? And how can? I'm especially curious about the kernel part code. I'm very new to this. Any links to the code or references are appreciated.
I found this documentation, but it doesn't mention the case. https://www.kernel.org/doc/html/v5.8/networking/tuntap.html#frame-format