diff options
Diffstat (limited to 'net/irda')
-rw-r--r-- | net/irda/af_irda.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index 54747c25c86c..f945293c17f0 100644 --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c @@ -1103,6 +1103,9 @@ static int irda_create(struct net *net, struct socket *sock, int protocol, IRDA_DEBUG(2, "%s()\n", __func__); + if (protocol < 0 || protocol > SK_PROTOCOL_MAX) + return -EINVAL; + if (net != &init_net) return -EAFNOSUPPORT; |