Post AYrIIvMLIOBTNCPW6q by Uilebheist@chaos.social
 (DIR) More posts by Uilebheist@chaos.social
 (DIR) Post #AYrIIuRchGoWXHsDhY by Uilebheist@chaos.social
       2023-08-17T14:54:20Z
       
       0 likes, 0 repeats
       
       I seem to have a way to find weird behaviour in systems. Today it's #NetBSD A program is sending multicast packets and another one listening for them. The second one always seems to get the first 21 packets and then stops receiving.However if I run tcpdump to see what happens, all packets arrive (both to tcpdump and to the program listening).BUT and here it gets weird, if I redirect the standard output of tcpdump to a file, the packets don't arrive.Or if I "tcpdump ...|grep" - also nothing
       
 (DIR) Post #AYrIIvMLIOBTNCPW6q by Uilebheist@chaos.social
       2023-08-17T15:25:49Z
       
       0 likes, 0 repeats
       
       After more tests...tcpdump on serial port -> OKtcpdump in a detached "screen" -> OKtcpdump running in "script" -> OKany of the above redirecting stdout or using a pipe -> packets disappear.So, somehow, the gremlin in the machine knows when tcpdump is writing to a terminal (real or pseudo) or not, and the network behaviour changes accordingly?Have I already said it gets weird?
       
 (DIR) Post #AYrIIwAKIYANsDnR1E by Uilebheist@chaos.social
       2023-08-18T14:46:35Z
       
       0 likes, 1 repeats
       
       Well, I thought I'd see if the problem still happens with something more recent.$ uname -aNetBSD nbsd10.***.org 10.0_BETA NetBSD 10.0_BETA (GENERIC) #0: Sat Aug 12 12:56:34 UTC 2023  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64Still the exact same behaviour. tcpdump with output to a terminal makes the program receive the packets. Redirect tcpdump's stdout, pipe it, or use -w and the packets don't arrive to the program.