mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2024-12-26 16:42:47 +00:00
kernel: N_BADCLASS: fix macro to actually work - class e support
Backport upstream patch: 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. Reported-by: Christopher Ferris <cferris@google.com> Fixes: 65cab850f0ee ("net: Allow class-e address assignment via ifconfig ioctl") Cc: Dave Taht <dave.taht@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
This commit is contained in:
parent
e6bcf1e4ac
commit
1fdb4a7907
@ -37,7 +37,7 @@ Reviewed-by: John Gilmore <gnu@toad.com>
|
||||
|
||||
-#define IN_EXPERIMENTAL(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000)
|
||||
-#define IN_BADCLASS(a) IN_EXPERIMENTAL((a))
|
||||
+#define IN_BADCLASS(a) ((((long int) (a) ) == 0xffffffff)
|
||||
+#define IN_BADCLASS(a) (((long int) (a) ) == (long int)0xffffffff)
|
||||
+#define IN_EXPERIMENTAL(a) IN_BADCLASS((a))
|
||||
+
|
||||
+#define IN_CLASSE(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000)
|
||||
|
@ -37,7 +37,7 @@ Reviewed-by: John Gilmore <gnu@toad.com>
|
||||
|
||||
-#define IN_EXPERIMENTAL(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000)
|
||||
-#define IN_BADCLASS(a) IN_EXPERIMENTAL((a))
|
||||
+#define IN_BADCLASS(a) ((((long int) (a) ) == 0xffffffff)
|
||||
+#define IN_BADCLASS(a) (((long int) (a) ) == (long int)0xffffffff)
|
||||
+#define IN_EXPERIMENTAL(a) IN_BADCLASS((a))
|
||||
+
|
||||
+#define IN_CLASSE(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000)
|
||||
|
@ -37,7 +37,7 @@ Reviewed-by: John Gilmore <gnu@toad.com>
|
||||
|
||||
-#define IN_EXPERIMENTAL(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000)
|
||||
-#define IN_BADCLASS(a) IN_EXPERIMENTAL((a))
|
||||
+#define IN_BADCLASS(a) ((((long int) (a) ) == 0xffffffff)
|
||||
+#define IN_BADCLASS(a) (((long int) (a) ) == (long int)0xffffffff)
|
||||
+#define IN_EXPERIMENTAL(a) IN_BADCLASS((a))
|
||||
+
|
||||
+#define IN_CLASSE(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000)
|
||||
|
Loading…
Reference in New Issue
Block a user