netinet/in.h: add INADDR_DUMMY from linux v5.13
authorSzabolcs Nagy <nsz@port70.net>
Sun, 4 Jul 2021 20:33:25 +0000 (20:33 +0000)
committerRich Felker <dalias@aerifal.cx>
Tue, 8 Mar 2022 22:21:26 +0000 (17:21 -0500)
see

  linux commit 321827477360934dc040e9d3c626bf1de6c3ab3c
  icmp: don't send out ICMP messages with a source address of 0.0.0.0

"RFC7600 reserves a dummy address to be used as a source for ICMP
messages (192.0.0.8/32), so let's teach the kernel to substitute that
address as a last resort if the regular source address selection procedure
fails."

include/netinet/in.h

index f959433..fb628b6 100644 (file)
@@ -48,6 +48,7 @@ struct ipv6_mreq {
 #define INADDR_BROADCAST  ((in_addr_t) 0xffffffff)
 #define INADDR_NONE       ((in_addr_t) 0xffffffff)
 #define INADDR_LOOPBACK   ((in_addr_t) 0x7f000001)
+#define INADDR_DUMMY      ((in_addr_t) 0xc0000008)
 
 #define INADDR_UNSPEC_GROUP     ((in_addr_t) 0xe0000000)
 #define INADDR_ALLHOSTS_GROUP   ((in_addr_t) 0xe0000001)