summaryrefslogtreecommitdiff
path: root/net/l2tp/l2tp_netlink.c
diff options
context:
space:
mode:
authorTom Parkin <tparkin@katalix.com>2020-07-22 17:32:05 +0100
committerDavid S. Miller <davem@davemloft.net>2020-07-22 18:08:39 -0700
commitb71a61ccfebb4ff733d2d9fc66cd5c75b7ae46a2 (patch)
tree3ff36708660e2921d2e01e72d1d1a7346a141306 /net/l2tp/l2tp_netlink.c
parent637989b5d77e954007aecaf6cadc7badc6ab94fb (diff)
l2tp: cleanup whitespace use
Fix up various whitespace issues as reported by checkpatch.pl: * remove spaces around operators where appropriate, * add missing blank lines following declarations, * remove multiple blank lines, or trailing blank lines at the end of functions. Signed-off-by: Tom Parkin <tparkin@katalix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/l2tp/l2tp_netlink.c')
-rw-r--r--net/l2tp/l2tp_netlink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/l2tp/l2tp_netlink.c b/net/l2tp/l2tp_netlink.c
index ebb381c3f1b9..0ce8e94ace78 100644
--- a/net/l2tp/l2tp_netlink.c
+++ b/net/l2tp/l2tp_netlink.c
@@ -27,7 +27,6 @@
#include "l2tp_core.h"
-
static struct genl_family l2tp_nl_family;
static const struct genl_multicast_group l2tp_multicast_group[] = {
@@ -570,6 +569,7 @@ static int l2tp_nl_cmd_session_create(struct sk_buff *skb, struct genl_info *inf
if (info->attrs[L2TP_ATTR_COOKIE]) {
u16 len = nla_len(info->attrs[L2TP_ATTR_COOKIE]);
+
if (len > 8) {
ret = -EINVAL;
goto out_tunnel;
@@ -579,6 +579,7 @@ static int l2tp_nl_cmd_session_create(struct sk_buff *skb, struct genl_info *inf
}
if (info->attrs[L2TP_ATTR_PEER_COOKIE]) {
u16 len = nla_len(info->attrs[L2TP_ATTR_PEER_COOKIE]);
+
if (len > 8) {
ret = -EINVAL;
goto out_tunnel;