[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK+XE=ngd8E5kY1zXiH0dORXy8GYCpF8mAD3UKzh2DzMq6RQ1A@mail.gmail.com>
Date: Fri, 11 Oct 2019 10:26:13 +0100
From: John Hurley <john.hurley@...ronome.com>
To: Simon Horman <simon.horman@...ronome.com>
Cc: Davide Caratti <dcaratti@...hat.com>,
"David S. Miller" <davem@...emloft.net>,
Cong Wang <xiyou.wangcong@...il.com>,
Lorenzo Bianconi <lorenzo@...nel.org>,
Linux Netdev List <netdev@...r.kernel.org>
Subject: Re: [PATCH net 2/2] net/sched: fix corrupted L2 header with MPLS
'push' and 'pop' actions
On Fri, Oct 11, 2019 at 8:34 AM Simon Horman <simon.horman@...ronome.com> wrote:
>
> On Thu, Oct 10, 2019 at 08:43:53PM +0200, Davide Caratti wrote:
> > the following script:
> >
> > # tc qdisc add dev eth0 clsact
> > # tc filter add dev eth0 egress protocol ip matchall \
> > > action mpls push protocol mpls_uc label 0x355aa bos 1
> >
> > causes corruption of all IP packets transmitted by eth0. On TC egress, we
> > can't rely on the value of skb->mac_len, because it's 0 and a MPLS 'push'
> > operation will result in an overwrite of the first 4 octets in the packet
> > L2 header (e.g. the Destination Address if eth0 is an Ethernet); the same
> > error pattern is present also in the MPLS 'pop' operation. Fix this error
> > in act_mpls data plane, computing 'mac_len' as the difference between the
> > network header and the mac header (when not at TC ingress), and use it in
> > MPLS 'push'/'pop' core functions.
> >
> > CC: Lorenzo Bianconi <lorenzo@...nel.org>
> > Fixes: 2a2ea50870ba ("net: sched: add mpls manipulation actions to TC")
> > Signed-off-by: Davide Caratti <dcaratti@...hat.com>
>
> Reviewed-by: Simon Horman <simon.horman@...ronome.com>
>
Powered by blists - more mailing lists