]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
l2tp: double-check l2specific_type provided by userspace
authorLorenzo Bianconi <lorenzo.bianconi@redhat.com>
Tue, 16 Jan 2018 22:01:54 +0000 (23:01 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Jan 2018 20:00:48 +0000 (15:00 -0500)
commitdfffc97d0e196c33452a6bce5a78e33786247d23
treecdc3da8a46080e3754576960f6a87dadf51d3f94
parente0e8a14971455f2edea1d7d51c42c1ac36d02211
l2tp: double-check l2specific_type provided by userspace

Add sanity check on l2specific_type provided by userspace in
l2tp_nl_cmd_session_create() since just L2TP_L2SPECTYPE_DEFAULT and
L2TP_L2SPECTYPE_NONE are currently supported.
Moreover explicitly set l2specific_type to L2TP_L2SPECTYPE_DEFAULT
only if the userspace does not provide a value for it

Reviewed-by: Guillaume Nault <g.nault@alphalink.fr>
Tested-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/l2tp/l2tp_netlink.c