lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 4 Oct 2022 08:16:48 -0600
From:   David Ahern <dsahern@...il.com>
To:     "Drewek, Wojciech" <wojciech.drewek@...el.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Cc:     "stephen@...workplumber.org" <stephen@...workplumber.org>,
        "gnault@...hat.com" <gnault@...hat.com>
Subject: Re: [PATCH iproute2-next 3/3] f_flower: Introduce L2TPv3 support

On 10/3/22 3:19 AM, Drewek, Wojciech wrote:
> 
> 
>> -----Original Message-----
>> From: David Ahern <dsahern@...il.com>
>> Sent: poniedziałek, 3 października 2022 00:51
>> To: Drewek, Wojciech <wojciech.drewek@...el.com>; netdev@...r.kernel.org
>> Cc: stephen@...workplumber.org; gnault@...hat.com
>> Subject: Re: [PATCH iproute2-next 3/3] f_flower: Introduce L2TPv3 support
>>
>> On 9/27/22 1:23 AM, Wojciech Drewek wrote:
>>> Add support for matching on L2TPv3 session ID.
>>> Session ID can be specified only when ip proto was
>>> set to IPPROTO_L2TP.
>>>
>>> L2TPv3 might be transported over IP or over UDP,
>>> this implementation is only about L2TPv3 over IP.
>>> IPv6 is also supported, in this case next header
>>> is set to IPPROTO_L2TP.
>>>
>>> Example filter:
>>>   # tc filter add dev eth0 ingress prio 1 protocol ip \
>>>       flower \
>>>         ip_proto l2tp \
>>>         l2tpv3_sid 1234 \
>>>         skip_sw \
>>>       action drop
>>>
>>> Signed-off-by: Wojciech Drewek <wojciech.drewek@...el.com>
>>> ---
>>>  man/man8/tc-flower.8 | 11 +++++++++--
>>>  tc/f_flower.c        | 45 +++++++++++++++++++++++++++++++++++++++++++-
>>>  2 files changed, 53 insertions(+), 3 deletions(-)
>>>
>>
>>
>> I updated kernel headers to latest net-next tree. (uapi headers are
>> synched via a script.) This patch on top of that does not compile, so
>> something is missing. Please take a look and re-send.
> 
> Ok, the issue is that IPPROTO_L2TP is undeclared and I'm not sure how to resolve this.
> I've moved IPPROTO_L2TP to in.h file but while building, system file is included
> (/usr/include/netinet/in.h) not the project one (iproute2-next/include/uapi/linux/in.h).

utils.h -> resolv.h -> netinet/in.h I believe is the problem.

> I guess the workaround would be to define it in f_flower.c like this:
> #ifndef IPPROTO_L2TP
> #define IPPROTO_L2TP 115
> #endif
> I saw similar solution in case of IPPROTO_MPTCP.
> 
> Let me know if it works for you.
> 

I don't want to propagate redefines like that, but I don't see a
feasible solution with the headers.

Powered by blists - more mailing lists