Re: Re: [BUG] net/ppp: A use after free in ppp_unregister_channe

2021-03-15 Thread Guillaume Nault
On Fri, Mar 12, 2021 at 10:47:53PM +0800, lyl2...@mail.ustc.edu.cn wrote: > > > > > -原始邮件- > > 发件人: "Tom Parkin" > > 发送时间: 2021-03-12 18:12:58 (星期五) > > 收件人: lyl2...@mail.ustc.edu.cn > > 抄送: pau...@samba.org, da...@davemloft.net, linux-...@vger.kernel.org, > > netdev@vger.kernel.org, l

Re: [BUG] net/ppp: A use after free in ppp_unregister_channe

2021-03-15 Thread Guillaume Nault
On Fri, Mar 12, 2021 at 10:12:58AM +, Tom Parkin wrote: > Thanks for the report! > > On Thu, Mar 11, 2021 at 20:34:44 +0800, lyl2...@mail.ustc.edu.cn wrote: > > File: drivers/net/ppp/ppp_generic.c > > > > In ppp_unregister_channel, pch could be freed in ppp_unbridge_channels() > > but after

Re: [BUG] net/ppp: A use after free in ppp_unregister_channe

2021-03-15 Thread Guillaume Nault
On Thu, Mar 11, 2021 at 08:34:44PM +0800, lyl2...@mail.ustc.edu.cn wrote: > File: drivers/net/ppp/ppp_generic.c > > In ppp_unregister_channel, pch could be freed in ppp_unbridge_channels() > but after that pch is still in use. Inside the function ppp_unbridge_channels, > if "pchbb == pch" is true

Re: linux-next: manual merge of the net-next tree with the net tree

2021-02-15 Thread Guillaume Nault
On Mon, Feb 15, 2021 at 11:43:54AM +1100, Stephen Rothwell wrote: > Hi all, > > Today's linux-next merge of the net-next tree got a conflict in: > > tools/testing/selftests/net/forwarding/tc_flower.sh > > between commit: > > d2126838050c ("flow_dissector: fix TTL and TOS dissection on IPv4

[PATCH net-next 2/2] selftests: tc: Add generic mpls matching support for tc-flower

2021-02-12 Thread Guillaume Nault
e expected number of packets. Some versions of tc-flower produced invalid json output when dumping MPLS filters with depth > 1. Skip the test if tc isn't recent enough. Signed-off-by: Guillaume Nault --- tools/testing/selftests/net/forwarding/lib.sh | 26 .../selftests/net/forwa

[PATCH net-next 1/2] selftests: tc: Add basic mpls_* matching support for tc-flower

2021-02-12 Thread Guillaume Nault
Add tests in tc_flower.sh for mpls_label, mpls_tc, mpls_bos and mpls_ttl. For each keyword, test the minimal and maximal values. Selectively skip these new mpls tests for tc versions that don't support them. Signed-off-by: Guillaume Nault --- tools/testing/selftests/net/forwarding/config

[PATCH net-next 0/2] selftests: tc: Test tc-flower's MPLS features

2021-02-12 Thread Guillaume Nault
quot; options, which allow matching MPLS fields beyond the first stack entry. In both patches, special care is taken to skip these new tests for incompatible versions of tc. Guillaume Nault (2): selftests: tc: Add basic mpls_* matching support for tc-flower selftests: tc: Add generic mpls mat

[PATCH v2 iproute2] iplink_bareudp: cleanup help message and man page

2021-02-01 Thread Guillaume Nault
ype) rather than the option value (.I ETHERTYPE) in the man page description of [no]multiproto. Signed-off-by: Guillaume Nault --- No changes since v1. Reposting since v1 appears neither in lore.kernel.org nor in patchwork. ip/iplink_bareudp.c | 8 +--- man/man8/ip-link.8.in | 15

[PATCH net 2/2] netfilter: rpfilter: mask ecn bits before fib lookup

2021-01-16 Thread Guillaume Nault
re. Fixes: 8f97339d3feb ("netfilter: add ipv4 reverse path filter match") Signed-off-by: Guillaume Nault --- net/ipv4/netfilter/ipt_rpfilter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/netfilter/ipt_rpfilter.c b/net/ipv4/netfilter/ipt_rpfilter.

[PATCH net 0/2] ipv4: Ensure ECN bits don't influence source address validation

2021-01-16 Thread Guillaume Nault
address validation. Guillaume Nault (2): udp: mask TOS bits in udp_v4_early_demux() netfilter: rpfilter: mask ecn bits before fib lookup net/ipv4/netfilter/ipt_rpfilter.c | 2 +- net/ipv4/udp.c| 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) -- 2.21.3

[PATCH net 1/2] udp: mask TOS bits in udp_v4_early_demux()

2021-01-16 Thread Guillaume Nault
now, early-demux has a cached dst to use and calls ip_mc_validate_source() immediately, without masking the ECN bits. Fixes: bc044e8db796 ("udp: perform source validation for mcast early demux") Signed-off-by: Guillaume Nault --- net/ipv4/udp.c | 3 ++- 1 file changed, 2 insertions(+

[PATCH v2 iproute2] tc: flower: fix json output with mpls lse

2021-01-12 Thread Guillaume Nault
filter show dev eth0 ingress ...{"eth_type":"8847", "mpls":[{"depth":1,"label":100}, {"depth":2,"label":200}]}... Fixes: eb09a15c12fb ("tc: flower: support multiple MPLS LSE match") Signed-off-by: G

Re: [PATCH iproute2] tc: flower: fix json output with mpls lse

2021-01-11 Thread Guillaume Nault
On Mon, Jan 11, 2021 at 09:02:04AM -0700, David Ahern wrote: > On 1/11/21 8:44 AM, Guillaume Nault wrote: > > On Mon, Jan 11, 2021 at 08:30:32AM -0700, David Ahern wrote: > >> On 1/11/21 3:57 AM, Guillaume Nault wrote: > >>> Okay, but, in the end, should I repost this

Re: [PATCH iproute2] tc: flower: fix json output with mpls lse

2021-01-11 Thread Guillaume Nault
On Mon, Jan 11, 2021 at 08:30:32AM -0700, David Ahern wrote: > On 1/11/21 3:57 AM, Guillaume Nault wrote: > > Okay, but, in the end, should I repost this patch? > > I think your patches are covered, but you should check the repo to make > sure. This patch ("tc: flower: fi

Re: [PATCH v4 net-next 1/2] ppp: add PPPIOCBRIDGECHAN and PPPIOCUNBRIDGECHAN ioctls

2021-01-11 Thread Guillaume Nault
On Mon, Jan 11, 2021 at 02:17:13PM +0100, Simon Chopin wrote: > Hello, > > Le 10/12/2020 à 16:50, Tom Parkin a écrit : > > This new ioctl pair allows two ppp channels to be bridged together: > > frames arriving in one channel are transmitted in the other channel > > and vice versa. > > > > The pr

Re: [PATCH iproute2] tc: flower: fix json output with mpls lse

2021-01-11 Thread Guillaume Nault
On Thu, Jan 07, 2021 at 10:39:03AM -0700, David Ahern wrote: > On 1/7/21 10:13 AM, Jakub Kicinski wrote: > > On Thu, 7 Jan 2021 17:48:56 +0100 Guillaume Nault wrote: > >> On Fri, Dec 18, 2020 at 11:25:32PM +0100, Guillaume Nault wrote: > >>> The json output o

Re: [PATCH net v3] ppp: fix refcount underflow on channel unbridge

2021-01-08 Thread Guillaume Nault
ppp_bridge_channels holds a reference on > each channel in advance of setting the bridge pointers. Thanks for following up on this! Acked-by: Guillaume Nault

Re: [PATCH iproute2] tc: flower: fix json output with mpls lse

2021-01-07 Thread Guillaume Nault
On Fri, Dec 18, 2020 at 11:25:32PM +0100, Guillaume Nault wrote: > The json output of the TCA_FLOWER_KEY_MPLS_OPTS attribute was invalid. > > Example: > > $ tc filter add dev eth0 ingress protocol mpls_uc flower mpls \ > lse

Re: [PATCH] ppp: fix refcount underflow on channel unbridge

2021-01-06 Thread Guillaume Nault
On Tue, Jan 05, 2021 at 09:17:43PM +, Tom Parkin wrote: > err_unset: > write_lock_bh(&pch->upl); > - RCU_INIT_POINTER(pch->bridge, NULL); > + /* Re-check pch->bridge with upl held since a racing unbridge might > already > + * have cleared it and dropped the reference on pch

Re: [PATCH net 2/2] bareudp: Fix use of incorrect min_headroom size

2020-12-27 Thread Guillaume Nault
the right netns: ip link add name veth0 netns A type veth peer name veth1 netns B Apart from that, Acked-by: Guillaume Nault And thanks a lot for the reproducers! > ip netns exec A ip link set veth0 up > ip netns exec A ip a a 2001:db8:0::1/64 dev veth0 > ip netns exec B i

Re: [PATCH net 1/2] bareudp: set NETIF_F_LLTX flag

2020-12-27 Thread Guillaume Nault
On Sat, Dec 26, 2020 at 05:12:30PM +, Taehee Yoo wrote: > Like other tunneling interfaces, the bareudp doesn't need TXLOCK. > So, It is good to set the NETIF_F_LLTX flag to improve performance and > to avoid lockdep's false-positive warning. Acked-by: Guillaume Nault

[PATCH net] ipv4: Ignore ECN bits for fib lookups in fib_compute_spec_dst()

2020-12-24 Thread Guillaume Nault
time=0.591 ms Fixes: 35ebf65e851c ("ipv4: Create and use fib_compute_spec_dst() helper.") Signed-off-by: Guillaume Nault --- net/ipv4/fib_frontend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index cdf6ec5aa45d.

Re: [PATCH net] ppp: hold mutex when unbridging channels in unregister path

2020-12-24 Thread Guillaume Nault
On Thu, Dec 24, 2020 at 02:24:32PM +, Tom Parkin wrote: > On Thu, Dec 24, 2020 at 11:28:18 +0100, Guillaume Nault wrote: > > On Wed, Dec 23, 2020 at 06:47:30PM +, Tom Parkin wrote: > > > Channels are bridged using the PPPIOCBRIDGECHAN ioctl, which executes > > &

Re: [PATCH net] ppp: hold mutex when unbridging channels in unregister path

2020-12-24 Thread Guillaume Nault
On Wed, Dec 23, 2020 at 06:47:30PM +, Tom Parkin wrote: > Channels are bridged using the PPPIOCBRIDGECHAN ioctl, which executes > with the ppp_mutex held. > > Unbridging may occur in two code paths: firstly an explicit > PPPIOCUNBRIDGECHAN ioctl, and secondly on channel unregister. The > latt

[PATCH net] ppp: Fix PPPIOCUNBRIDGECHAN request number

2020-12-19 Thread Guillaume Nault
PPPIOCGL2TPSTATS already uses 54. This shouldn't be a problem in practice, but let's keep the logical decreasing assignment scheme. Fixes: 4cf476ced45d ("ppp: add PPPIOCBRIDGECHAN and PPPIOCUNBRIDGECHAN ioctls") Signed-off-by: Guillaume Nault --- Original patch was committe

[PATCH iproute2] tc: flower: fix json output with mpls lse

2020-12-18 Thread Guillaume Nault
filter show dev eth0 ingress ...{"eth_type":"8847", "mpls":[{"depth":1,"label":100}, {"depth":2,"label":200}]}... Fixes: eb09a15c12fb ("tc: flower: support multiple MPLS LSE match") Signed-off-

[PATCH iproute2] testsuite: Add mpls packet matching tests for tc flower

2020-12-14 Thread Guillaume Nault
pth of the MPLS label stack). This test file allows to find problems like the one fixed by Linux commit 7fdd375e3830 ("net: sched: Fix dump of MPLS_OPT_LSE_LABEL attribute in cls_flower"). Signed-off-by: Guillaume Nault --- testsuite/tests/tc/flower_mpls.t | 82

Re: Urgent: BUG: PPP ioctl Transport endpoint is not connected

2020-12-14 Thread Guillaume Nault
On Wed, Dec 09, 2020 at 09:12:18PM +0200, Martin Zaharinov wrote: > > > > On 9 Dec 2020, at 20:10, Guillaume Nault wrote: > > > > On Wed, Dec 09, 2020 at 06:57:44PM +0200, Martin Zaharinov wrote: > >>> On 9 Dec 2020, at 18:40, Guillaume Nault wrote: >

Re: Urgent: BUG: PPP ioctl Transport endpoint is not connected

2020-12-14 Thread Guillaume Nault
> > + ppp_unlock(ppp); > + spin_unlock_bh(>downl); No, nested locks have to be released in the reverse order they were acquired. > But in stable kernel is : > > spin_unlock_bh(&pch->downl); > ppp_unlock(ppp); This is correct, and has been correctly b

Re: [PATCH v4 net-next 0/2] add ppp_generic ioctl(s) to bridge channels

2020-12-10 Thread Guillaume Nault
the ISP network in > a PPPoL2TP session. Looks good to me now. Thanks Tom! Reviewed-by: Guillaume Nault

Re: [PATCH v3 net-next 1/2] ppp: add PPPIOCBRIDGECHAN and PPPIOCUNBRIDGECHAN ioctls

2020-12-10 Thread Guillaume Nault
On Thu, Dec 10, 2020 at 02:46:23PM +, Tom Parkin wrote: > On Mon, Dec 07, 2020 at 17:22:28 +0100, Guillaume Nault wrote: > > On Fri, Dec 04, 2020 at 04:36:55PM +, Tom Parkin wrote: > > > + case PPPIOCBRIDGECHAN: > > > +

Re: Urgent: BUG: PPP ioctl Transport endpoint is not connected

2020-12-09 Thread Guillaume Nault
On Wed, Dec 09, 2020 at 06:57:44PM +0200, Martin Zaharinov wrote: > > On 9 Dec 2020, at 18:40, Guillaume Nault wrote: > > On Wed, Dec 09, 2020 at 04:47:52PM +0200, Martin Zaharinov wrote: > >> Hi All > >> > >> I have problem with latest kernel release &g

Re: Urgent: BUG: PPP ioctl Transport endpoint is not connected

2020-12-09 Thread Guillaume Nault
On Wed, Dec 09, 2020 at 04:47:52PM +0200, Martin Zaharinov wrote: > Hi All > > I have problem with latest kernel release > And the problem is base on this late problem : > > > https://www.mail-archive.com/search?l=netdev@vger.kernel.org&q=subject:%22Re%5C%3A+ppp%5C%2Fpppoe%2C+still+panic+4.15.3

[PATCH net] net: sched: Fix dump of MPLS_OPT_LSE_LABEL attribute in cls_flower

2020-12-09 Thread Guillaume Nault
Signed-off-by: Guillaume Nault --- net/sched/cls_flower.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c index fed18fd2c50b..1319986693fc 100644 --- a/net/sched/cls_flower.c +++ b/net/sched/cls_flower.c @@ -2424,8 +2424,8

Re: [PATCH v3 net-next 1/2] ppp: add PPPIOCBRIDGECHAN and PPPIOCUNBRIDGECHAN ioctls

2020-12-07 Thread Guillaume Nault
On Fri, Dec 04, 2020 at 04:36:55PM +, Tom Parkin wrote: > +static int ppp_unbridge_channels(struct channel *pch) > +{ > + struct channel *pchb, *pchbb; > + > + write_lock_bh(&pch->upl); > + pchb = rcu_dereference_protected(pch->bridge, > lockdep_is_held(&pch->upl)); > + if (!pc

Re: [PATCH net v2] net/sched: act_mpls: ensure LSE is pullable before reading it

2020-12-03 Thread Guillaume Nault
On Thu, Dec 03, 2020 at 10:37:52AM +0100, Davide Caratti wrote: > when 'act_mpls' is used to mangle the LSE, the current value is read from > the packet dereferencing 4 bytes at mpls_hdr(): ensure that the label is > contained in the skb "linear" area. Acked-by: Guillaume Nault

Re: [PATCH v2 net-next 1/2] ppp: add PPPIOCBRIDGECHAN and PPPIOCUNBRIDGECHAN ioctls

2020-12-03 Thread Guillaume Nault
On Thu, Dec 03, 2020 at 11:57:18AM +, Tom Parkin wrote: > On Thu, Dec 03, 2020 at 01:23:18 +0100, Guillaume Nault wrote: > > On Tue, Dec 01, 2020 at 11:52:49AM +, Tom Parkin wrote: > > > + if (!pchb) { > > > + write_unlock_bh(&pch->up

Re: [PATCH v2 net-next 1/2] ppp: add PPPIOCBRIDGECHAN and PPPIOCUNBRIDGECHAN ioctls

2020-12-02 Thread Guillaume Nault
On Tue, Dec 01, 2020 at 11:52:49AM +, Tom Parkin wrote: > This new ioctl pair allows two ppp channels to be bridged together: > frames arriving in one channel are transmitted in the other channel > and vice versa. > > The practical use for this is primarily to support the L2TP Access > Concent

[PATCH net-next] selftests: forwarding: Add MPLS L2VPN test

2020-12-02 Thread Guillaume Nault
Connect hosts H1 and H2 using two intermediate encapsulation routers (LER1 and LER2). These routers encapsulate traffic from the hosts, including the original Ethernet header, into MPLS. Use ping to test reachability between H1 and H2. Signed-off-by: Guillaume Nault --- .../testing/selftests

Re: [PATCH net] ipv4: Fix tos mask in inet_rtm_getroute()

2020-11-29 Thread Guillaume Nault
On Sat, Nov 28, 2020 at 01:17:16PM -0800, Jakub Kicinski wrote: > On Sat, 28 Nov 2020 10:03:42 -0700 David Ahern wrote: > > On 11/26/20 11:09 AM, Guillaume Nault wrote: > > > When inet_rtm_getroute() was converted to use the RCU variants of > > > ip_route_input() and ip_

Re: [PATCH net-next 1/2] ppp: add PPPIOCBRIDGECHAN and PPPIOCUNBRIDGECHAN ioctls

2020-11-27 Thread Guillaume Nault
On Thu, Nov 26, 2020 at 12:24:25PM +, Tom Parkin wrote: > This new ioctl pair allows two ppp channels to be bridged together: > frames arriving in one channel are transmitted in the other channel > and vice versa. Thanks! Some comments below (mostly about locking). > The practical use for thi

[PATCH net] ipv4: Fix tos mask in inet_rtm_getroute()

2020-11-26 Thread Guillaume Nault
.173/0.173/0.173/0.000 ms This patch re-applies IPTOS_RT_MASK in inet_rtm_getroute(), to return results consistent with real route lookups. Fixes: 3765d35ed8b9 ("net: ipv4: Convert inet_rtm_getroute to rcu versions of route lookup") Signed-off-by: Guillaume Nault --- net/ipv4/route.c

Re: [PATCH net-next] net: DSCP in IPv4 routing v2

2020-11-24 Thread Guillaume Nault
On Tue, Nov 24, 2020 at 12:41:49PM +1000, Russell Strong wrote: > On Mon, 23 Nov 2020 23:55:05 +0100 Guillaume Nault wrote: > > On Sat, Nov 21, 2020 at 06:24:46PM +1000, Russell Strong wrote: > > I was wondering if one patch would be acceptable, or should it be broken > up?

Re: [PATCH net-next] net: DSCP in IPv4 routing v2

2020-11-23 Thread Guillaume Nault
On Sat, Nov 21, 2020 at 06:24:46PM +1000, Russell Strong wrote: > From 2f27f92d5a6f4dd69ac4af32cdb51ba8d2083606 Mon Sep 17 00:00:00 2001 > From: Russell Strong > Date: Sat, 21 Nov 2020 18:12:43 +1000 > Subject: [PATCH] DSCP in IPv4 routing v2 > > This patch allows the use of DSCP values in routin

Re: [RFC PATCH 0/2] add ppp_generic ioctl to bridge channels

2020-11-18 Thread Guillaume Nault
On Tue, Nov 10, 2020 at 08:47:40AM -0800, Jakub Kicinski wrote: > On Tue, 10 Nov 2020 10:28:34 +0100 Guillaume Nault wrote: > > On Mon, Nov 09, 2020 at 03:52:37PM -0800, Jakub Kicinski wrote: > > > On Fri, 6 Nov 2020 18:16:45 + Tom Parkin wrote: > > > > This

Re: [RFC PATCH 0/2] add ppp_generic ioctl to bridge channels

2020-11-17 Thread Guillaume Nault
On Tue, Nov 17, 2020 at 12:54:22PM +, Tom Parkin wrote: > On Tue, Nov 10, 2020 at 08:47:40 -0800, Jakub Kicinski wrote: > > On Tue, 10 Nov 2020 10:28:34 +0100 Guillaume Nault wrote: > > > I think the question is more about long term maintainance. Do we want > > >

Re: [RFC PATCH 1/2] ppp: add PPPIOCBRIDGECHAN ioctl

2020-11-17 Thread Guillaume Nault
On Tue, Nov 17, 2020 at 12:26:38PM +, Tom Parkin wrote: > On Sun, Nov 15, 2020 at 17:28:38 +0100, Guillaume Nault wrote: > > On Tue, Nov 10, 2020 at 12:04:29PM +, Tom Parkin wrote: > > > On Tue, Nov 10, 2020 at 00:24:01 +0100, Guillaume Nault wrote: > > > How

Re: [RFC PATCH 1/2] ppp: add PPPIOCBRIDGECHAN ioctl

2020-11-15 Thread Guillaume Nault
On Tue, Nov 10, 2020 at 12:04:29PM +, Tom Parkin wrote: > On Tue, Nov 10, 2020 at 00:24:01 +0100, Guillaume Nault wrote: > > On Fri, Nov 06, 2020 at 06:16:46PM +, Tom Parkin wrote: > > > + err = 0; > > > + } > > &

Re: [RFC PATCH 0/2] add ppp_generic ioctl to bridge channels

2020-11-15 Thread Guillaume Nault
On Tue, Nov 10, 2020 at 11:54:07AM +, Tom Parkin wrote: > On Mon, Nov 09, 2020 at 23:51:53 +0100, Guillaume Nault wrote: > > BTW, shouldn't we have an "UNBRIDGE" command to remove the bridge > > between two channels? > > I'm not sure of the

Re: [PATCH net-next] net: DSCP in IPv4 routing

2020-11-13 Thread Guillaume Nault
On Thu, Nov 12, 2020 at 07:36:56PM -0800, Stephen Hemminger wrote: > On Fri, 13 Nov 2020 12:06:37 +1000 > Russell Strong wrote: > > > diff --git a/include/uapi/linux/in_route.h > > b/include/uapi/linux/in_route.h index 0cc2c23b47f8..db5d236b9c50 100644 > > --- a/include/uapi/linux/in_route.h > >

[PATCH net-next] selftests: set conf.all.rp_filter=0 in bareudp.sh

2020-11-11 Thread Guillaume Nault
ftests: disable rp_filter when testing bareudp") Fixes: bbbc7aa45eef ("selftests: add test script for bareudp tunnels") Signed-off-by: Guillaume Nault --- tools/testing/selftests/net/bareudp.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/net/bareudp

Re: [RFC PATCH 0/2] add ppp_generic ioctl to bridge channels

2020-11-10 Thread Guillaume Nault
On Tue, Nov 10, 2020 at 12:42:24PM +, Tom Parkin wrote: > On Tue, Nov 10, 2020 at 10:28:34 +0100, Guillaume Nault wrote: > > On Mon, Nov 09, 2020 at 03:52:37PM -0800, Jakub Kicinski wrote: > > > On Fri, 6 Nov 2020 18:16:45 + Tom Parkin wrote: > > > > This

Re: [RFC PATCH 0/2] add ppp_generic ioctl to bridge channels

2020-11-10 Thread Guillaume Nault
On Mon, Nov 09, 2020 at 03:52:37PM -0800, Jakub Kicinski wrote: > On Fri, 6 Nov 2020 18:16:45 + Tom Parkin wrote: > > This small RFC series implements a suggestion from Guillaume Nault in > > response to my previous submission to add an ac/pppoe driver to the l2tp

Re: [RFC PATCH 1/2] ppp: add PPPIOCBRIDGECHAN ioctl

2020-11-09 Thread Guillaume Nault
On Fri, Nov 06, 2020 at 06:16:46PM +, Tom Parkin wrote: > This new ioctl allows two ppp channels to be bridged together: frames > arriving in one channel are transmitted in the other channel and vice > versa. > > The practical use for this is primarily to support the L2TP Access > Concentrator

Re: [RFC PATCH 0/2] add ppp_generic ioctl to bridge channels

2020-11-09 Thread Guillaume Nault
On Fri, Nov 06, 2020 at 06:16:45PM +, Tom Parkin wrote: > This small RFC series implements a suggestion from Guillaume Nault in > response to my previous submission to add an ac/pppoe driver to the l2tp > subsystem[1]. > > Following Guillaume's advice, this series adds

[PATCH net-next] selftests: disable rp_filter when testing bareudp

2020-11-07 Thread Guillaume Nault
Some systems have rp_filter=1 as default configuration. This breaks bareudp.sh as the intermediate namespaces handle part of the routing with regular IPv4 routes but the reverse path is done with tc (flower/tunnel_key/mirred). Signed-off-by: Guillaume Nault --- tools/testing/selftests/net

[PATCH iproute2] tc-mpls: fix manpage example and help message string

2020-11-02 Thread Guillaume Nault
modify" can also set the MPLS_BOS field. Signed-off-by: Guillaume Nault --- man/man8/tc-mpls.8 | 6 +++--- tc/m_mpls.c| 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/man/man8/tc-mpls.8 b/man/man8/tc-mpls.8 index 9e563e98..7f8be221 100644 --- a/man/man8/tc-m

[PATCH iproute2] tc-vlan: fix help and error message strings

2020-11-02 Thread Guillaume Nault
* "vlan pop" can be followed by a CONTROL keyword. * Add missing space in error message. Signed-off-by: Guillaume Nault --- tc/m_vlan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tc/m_vlan.c b/tc/m_vlan.c index e6b21330..57722b73 100644 --- a/tc/m_vlan.

[PATCH net-next] mpls: drop skb's dst in mpls_forward()

2020-10-30 Thread Guillaume Nault
>neigh_lookup any more. Let's keep a WARN condition though, to document the precondition and to ease detection of such problems in the future. Signed-off-by: Guillaume Nault --- include/net/dst.h | 12 +--- net/mpls/af_mpls.c | 2 ++ 2 files changed, 7 insertions(+), 7 deletions(

[PATCH v2 net-next] selftests: add test script for bareudp tunnels

2020-10-30 Thread Guillaume Nault
test now uses its own IP addresses. This minimises the amount of cleanup between tests and simplifies the script. * Verify that iproute2 supports bareudp tunnels before running the script (and other minor usability improvements). Signed-off-by: Guillaume Nault --- tools/testing/selftests

Re: [PATCH net] selftests: add test script for bareudp tunnels

2020-10-30 Thread Guillaume Nault
On Fri, Oct 30, 2020 at 04:20:13AM +, Varghese, Martin (Nokia - IN/Bangalore) wrote: > On Wed, Oct 28, 2020 at 07:05:19PM +0100, Guillaume Nault wrote: > >Test different encapsulation modes of the bareudp module: > > Comprehensive tests. Thanks a lot William. Thanks Martin

Re: [PATCH net] selftests: add test script for bareudp tunnels

2020-10-30 Thread Guillaume Nault
On Thu, Oct 29, 2020 at 02:11:38PM -0400, Willem de Bruijn wrote: > On Wed, Oct 28, 2020 at 10:27 PM Guillaume Nault wrote: > > > > On Wed, Oct 28, 2020 at 07:05:19PM +0100, Guillaume Nault wrote: > > > Test different encapsulation modes of the bareudp module: > >

Re: [PATCH net] selftests: add test script for bareudp tunnels

2020-10-28 Thread Guillaume Nault
On Wed, Oct 28, 2020 at 07:05:19PM +0100, Guillaume Nault wrote: > Test different encapsulation modes of the bareudp module: BTW, I was assuming that kselftests were like documentation updates, and therefore always suitable for the net tree. If not, the patch applies cleanly to net-next (an

[PATCH net] selftests: add test script for bareudp tunnels

2020-10-28 Thread Guillaume Nault
Test different encapsulation modes of the bareudp module: * Unicast MPLS, * IPv4 only, * IPv4 in multiproto mode (that is, IPv4 and IPv6), * IPv6. Each mode is tested with both an IPv4 and an IPv6 underlay. Signed-off-by: Guillaume Nault --- tools/testing/selftests/net/Makefile | 1

Re: [PATCH v2 net] net/sched: act_mpls: Add softdep on mpls_gso.ko

2020-10-28 Thread Guillaume Nault
On Wed, Oct 28, 2020 at 12:35:17PM -0700, Cong Wang wrote: > On Tue, Oct 27, 2020 at 2:39 PM Guillaume Nault wrote: > > > > On Tue, Oct 27, 2020 at 10:28:29AM -0700, Cong Wang wrote: > > > On Mon, Oct 26, 2020 at 4:23 AM Guillaume Nault wrote: > > >

Re: [PATCH v2 net] net/sched: act_mpls: Add softdep on mpls_gso.ko

2020-10-27 Thread Guillaume Nault
On Tue, Oct 27, 2020 at 10:28:29AM -0700, Cong Wang wrote: > On Mon, Oct 26, 2020 at 4:23 AM Guillaume Nault wrote: > > > > TCA_MPLS_ACT_PUSH and TCA_MPLS_ACT_MAC_PUSH might be used on gso > > packets. Such packets will thus require mpls_gso.ko for segmentation. >

[PATCH v2 net] net/sched: act_mpls: Add softdep on mpls_gso.ko

2020-10-26 Thread Guillaume Nault
t;) Signed-off-by: Guillaume Nault --- net/sched/act_mpls.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/sched/act_mpls.c b/net/sched/act_mpls.c index f40bf9771cb9..5c7456e5b5cf 100644 --- a/net/sched/act_mpls.c +++ b/net/sched/act_mpls.c @@ -426,6 +426,7 @@ static void __exit mpls_clea

Re: [PATCH net 1/2] mpls: Make MPLS_IPTUNNEL select NET_MPLS_GSO

2020-10-26 Thread Guillaume Nault
On Sun, Oct 25, 2020 at 08:48:38PM -0600, David Ahern wrote: > On 10/25/20 3:43 PM, Jakub Kicinski wrote: > > On Fri, 23 Oct 2020 20:48:16 +0200 Guillaume Nault wrote: > >> On Fri, Oct 23, 2020 at 11:23:04AM -0700, Jakub Kicinski wrote: > >>> On Fri, 23 Oct 2020

Re: [PATCH net 1/2] mpls: Make MPLS_IPTUNNEL select NET_MPLS_GSO

2020-10-23 Thread Guillaume Nault
On Fri, Oct 23, 2020 at 11:23:04AM -0700, Jakub Kicinski wrote: > On Fri, 23 Oct 2020 18:19:43 +0200 Guillaume Nault wrote: > > Since commit b7c24497baea ("mpls: load mpls_gso after mpls_iptunnel"), > > mpls_iptunnel.ko has a softdep on mpls_gso.ko. For this to work, w

[PATCH net 0/2] mpls: fix dependencies on mpls_gso.ko

2020-10-23 Thread Guillaume Nault
also depends on mpls_gso (patch 2). Guillaume Nault (2): mpls: Make MPLS_IPTUNNEL select NET_MPLS_GSO net/sched: act_mpls: Add softdep on mpls_gso.ko net/mpls/Kconfig | 1 + net/sched/Kconfig| 2 ++ net/sched/act_mpls.c | 1 + 3 files changed, 4 insertions(+) -- 2.21.3

[PATCH net 2/2] net/sched: act_mpls: Add softdep on mpls_gso.ko

2020-10-23 Thread Guillaume Nault
TCA_MPLS_ACT_PUSH and TCA_MPLS_ACT_MAC_PUSH might be used on gso packets. Such packets will thus require mpls_gso.ko for segmentation. Fixes: 2a2ea50870ba ("net: sched: add mpls manipulation actions to TC") Signed-off-by: Guillaume Nault --- net/sched/Kconfig| 2 ++ net/sched/act_

[PATCH net 1/2] mpls: Make MPLS_IPTUNNEL select NET_MPLS_GSO

2020-10-23 Thread Guillaume Nault
quot;) Signed-off-by: Guillaume Nault --- net/mpls/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/net/mpls/Kconfig b/net/mpls/Kconfig index d672ab72ab12..b83093bcb48f 100644 --- a/net/mpls/Kconfig +++ b/net/mpls/Kconfig @@ -33,6 +33,7 @@ config MPLS_ROUTING config MPLS_IPTUNNEL tri

Re: [PATCH v2 iproute2-next 1/2] m_vlan: add pop_eth and push_eth actions

2020-10-22 Thread Guillaume Nault
On Thu, Oct 22, 2020 at 08:11:45AM -0600, David Ahern wrote: > On 10/22/20 2:36 AM, Guillaume Nault wrote: > > > >> Is it time to use full string compare for these options? > > > > If there's consensus that matches() should be avoided for new options, > >

[PATCH iproute2-next] m_mpls: test the 'mac_push' action after 'modify'

2020-10-22 Thread Guillaume Nault
;. Revert to the original behaviour by moving the "mac_push" test after "modify". Fixes: 02a261b5ba1c ("m_mpls: add mac_push action") Signed-off-by: Guillaume Nault --- tc/m_mpls.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tc/m_mpls.c b

Re: [PATCH v2 iproute2-next 1/2] m_vlan: add pop_eth and push_eth actions

2020-10-22 Thread Guillaume Nault
On Wed, Oct 21, 2020 at 11:32:34AM -0700, Stephen Hemminger wrote: > On Mon, 19 Oct 2020 17:23:01 +0200 > Guillaume Nault wrote: > > > + } else if (matches(*argv, "pop_eth") == 0) { > > Using matches allows for shorter command lines but can be make >

Re: [PATCH net v2] mpls: load mpls_gso after mpls_iptunnel

2020-10-21 Thread Guillaume Nault
On Tue, Oct 20, 2020 at 02:43:33PM +0300, Alexander Ovechkin wrote: > mpls_iptunnel is used only for mpls encapsuation, and if encaplusated > packet is larger than MTU we need mpls_gso for segmentation. > > Signed-off-by: Alexander Ovechkin > Acked-by: Dmitry Yakunin > --- > net/mpls/mpls_iptun

Re: [PATCH net] net/sched: act_gate: Unlock ->tcfa_lock in tc_setup_flow_action()

2020-10-21 Thread Guillaume Nault
On Tue, Oct 20, 2020 at 05:37:22PM -0700, Cong Wang wrote: > On Tue, Oct 20, 2020 at 8:34 AM Guillaume Nault wrote: > > > > We need to jump to the "err_out_locked" label when > > tcf_gate_get_entries() fails. Otherwise, tc_setup_flow_action() exits > > with

[PATCH net] net/sched: act_gate: Unlock ->tcfa_lock in tc_setup_flow_action()

2020-10-20 Thread Guillaume Nault
We need to jump to the "err_out_locked" label when tcf_gate_get_entries() fails. Otherwise, tc_setup_flow_action() exits with ->tcfa_lock still held. Fixes: d29bdd69ecdd ("net: schedule: add action gate offloading") Signed-off-by: Guillaume Nault --- net/sched/cls_api.c

[PATCH v2 iproute2-next 1/2] m_vlan: add pop_eth and push_eth actions

2020-10-19 Thread Guillaume Nault
sting ones. Signed-off-by: Guillaume Nault --- man/man8/tc-vlan.8| 39 +- tc/m_vlan.c | 69 +++ testsuite/tests/tc/vlan.t | 86 +++ 3 files changed, 192 insertions(+), 2 deletions(-) create mode 100755

[PATCH v2 iproute2-next 2/2] m_mpls: add mac_push action

2020-10-19 Thread Guillaume Nault
test suite for m_mpls, which covers the new action and the pre-existing ones. Signed-off-by: Guillaume Nault --- lib/ll_proto.c| 1 + man/man8/tc-mpls.8| 44 +++-- man/man8/tc-vlan.8| 5 ++- tc/m_mpls.c | 43 te

[PATCH v2 iproute2-next 0/2] tc: support for new MPLS L2 VPN actions

2020-10-19 Thread Guillaume Nault
, then add an outer Ethernet header and send the resulting frame to the next hop. v2: trivial coding style fix (line wrap). Guillaume Nault (2): m_vlan: add pop_eth and push_eth actions m_mpls: add mac_push action lib/ll_proto.c| 1 + man/man8/tc-mpls.8| 44

Re: [PATCH iproute2-next 2/2] m_mpls: add mac_push action

2020-10-19 Thread Guillaume Nault
On Sat, Oct 17, 2020 at 09:23:52AM -0600, David Ahern wrote: > On 10/13/20 8:32 AM, Guillaume Nault wrote: > > @@ -41,12 +44,12 @@ static void usage(void) > > > > static bool can_modify_mpls_fields(unsigned int action) > > { > > - return acti

[PATCH iproute2-next 2/2] m_mpls: add mac_push action

2020-10-13 Thread Guillaume Nault
test suite for m_mpls, which covers the new action and the pre-existing ones. Signed-off-by: Guillaume Nault --- lib/ll_proto.c| 1 + man/man8/tc-mpls.8| 44 +++-- man/man8/tc-vlan.8| 5 ++- tc/m_mpls.c | 41 +++ te

[PATCH iproute2-next 1/2] m_vlan: add pop_eth and push_eth actions

2020-10-13 Thread Guillaume Nault
sting ones. Signed-off-by: Guillaume Nault --- man/man8/tc-vlan.8| 39 +- tc/m_vlan.c | 69 +++ testsuite/tests/tc/vlan.t | 86 +++ 3 files changed, 192 insertions(+), 2 deletions(-) create mode 100755

[PATCH iproute2-next 0/2] tc: support for new MPLS L2 VPN actions

2020-10-13 Thread Guillaume Nault
, then add an outer Ethernet header and send the resulting frame to the next hop. Guillaume Nault (2): m_vlan: add pop_eth and push_eth actions m_mpls: add mac_push action lib/ll_proto.c| 1 + man/man8/tc-mpls.8| 44 ++-- man/man8/tc-vlan.8| 44

[PATCH net-next 1/2] net/sched: act_vlan: Add {POP,PUSH}_ETH actions

2020-10-02 Thread Guillaume Nault
these actions, consolidate the code in skbuff.c (like for vlan and mpls push/pop). Signed-off-by: Guillaume Nault --- include/linux/skbuff.h | 3 ++ include/net/tc_act/tc_vlan.h| 2 + include/uapi/linux/tc_act/tc_vlan.h | 4 ++ net/core/skbuff.c

[PATCH net-next 2/2] net/sched: act_mpls: Add action to push MPLS LSE before Ethernet header

2020-10-02 Thread Guillaume Nault
-by: Guillaume Nault --- include/uapi/linux/tc_act/tc_mpls.h | 1 + net/sched/act_mpls.c| 18 ++ 2 files changed, 19 insertions(+) diff --git a/include/uapi/linux/tc_act/tc_mpls.h b/include/uapi/linux/tc_act/tc_mpls.h index 9360e95273c7..9e4e8f52a779 100644 --- a

[PATCH net-next 0/2] net/sched: Add actions for MPLS L2 VPNs

2020-10-02 Thread Guillaume Nault
Host-B# tc filter add dev ethBx ingress protocol mpls_uc \ flower mpls_label 20 mpls_bos 1\ action vlan pop_eth\ action mpls pop proto teb \ action mirred egress redirect dev ethBy Guil

[PATCH net] net/core: check length before updating Ethertype in skb_mpls_{push,pop}

2020-10-02 Thread Guillaume Nault
locations. Fix this by verifying that mac_len is big enough to contain an Ethernet header. Fixes: fa4e0f8855fc ("net/sched: fix corrupted L2 header with MPLS 'push' and 'pop' actions") Signed-off-by: Guillaume Nault --- Notes: - Found by code inspection. - Usi

Re: [PATCH net-next 0/6] l2tp: add ac/pppoe driver

2020-10-01 Thread Guillaume Nault
On Thu, Oct 01, 2020 at 03:57:29PM +0100, Tom Parkin wrote: > I'll wait on a little to let any other review comments come in, but > if doing as you suggest is still the preferred approach I'll happily > look at implementing it -- assuming you don't have a patch ready to go? I unfortunately don't.

Re: [PATCH net-next 0/6] l2tp: add ac/pppoe driver

2020-10-01 Thread Guillaume Nault
On Wed, Sep 30, 2020 at 10:07:01PM +0100, Tom Parkin wrote: > L2TPv2 tunnels are often used as a part of a home broadband connection, > using a PPP link to connect the subscriber network into the Internet > Service Provider's network. > > In this scenario, PPPoE is widely used between the L2TP Acc

Re: [PATCH net] netns: fix a deadlock in peernet2id_alloc()

2020-09-07 Thread Guillaume Nault
_rtnl_newlink+0x6b9/0x8e0 > [ 33.954665][ T607] ? __lock_acquire+0x95d/0x1f20 > [ 33.955450][ T607] ? lock_acquire+0xaf/0x3a0 > [ 33.956193][ T607] ? is_bpf_text_address+0x5/0xe0 > [ 33.956999][ T607] rtnl_newlink+0x47/0x70 Thanks Taehee. I thought I had checked a

Re: [PATCH net] Revert "vxlan: fix tos value before xmit"

2020-08-05 Thread Guillaume Nault
> Signed-off-by: Hangbin Liu I guess an explicit Fixes: 71130f29979c ("vxlan: fix tos value before xmit"). tag would help the -stable maintainers. Apart from that, Acked-by: Guillaume Nault

Re: [PATCHv2 net 0/2] Add IP_DSCP_MASK and fix vxlan tos value before xmit

2020-08-04 Thread Guillaume Nault
icated with RT_DSCP(). > Post the patch to net instead of net-next as we need fix the vxlan issue Acked-by: Guillaume Nault

Re: [PATCH net-next 2/2] vxlan: fix getting tos value from DSCP field

2020-08-03 Thread Guillaume Nault
On Mon, Aug 03, 2020 at 04:02:17PM +0800, Hangbin Liu wrote: > In commit 71130f29979c ("vxlan: fix tos value before xmit") we strict > the vxlan tos value before xmit. But as IP tos field has been obsoleted > by RFC2474, and updated by RFC3168 later. We should use new DSCP field, > or we will lost

Re: [PATCH net-next 1/2] net: add IP_DSCP_MASK

2020-08-03 Thread Guillaume Nault
On Mon, Aug 03, 2020 at 04:02:16PM +0800, Hangbin Liu wrote: > In RFC1349 it defined TOS field like > >0 1 2 3 4 5 6 7 > +-+-+-+-+-+-+-+-+ > | PRECEDENCE| TOS | MBZ | > +-+-+-+-+

[PATCH v2 net] bareudp: forbid mixing IP and MPLS in multiproto mode

2020-07-25 Thread Guillaume Nault
Signed-off-by: Guillaume Nault --- drivers/net/bareudp.c | 29 ++--- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/drivers/net/bareudp.c b/drivers/net/bareudp.c index 3dd46cd55114..88e7900853db 100644 --- a/drivers/net/bareudp.c +++ b/drivers/net/bareudp.c @@ -

Re: [PATCH net] bareudp: forbid mixing IP and MPLS in multiproto mode

2020-07-25 Thread Guillaume Nault
On Fri, Jul 24, 2020 at 04:21:34PM -0700, Jakub Kicinski wrote: > On Fri, 24 Jul 2020 23:03:26 +0200 Guillaume Nault wrote: > > In multiproto mode, bareudp_xmit() accepts sending multicast MPLS and > > IPv6 packets regardless of the bareudp ethertype. In practice, this > >

[PATCH net] bareudp: forbid mixing IP and MPLS in multiproto mode

2020-07-24 Thread Guillaume Nault
enables * IPv6 for IPv4 tunnels, * or multicast MPLS for unicast MPLS tunnels. To improve clarity, the protocol validation is moved to its own function, where each logical test has its own condition. Fixes: 4b5f67232d95 ("net: Special handling for IP & MPLS.") Signed-off-by: G

[PATCH net] Documentation: bareudp: update iproute2 sample commands

2020-07-20 Thread Guillaume Nault
bareudp.rst was written before iproute2 gained support for this new type of tunnel. Therefore, the sample command lines didn't match the final iproute2 implementation. Signed-off-by: Guillaume Nault --- Documentation/networking/bareudp.rst | 19 +-- 1 file changed, 13 inser

  1   2   3   4   5   6   >