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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdbVs9H8CPYV9Fgwje40qqS=wxXqVkDc=Du=c82eqeKCAw@mail.gmail.com>
Date:   Mon, 30 Aug 2021 23:56:22 +0200
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Vladimir Oltean <olteanv@...il.com>
Cc:     Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        netdev <netdev@...r.kernel.org>,
        DENG Qingfang <dqfext@...il.com>,
        Mauri Sandberg <sandberg@...lfence.com>
Subject: Re: [PATCH net] net: dsa: tag_rtl4_a: Fix egress tags

On Mon, Aug 30, 2021 at 9:29 AM Vladimir Oltean <olteanv@...il.com> wrote:
> On Sun, Aug 29, 2021 at 01:56:19AM +0200, Linus Walleij wrote:
> > I noticed that only port 0 worked on the RTL8366RB since we
> > started to use custom tags.
> >
> > It turns out that the format of egress custom tags is actually
> > different from ingress custom tags. While the lower bits just
> > contain the port number in ingress tags, egress tags need to
> > indicate destination port by setting the bit for the
> > corresponding port.
> >
> > It was working on port 0 because port 0 added 0x00 as port
> > number in the lower bits, and if you do this the packet gets
> > broadcasted to all ports, including the intended port.
> > Ooops.
>
> Does it get broadcast, or forwarded by MAC DA/VLAN ID as you'd expect
> for a regular data packet?

It gets broadcast :/

> > -     out = (RTL4_A_PROTOCOL_RTL8366RB << 12) | (2 << 8);
>
> What was 2 << 8? This patch changes that part.

It was a bit set in the ingress packets, we don't really know
what egress tag bits there are so first I just copied this
and since it turns out the bits in the lower order are not
correct I dropped this too and it works fine.

Do you want me to clarify in the commit message and
resend?

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ