Re: [PATCH v2 net-next 3/5] l2tp: remove l2specific_len dependency in l2tp_core

2018-01-16 Thread Guillaume Nault
On Mon, Jan 15, 2018 at 10:11:04PM +0100, Lorenzo Bianconi wrote: > > On Mon, Jan 15, 2018 at 07:43:18PM +0100, Lorenzo Bianconi wrote: > >> > On Sun, Jan 14, 2018 at 03:50:56PM +0100, Lorenzo Bianconi wrote: > >> >> --- a/net/l2tp/l2tp_core.h > >> >> +++ b/net/l2tp/l2tp_core.h > >> >> @@ -302,6 +3

Re: [PATCH v2 net-next 3/5] l2tp: remove l2specific_len dependency in l2tp_core

2018-01-15 Thread Lorenzo Bianconi
> On Mon, Jan 15, 2018 at 07:43:18PM +0100, Lorenzo Bianconi wrote: >> > On Sun, Jan 14, 2018 at 03:50:56PM +0100, Lorenzo Bianconi wrote: >> >> --- a/net/l2tp/l2tp_core.h >> >> +++ b/net/l2tp/l2tp_core.h >> >> @@ -302,6 +302,17 @@ static inline void l2tp_session_dec_refcount(struct >> >> l2tp_ses

Re: [PATCH v2 net-next 3/5] l2tp: remove l2specific_len dependency in l2tp_core

2018-01-15 Thread Guillaume Nault
On Mon, Jan 15, 2018 at 07:43:18PM +0100, Lorenzo Bianconi wrote: > > On Sun, Jan 14, 2018 at 03:50:56PM +0100, Lorenzo Bianconi wrote: > >> --- a/net/l2tp/l2tp_core.h > >> +++ b/net/l2tp/l2tp_core.h > >> @@ -302,6 +302,17 @@ static inline void l2tp_session_dec_refcount(struct > >> l2tp_session *s

Re: [PATCH v2 net-next 3/5] l2tp: remove l2specific_len dependency in l2tp_core

2018-01-15 Thread Lorenzo Bianconi
> On Sun, Jan 14, 2018 at 03:50:56PM +0100, Lorenzo Bianconi wrote: >> --- a/net/l2tp/l2tp_core.h >> +++ b/net/l2tp/l2tp_core.h >> @@ -302,6 +302,17 @@ static inline void l2tp_session_dec_refcount(struct >> l2tp_session *session) >> l2tp_session_free(session); >> } >> >> +static inl

Re: [PATCH v2 net-next 3/5] l2tp: remove l2specific_len dependency in l2tp_core

2018-01-15 Thread Guillaume Nault
On Sun, Jan 14, 2018 at 03:50:56PM +0100, Lorenzo Bianconi wrote: > --- a/net/l2tp/l2tp_core.h > +++ b/net/l2tp/l2tp_core.h > @@ -302,6 +302,17 @@ static inline void l2tp_session_dec_refcount(struct > l2tp_session *session) > l2tp_session_free(session); > } > > +static inline int

[PATCH v2 net-next 3/5] l2tp: remove l2specific_len dependency in l2tp_core

2018-01-14 Thread Lorenzo Bianconi
Remove l2specific_len dependency while building l2tpv3 header or parsing the received frame since default L2-Specific Sublayer is always four bytes long and we don't need to rely on a user supplied value. Moreover in l2tp netlink code there are no sanity checks to enforce the relation between l2spe