lkml.org 
[lkml]   [2008]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] IPv4: Enable use of 240/4 address space
From
In article <Pine.LNX.4.64.0801180023450.18447@fbirervta.pbzchgretzou.qr> (at Fri, 18 Jan 2008 02:13:52 +0100 (CET)), Jan Engelhardt <jengelh@computergmbh.de> says:

> diff --git a/include/linux/in.h b/include/linux/in.h
> index 27d8a5a..b01bf75 100644
> --- a/include/linux/in.h
> +++ b/include/linux/in.h
> @@ -216,9 +216,6 @@ struct sockaddr_in {
> #define IN_MULTICAST(a) IN_CLASSD(a)
> #define IN_MULTICAST_NET 0xF0000000
>
> -#define IN_EXPERIMENTAL(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000)
> -#define IN_BADCLASS(a) IN_EXPERIMENTAL((a))
> -
> /* Address to accept any incoming messages. */
> #define INADDR_ANY ((unsigned long int) 0x00000000)
>

No, please keep these macros.

> @@ -264,7 +261,7 @@ static inline bool ipv4_is_local_multicast(__be32 addr)
>
> static inline bool ipv4_is_badclass(__be32 addr)
> {
> - return (addr & htonl(0xf0000000)) == htonl(0xf0000000);
> + return addr == 0xFFFFFFFF;
> }
>

To (un)align the IN_BADCLASS macro and ipv6_is_badclass() definition,
you should change the name anyway, e.g., ipv6_is_limited_broadcast()
or some something alike.

--yoshfuji


\
 
 \ /
  Last update: 2008-01-18 02:29    [W:0.186 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site