summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-10 21:24:13 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-22 21:09:49 +0100
commita6ab2ac98635b15936c32ed5a4fc98757b0d1f97 (patch)
treee5a932d91d5960987f0345723e31c12c6782fb16 /include
parentee894171fbcb3950d732c334dff69d18cc15d74d (diff)
downloadlinux-a6ab2ac98635b15936c32ed5a4fc98757b0d1f97.tar.gz
linux-a6ab2ac98635b15936c32ed5a4fc98757b0d1f97.tar.bz2
linux-a6ab2ac98635b15936c32ed5a4fc98757b0d1f97.zip
IN_BADCLASS: fix macro to actually work
[ Upstream commit f275ee0fa3a06eb87edc229749cf1eb18f0663fa ] 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: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/in.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/uapi/linux/in.h b/include/uapi/linux/in.h
index f6052e70bf40..a55cb8b10165 100644
--- a/include/uapi/linux/in.h
+++ b/include/uapi/linux/in.h
@@ -268,7 +268,7 @@ struct sockaddr_in {
#define IN_MULTICAST(a) IN_CLASSD(a)
#define IN_MULTICAST_NET 0xe0000000
-#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)