diff mbox series

Add INADDR_DUMMY from Linux 5.13 to netinet/in.h

Message ID alpine.DEB.2.22.394.2108052004180.137249@digraph.polyomino.org.uk
State New
Headers show
Series Add INADDR_DUMMY from Linux 5.13 to netinet/in.h | expand

Commit Message

Joseph Myers Aug. 5, 2021, 8:05 p.m. UTC
Linux 5.13 adds an INADDR_DUMMY definition; add a corresponding
definition to glibc's netinet/in.h.  (This isn't strictly a new kernel
interface, rather a value defined in RFC 7600.)

Tested for x86_64.

Comments

Florian Weimer Aug. 5, 2021, 8:12 p.m. UTC | #1
* Joseph Myers:

> Linux 5.13 adds an INADDR_DUMMY definition; add a corresponding
> definition to glibc's netinet/in.h.  (This isn't strictly a new kernel
> interface, rather a value defined in RFC 7600.)
>
> Tested for x86_64.
>
> diff --git a/inet/netinet/in.h b/inet/netinet/in.h
> index ed21690afb..cee35efec9 100644
> --- a/inet/netinet/in.h
> +++ b/inet/netinet/in.h
> @@ -196,6 +196,9 @@ enum
>  #define	INADDR_BROADCAST	((in_addr_t) 0xffffffff)
>  /* Address indicating an error return.  */
>  #define	INADDR_NONE		((in_addr_t) 0xffffffff)
> +/* Dummy address for source of ICMPv6 errors converted to IPv4 (RFC
> +   7600).  */
> +#define	INADDR_DUMMY		((in_addr_t) 0xc0000008)
>  
>  /* Network number for local host loopback.  */
>  #define	IN_LOOPBACKNET		127

I checked that the value matches RFC 7600 (192.0.0.8).  Looks good.

Thanks,
Florian
diff mbox series

Patch

diff --git a/inet/netinet/in.h b/inet/netinet/in.h
index ed21690afb..cee35efec9 100644
--- a/inet/netinet/in.h
+++ b/inet/netinet/in.h
@@ -196,6 +196,9 @@  enum
 #define	INADDR_BROADCAST	((in_addr_t) 0xffffffff)
 /* Address indicating an error return.  */
 #define	INADDR_NONE		((in_addr_t) 0xffffffff)
+/* Dummy address for source of ICMPv6 errors converted to IPv4 (RFC
+   7600).  */
+#define	INADDR_DUMMY		((in_addr_t) 0xc0000008)
 
 /* Network number for local host loopback.  */
 #define	IN_LOOPBACKNET		127