From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Marek Lindner <lindner_marek@yahoo.de>
Subject: Re: [B.A.T.M.A.N.] [PATCHv2 2/7] batman-adv: speed up dat by snooping received ip traffic
Date: Fri, 26 Feb 2016 17:00:49 +0100 [thread overview]
Message-ID: <2502138.exi8rd1dt9@bentobox> (raw)
In-Reply-To: <1456492697-29708-1-git-send-email-apape@phoenixcontact.com>
[-- Attachment #1: Type: text/plain, Size: 1575 bytes --]
On Friday 26 February 2016 14:18:17 Andreas Pape wrote:
> Speeding up dat address lookup is achieved by snooping all incoming ip
> traffic. This especially increases the propability in bla setups that
> a gateway into a common backbone network already has a fitting dat entry
> to answer incoming ARP requests directly coming from the backbone
> network thus further reducing ARP traffic in the mesh.
>
> Signed-off-by: Andreas Pape <apape@phoenixcontact.com>
> ---
[...]
> switch (ntohs(ethhdr->h_proto)) {
> + case ETH_P_IP:
> + iphdr = (struct iphdr *)(skb->data + ETH_HLEN);
> + /* snoop incoming traffic for dat update using the source mac
> + * and source ip to speed up dat.
> + */
> + batadv_dat_entry_check(bat_priv, iphdr->saddr,
> + ethhdr->h_source, vid);
> + break;
> case ETH_P_8021Q:
> vhdr = (struct vlan_ethhdr *)skb->data;
>
> - if (vhdr->h_vlan_encapsulated_proto != ethertype)
> + if (vhdr->h_vlan_encapsulated_proto != ethertype) {
> + /* snoop incoming traffic for dat update also for vlan
> + * tagged frames.
> + */
> + if (vhdr->h_vlan_encapsulated_proto == ETH_P_IP) {
> + iphdr = (struct iphdr *)(vhdr +
> + sizeof(struct vlan_ethhdr));
> + batadv_dat_entry_check(bat_priv, iphdr->saddr,
> + vhdr->h_source, vid);
> + }
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
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-02-26 16:00 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 [this message]
2016-03-01 15:52 ` [B.A.T.M.A.N.] Antwort: " Andreas Pape
2016-03-01 16:02 ` Sven Eckelmann
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=2502138.exi8rd1dt9@bentobox \
--to=sven@narfation.org \
--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