SO_RERROR indicates that receive buffer overflows
authorAlexander V. Chernikov <melifaro@FreeBSD.org>
Sun, 7 Feb 2021 17:21:18 +0000 (17:21 +0000)
committerSebastian Huber <sebastian.huber@embedded-brains.de>
Mon, 11 Jul 2022 11:19:29 +0000 (13:19 +0200)
should be handled as errors. Historically receive buffer overflows have been
ignored and programs could not tell if they missed messages or messages had
been truncated because of overflows. Since programs historically do not expect
to get receive overflow errors, this behavior is not the default.

This is really really important for programs that use route(4) to keep in sync
with the system. If we loose a message then we need to reload the full system
state, otherwise the behaviour from that point is undefined and can lead
to chasing bogus bug reports.

newlib/libc/sys/rtems/include/sys/socket.h

index 4079b3e9116242bf7916399704e0322d092d9972..54cd0be93387e28d031ec4dfda2a69474eb4aa62 100644 (file)
@@ -139,6 +139,7 @@ typedef     __uintptr_t     uintptr_t;
 #define        SO_NO_OFFLOAD   0x00004000      /* socket cannot be offloaded */
 #define        SO_NO_DDP       0x00008000      /* disable direct data placement */
 #define        SO_REUSEPORT_LB 0x00010000      /* reuse with load balancing */
+#define        SO_RERROR       0x00020000      /* keep track of receive errors */
 
 /*
  * Additional options, not kept in so_options.
This page took 0.050347 seconds and 5 git commands to generate.