]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ip-util: define IPV4_MIN_REASSEMBLY_SIZE 41801/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 13 Apr 2026 23:12:49 +0000 (08:12 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 24 Apr 2026 22:26:02 +0000 (07:26 +0900)
The number will be later used at several places.

src/libsystemd-network/ip-util.h

index fbc602ace5958f1f6249933dab5f36f97530ef7a..31fa4631c35f95bb004c11a1aea539dff8b22c56 100644 (file)
@@ -8,6 +8,12 @@
 
 #include "sparse-endian.h"
 
+/* RFC 791
+ * Fragmentation and Reassembly.
+ * Every internet destination must be able to receive a datagram of 576 octets either in one piece or in
+ * fragments to be reassembled. */
+#define IPV4_MIN_REASSEMBLY_SIZE 576u
+
 /* This is a maximal UDP payload size in a packet when its IP header does not contain options. When a packet
  * contains some IP options, then of course the allowed UDP payload size in the packet becomes smaller. */
 #define UDP_PAYLOAD_MAX_SIZE (UINT16_MAX - sizeof(struct iphdr) - sizeof(struct udphdr))