Add INADDR_ALLSNOOPERS_GROUP from Linux 5.1 to netinet/in.h

Message ID alpine.DEB.2.21.1905302224200.25485@digraph.polyomino.org.uk
State Committed
Headers

Commit Message

Joseph Myers May 30, 2019, 10:24 p.m. UTC
  This patch adds INADDR_ALLSNOOPERS_GROUP from Linux 5.1 to
netinet/in.h.

Tested for x86_64.

2019-05-30  Joseph Myers  <joseph@codesourcery.com>

	* inet/netinet/in.h (INADDR_ALLSNOOPERS_GROUP): New macro.
  

Comments

Florian Weimer May 31, 2019, 9:08 a.m. UTC | #1
* Joseph Myers:

> This patch adds INADDR_ALLSNOOPERS_GROUP from Linux 5.1 to
> netinet/in.h.
>
> Tested for x86_64.
>
> 2019-05-30  Joseph Myers  <joseph@codesourcery.com>
>
> 	* inet/netinet/in.h (INADDR_ALLSNOOPERS_GROUP): New macro.
>
> diff --git a/inet/netinet/in.h b/inet/netinet/in.h
> index be87de6462..24caf3c77d 100644
> --- a/inet/netinet/in.h
> +++ b/inet/netinet/in.h
> @@ -204,6 +204,7 @@ enum
>  #define INADDR_UNSPEC_GROUP	((in_addr_t) 0xe0000000) /* 224.0.0.0 */
>  #define INADDR_ALLHOSTS_GROUP	((in_addr_t) 0xe0000001) /* 224.0.0.1 */
>  #define INADDR_ALLRTRS_GROUP    ((in_addr_t) 0xe0000002) /* 224.0.0.2 */
> +#define INADDR_ALLSNOOPERS_GROUP ((in_addr_t) 0xe000006a) /* 224.0.0.106 */
>  #define INADDR_MAX_LOCAL_GROUP  ((in_addr_t) 0xe00000ff) /* 224.0.0.255 */

The change itself is okay, but I wonder if it would make sense to refer
RFC 4286?  The other addresses come from the basic

It's also a bit odd to add just one constant from the RFC and not the
others.  To me, it looks like the kernel leaked an internal
implementation detail into a UAPI header.  We already have
IGMP_MRDISC_ADV, though.

Thanks,
Florian
  

Patch

diff --git a/inet/netinet/in.h b/inet/netinet/in.h
index be87de6462..24caf3c77d 100644
--- a/inet/netinet/in.h
+++ b/inet/netinet/in.h
@@ -204,6 +204,7 @@  enum
 #define INADDR_UNSPEC_GROUP	((in_addr_t) 0xe0000000) /* 224.0.0.0 */
 #define INADDR_ALLHOSTS_GROUP	((in_addr_t) 0xe0000001) /* 224.0.0.1 */
 #define INADDR_ALLRTRS_GROUP    ((in_addr_t) 0xe0000002) /* 224.0.0.2 */
+#define INADDR_ALLSNOOPERS_GROUP ((in_addr_t) 0xe000006a) /* 224.0.0.106 */
 #define INADDR_MAX_LOCAL_GROUP  ((in_addr_t) 0xe00000ff) /* 224.0.0.255 */
 
 #if !__USE_KERNEL_IPV6_DEFS