diff options
author | Lorenzo Bianconi <lorenzo.bianconi@redhat.com> | 2018-01-17 11:41:20 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-19 15:10:23 -0500 |
commit | 30c3e9d470358a6741e00e1034a1ea85c6a516f0 (patch) | |
tree | 5e5ff32d154452a327907dca5c61495fcfb076c6 /net/l2tp | |
parent | 24949304c9ed7a409ac42ec63e19835519ffc44a (diff) | |
download | op-kernel-dev-30c3e9d470358a6741e00e1034a1ea85c6a516f0.zip op-kernel-dev-30c3e9d470358a6741e00e1034a1ea85c6a516f0.tar.gz |
l2tp: remove switch block in l2tp_nl_cmd_session_create()
Remove the switch block in l2tp_nl_cmd_session_create() that
checks pseudowire-specific parameters since just L2TP_PWTYPE_ETH and
L2TP_PWTYPE_PPP are currently supported and no actual checks are
performed. Moreover the L2TP_PWTYPE_IP/default case presents a harmless
issue in error handling (break instead of goto out_tunnel)
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Acked-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/l2tp')
-rw-r--r-- | net/l2tp/l2tp_netlink.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/net/l2tp/l2tp_netlink.c b/net/l2tp/l2tp_netlink.c index 405a534..e7ea9c4 100644 --- a/net/l2tp/l2tp_netlink.c +++ b/net/l2tp/l2tp_netlink.c @@ -620,27 +620,6 @@ static int l2tp_nl_cmd_session_create(struct sk_buff *skb, struct genl_info *inf goto out_tunnel; } - /* Check that pseudowire-specific params are present */ - switch (cfg.pw_type) { - case L2TP_PWTYPE_NONE: - break; - case L2TP_PWTYPE_ETH_VLAN: - if (!info->attrs[L2TP_ATTR_VLAN_ID]) { - ret = -EINVAL; - goto out_tunnel; - } - break; - case L2TP_PWTYPE_ETH: - break; - case L2TP_PWTYPE_PPP: - case L2TP_PWTYPE_PPP_AC: - break; - case L2TP_PWTYPE_IP: - default: - ret = -EPROTONOSUPPORT; - break; - } - ret = l2tp_nl_cmd_ops[cfg.pw_type]->session_create(net, tunnel, session_id, peer_session_id, |