mbox series

[v3,net-next,0/4] l2tp: set l2specific_len based on l2specific_type

Message ID cover.1516138644.git.lorenzo.bianconi@redhat.com
Headers show
Series l2tp: set l2specific_len based on l2specific_type | expand

Message

Lorenzo Bianconi Jan. 16, 2018, 10:01 p.m. UTC
Do not rely on l2specific_len value provided by userspace but set sublayer
length according to l2specific_type.
Mark L2TP_ATTR_L2SPEC_LEN attribute as not used

Changes since v2:
- drop the patch related to a fix in the switch default case in
  l2tp_nl_cmd_session_create()
- use L2SPECTYPE_NONE as default case in l2tp_get_l2specific_len()

Changes since v1:
- remove l2specific_len parameter
- add sanity check on l2specific_type provided by userspace

Lorenzo Bianconi (4):
  l2tp: double-check l2specific_type provided by userspace
  l2tp: remove l2specific_len dependency in l2tp_core
  l2tp: remove l2specific_len configurable parameter
  l2tp: mark L2TP_ATTR_L2SPEC_LEN as not used

 include/uapi/linux/l2tp.h |  2 +-
 net/l2tp/l2tp_core.c      | 35 ++++++++++++++++-------------------
 net/l2tp/l2tp_core.h      | 13 +++++++++++--
 net/l2tp/l2tp_debugfs.c   |  2 +-
 net/l2tp/l2tp_netlink.c   | 15 +++++++++------
 5 files changed, 38 insertions(+), 29 deletions(-)

Comments

Guillaume Nault Jan. 17, 2018, 10:23 a.m. UTC | #1
On Tue, Jan 16, 2018 at 11:01:53PM +0100, Lorenzo Bianconi wrote:
> Do not rely on l2specific_len value provided by userspace but set sublayer
> length according to l2specific_type.
> Mark L2TP_ATTR_L2SPEC_LEN attribute as not used
> 
Nice. Thanks for doing this work Lorenzo.
James Chapman Jan. 17, 2018, 2:56 p.m. UTC | #2
On 17 January 2018 at 10:23, Guillaume Nault <g.nault@alphalink.fr> wrote:
> On Tue, Jan 16, 2018 at 11:01:53PM +0100, Lorenzo Bianconi wrote:
>> Do not rely on l2specific_len value provided by userspace but set sublayer
>> length according to l2specific_type.
>> Mark L2TP_ATTR_L2SPEC_LEN attribute as not used
>>
> Nice. Thanks for doing this work Lorenzo.

Acked-by: James Chapman <jchapman@katalix.com>
David Miller Jan. 19, 2018, 8:03 p.m. UTC | #3
From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Date: Tue, 16 Jan 2018 23:01:53 +0100

> Do not rely on l2specific_len value provided by userspace but set sublayer
> length according to l2specific_type.
> Mark L2TP_ATTR_L2SPEC_LEN attribute as not used
> 
> Changes since v2:
> - drop the patch related to a fix in the switch default case in
>   l2tp_nl_cmd_session_create()
> - use L2SPECTYPE_NONE as default case in l2tp_get_l2specific_len()
> 
> Changes since v1:
> - remove l2specific_len parameter
> - add sanity check on l2specific_type provided by userspace

Series applied, thanks Lorenzo.