b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
From: Matthias Schiffer <mschiffer@universe-factory.net>
To: Sven Eckelmann <sven@narfation.org>, b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] [PATCH maint 3/3] batman-adv: do not modify batadv packet header before pulling it
Date: Sun, 18 Mar 2018 11:45:07 +0100	[thread overview]
Message-ID: <032705b9-b1b5-0656-cd56-8cb1791aff53@universe-factory.net> (raw)
In-Reply-To: <2516855.xl4cPWQeEn@sven-edge>


[-- Attachment #1.1: Type: text/plain, Size: 1383 bytes --]

On 03/18/2018 09:15 AM, Sven Eckelmann wrote:
> On Freitag, 16. März 2018 11:29:11 CET Matthias Schiffer wrote:
>> batadv_check_unicast_ttvn() may modify the batadv header, leading to
>> checksum errors in the following processing of the packet.
>>
>> Rather than fixing up the checksum, simply pull the batadv header before
>> modifying it (and push it back in case the packet is rerouted).
>>
>> Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
>> ---
> 
> This patch is so invasive that it breaks the batadv_dbg_arp check which you've 
> just fixed a patch before.
> 
> Kind regards,
> 	Sven
> 

Yes, it's the main reason I improved the check; I should have mentioned
that in the commit message. As mentioned on IRC, batadv_dbg_arp will still
print what information is added to the DAT cache, but it can't tell which
batadv packet type the ARP packet was encapsulated in anymore (this
information is still available through `batctl td`).

In my further cleanup patches, I plan to

* make the broadcast case match as well (pull before calling snooping
functions)
* move snooping calls to batadv_interface_rx
* remove header size argument from incoming snooping functions (will always
be 0)
* remove the now dead code from batadv_dbg_arp

This will improve symmetry between the incoming and outgoing snooping paths.

Matthias


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-03-18 10:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-16 10:29 [B.A.T.M.A.N.] [PATCH maint 1/3] batman-adv: update data pointers after skb_cow() Matthias Schiffer
2018-03-16 10:29 ` [B.A.T.M.A.N.] [PATCH maint 2/3] batman-adv: fix header size check in batadv_dbg_arp() Matthias Schiffer
2018-03-16 11:31   ` Sven Eckelmann
2018-03-16 15:05     ` Matthias Schiffer
2018-03-16 10:29 ` [B.A.T.M.A.N.] [PATCH maint 3/3] batman-adv: do not modify batadv packet header before pulling it Matthias Schiffer
2018-03-16 11:31   ` Sven Eckelmann
2018-03-16 20:24   ` Sven Eckelmann
2018-03-16 21:25     ` Sven Eckelmann
2018-03-18  8:15   ` Sven Eckelmann
2018-03-18 10:45     ` Matthias Schiffer [this message]
2018-03-16 11:31 ` [B.A.T.M.A.N.] [PATCH maint 1/3] batman-adv: update data pointers after skb_cow() Sven Eckelmann
2018-03-18  8:31 ` 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=032705b9-b1b5-0656-cd56-8cb1791aff53@universe-factory.net \
    --to=mschiffer@universe-factory.net \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=sven@narfation.org \
    /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).