From: Andreas Steinmetz <ast@domdv.de>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: Network Development <netdev@vger.kernel.org>,
Sabrina Dubroca <sd@queasysnail.net>
Subject: Re: [PATCH net 2/2] macsec: fix checksumming after decryption
Date: Tue, 02 Jul 2019 21:47:21 +0200 [thread overview]
Message-ID: <a7c67e7e22103fc7cf02c520a8b42d9aa525700f.camel@domdv.de> (raw)
In-Reply-To: <CAF=yD-LBRZjns1x9_UrhBYZGX8JNeM+r-cYJV=eyYKDTSG8rBQ@mail.gmail.com>
On Tue, 2019-07-02 at 10:35 -0400, Willem de Bruijn wrote:
> On Tue, Jul 2, 2019 at 12:25 AM Andreas Steinmetz <ast@domdv.de> wrote:
> > On Sun, 2019-06-30 at 21:47 -0400, Willem de Bruijn wrote:
> > > On Sun, Jun 30, 2019 at 4:48 PM Andreas Steinmetz <ast@domdv.de>
> > > wrote:
> > > > Fix checksumming after decryption.
> > > >
> > > > Signed-off-by: Andreas Steinmetz <ast@domdv.de>
> > > >
> > > > --- a/drivers/net/macsec.c 2019-06-30 22:14:10.250285314 +0200
> > > > +++ b/drivers/net/macsec.c 2019-06-30 22:15:11.931230417 +0200
> > > > @@ -869,6 +869,7 @@
> > > >
> > > > static void macsec_finalize_skb(struct sk_buff *skb, u8 icv_len,
> > > > u8 hdr_len)
> > > > {
> > > > + skb->ip_summed = CHECKSUM_NONE;
> > > > memmove(skb->data + hdr_len, skb->data, 2 * ETH_ALEN);
> > > > skb_pull(skb, hdr_len);
> > > > pskb_trim_unique(skb, skb->len - icv_len);
> > >
> > > Does this belong in macset_reset_skb?
> >
> > Putting this in macsec_reset_skb would then miss out the "nosci:" part
> > of the RX path in macsec_handle_frame().
>
> It is called on each nskb before calling netif_rx.
>
> It indeed is not called when returning RX_HANDLER_PASS, but that is correct?
This is correct. Packets passed on with RX_HANDLER_PASS are either not for this
driver or the special case of being destined for a KaY and in this case being
the MACsec ethernet protocol and thus not IP, so no checksumming.
next prev parent reply other threads:[~2019-07-02 19:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-30 20:46 [PATCH net 2/2] macsec: fix checksumming after decryption Andreas Steinmetz
2019-07-01 1:47 ` Willem de Bruijn
2019-07-02 4:24 ` Andreas Steinmetz
2019-07-02 14:35 ` Willem de Bruijn
2019-07-02 19:47 ` Andreas Steinmetz [this message]
2019-07-03 1:47 ` Willem de Bruijn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a7c67e7e22103fc7cf02c520a8b42d9aa525700f.camel@domdv.de \
--to=ast@domdv.de \
--cc=netdev@vger.kernel.org \
--cc=sd@queasysnail.net \
--cc=willemdebruijn.kernel@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).