]> git.baikalelectronics.ru Git - kernel.git/commit
net: Make sock protocol value checks more specific
authorMat Martineau <mathew.j.martineau@linux.intel.com>
Thu, 9 Jan 2020 15:59:14 +0000 (07:59 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Jan 2020 02:41:40 +0000 (18:41 -0800)
commitb9ba14160713e0acc329863c4983d27249b3261e
tree733872a3d2f4cc0aac217f383b1d69e91879ba61
parent3da1fe9fc672061bf6d5fa08409f8a28f53e70cf
net: Make sock protocol value checks more specific

SK_PROTOCOL_MAX is only used in two places, for DECNet and AX.25. The
limits have more to do with the those protocol definitions than they do
with the data type of sk_protocol, so remove SK_PROTOCOL_MAX and use
U8_MAX directly.

Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sock.h
net/ax25/af_ax25.c
net/decnet/af_decnet.c