diff options
author | Mike Marshall <hubcap@omnibond.com> | 2016-01-15 14:22:14 -0500 |
---|---|---|
committer | Mike Marshall <hubcap@omnibond.com> | 2016-01-15 14:22:14 -0500 |
commit | 5e1f3938f9e4ef539031d639879cb1cea870fab5 (patch) | |
tree | b262a7c002b05b7bc800a106d6ca6777dabe15bf /net/ipv4/af_inet.c | |
parent | 1808f8cc6cb2842c53147eccfd5e88044d0d22a6 (diff) | |
parent | afd2ff9b7e1b367172f18ba7f693dfb62bdcb2dc (diff) | |
download | lwn-5e1f3938f9e4ef539031d639879cb1cea870fab5.tar.gz lwn-5e1f3938f9e4ef539031d639879cb1cea870fab5.zip |
Orangefs: merge with V4.4
Merge tag 'v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into current
Linux 4.4
Diffstat (limited to 'net/ipv4/af_inet.c')
-rw-r--r-- | net/ipv4/af_inet.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index 11c4ca13ec3b..5c5db6636704 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c @@ -257,6 +257,9 @@ static int inet_create(struct net *net, struct socket *sock, int protocol, int try_loading_module = 0; int err; + if (protocol < 0 || protocol >= IPPROTO_MAX) + return -EINVAL; + sock->state = SS_UNCONNECTED; /* Look for the requested type/protocol pair. */ |