From: Sven Eckelmann <sven@narfation.org>
To: Andreas Pape <APape@phoenixcontact.com>
Cc: b.a.t.m.a.n@lists.open-mesh.org, Marek Lindner <lindner_marek@yahoo.de>
Subject: Re: [B.A.T.M.A.N.] Antwort: Re: [PATCHv2 2/7] batman-adv: speed up dat by snooping received ip traffic
Date: Tue, 01 Mar 2016 17:02:57 +0100 [thread overview]
Message-ID: <1694240.jq4xBCUVhK@bentobox> (raw)
In-Reply-To: <OF3D785311.F814DD90-ONC1257F69.0056D58F-C1257F69.00573B0A@phoenixcontact.com>
[-- Attachment #1: Type: text/plain, Size: 1034 bytes --]
On Tuesday 01 March 2016 16:52:47 Andreas Pape wrote:
[...]
> > Where is the code to check that there is enough data for the iphdr
> > (pskb_may_pull)? Same question goes to Marek for his initial change in
> > 48628bb9419f ("batman-adv: softif bridge loop avoidance") that
> introduced the
> > vhdr->vlan_ethhdr check
> >
>
> I will leave this to the result of the discussion in [1] which you started
> and will not handle this in the next version of my patchset. Correct?
You definitely have to check the size for the IP header. The vlan ethernet
header check is a different playground and mostly unrelated to your problem.
Btw. you can skip this check when you just use skb_header_pointer to access
the IPv4 header. It will return NULL when the data cannot be accessed. It
will also take care of copying data out of the fragments in your temporary
"buffer" when the bytes are not in the main buffer of the skb. You just have
to prepare a large enough buffer on the stack and only use the returned
pointer.
Kind regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-03-01 16:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-26 13:18 [B.A.T.M.A.N.] [PATCHv2 2/7] batman-adv: speed up dat by snooping received ip traffic Andreas Pape
2016-02-26 16:00 ` Sven Eckelmann
2016-03-01 15:52 ` [B.A.T.M.A.N.] Antwort: " Andreas Pape
2016-03-01 16:02 ` Sven Eckelmann [this message]
2016-03-02 7:17 ` [B.A.T.M.A.N.] Antwort: " Andreas Pape
2016-03-02 10:23 ` Sven Eckelmann
2016-03-02 11:57 ` [B.A.T.M.A.N.] Antwort: " Andreas Pape
2016-02-26 21:17 ` [B.A.T.M.A.N.] " Sven Eckelmann
2016-02-26 21:24 ` Sven Eckelmann
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=1694240.jq4xBCUVhK@bentobox \
--to=sven@narfation.org \
--cc=APape@phoenixcontact.com \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=lindner_marek@yahoo.de \
/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