History

IN_BADCLASS: fix macro to actually work

Commit 65cab850f0ee ("net: Allow class-e address assignment via ifconfig ioctl") modified the IN_BADCLASS macro a bit, but unfortunatly one too many '(' characters were added to the line, making any code that used it, not build properly. Also, the macro now compares an unsigned with a signed value, which isn't ok, so fix that up by making both types match properly.

Greg Kroah-Hartman committed 7 years ago

Commit f275ee01 parent 13d7f461 file · +1 −1Browse files

Showing the changes to include/uapi/linux (1 of 1 file). Show all

Unified · Split

include/uapi/linux/in.h+1−1
@@ -268,7 +268,7 @@ struct sockaddr_in { · 267 unmodified lines
268#define IN_MULTICAST(a) IN_CLASSD(a)268#define IN_MULTICAST(a) IN_CLASSD(a)
269#define IN_MULTICAST_NET 0xe0000000269#define IN_MULTICAST_NET 0xe0000000
270 270
271#define IN_BADCLASS(a) ((((long int) (a) ) == 0xffffffff)271#define IN_BADCLASS(a) (((long int) (a) ) == (long int)0xffffffff)
272#define IN_EXPERIMENTAL(a) IN_BADCLASS((a))272#define IN_EXPERIMENTAL(a) IN_BADCLASS((a))
273 273
274#define IN_CLASSE(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000)274#define IN_CLASSE(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000)