[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <011d981a9164950a7ff20f590344cc207f2234f4.1515940731.git.lorenzo.bianconi@redhat.com>
Date: Sun, 14 Jan 2018 15:50:54 +0100
From: Lorenzo Bianconi <lorenzo.bianconi@...hat.com>
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, jchapman@...alix.com, g.nault@...halink.fr
Subject: [PATCH v2 net-next 1/5] l2tp: fix switch default error handling in l2tp_nl_cmd_session_create()
Although this issue is harmless since that code path is protected by the
check on l2tp_nl_cmd_ops[]/l2tp_nl_cmd_ops[]->session_create(), fix error
handling for L2TP_PWTYPE_IP/default case in l2tp_nl_cmd_session_create()
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@...hat.com>
---
net/l2tp/l2tp_netlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/l2tp/l2tp_netlink.c b/net/l2tp/l2tp_netlink.c
index e1ca29f79821..48b5bf30ec50 100644
--- a/net/l2tp/l2tp_netlink.c
+++ b/net/l2tp/l2tp_netlink.c
@@ -635,7 +635,7 @@ static int l2tp_nl_cmd_session_create(struct sk_buff *skb, struct genl_info *inf
case L2TP_PWTYPE_IP:
default:
ret = -EPROTONOSUPPORT;
- break;
+ goto out_tunnel;
}
ret = l2tp_nl_cmd_ops[cfg.pw_type]->session_create(net, tunnel,
--
2.13.6
Powered by blists - more mailing lists