From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] [PATCHv2 4/7] batman-adv: drop unicast packets from other backbone gw
Date: Fri, 26 Feb 2016 17:07:20 +0100 [thread overview]
Message-ID: <6115028.oRNdbbxa5J@bentobox> (raw)
In-Reply-To: <1456492734-29785-1-git-send-email-apape@phoenixcontact.com>
[-- Attachment #1: Type: text/plain, Size: 813 bytes --]
On Friday 26 February 2016 14:18:54 Andreas Pape wrote:
> @@ -896,6 +898,19 @@ int batadv_recv_unicast_packet(struct sk_buff *skb,
> }
> }
>
> + /* If this is a unicast packet from another backgone gw,
> + * drop it.
> + */
> + orig_addr = ethhdr->h_source;
> + orig_node = batadv_orig_hash_find(bat_priv, orig_addr);
> + if (batadv_bla_is_backbone_gw(skb, orig_node, hdr_size)) {
> + batadv_dbg(BATADV_DBG_BLA, bat_priv,
> + "Dropped unicast pkt received from another backbone gw %pM.\n",
> + orig_addr);
> +
> + return NET_RX_DROP;
> + }
> +
The orig_node was previously assigned via batadv_orig_hash_find. But this
batadv_orig_hash_find already increased the reference pointer for orig_node.
So we would now have an imbalance at the end of the function.
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:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-26 13:18 [B.A.T.M.A.N.] [PATCHv2 4/7] batman-adv: drop unicast packets from other backbone gw Andreas Pape
2016-02-26 16:07 ` Sven Eckelmann [this message]
2016-03-10 15:03 ` Simon Wunderlich
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=6115028.oRNdbbxa5J@bentobox \
--to=sven@narfation.org \
--cc=b.a.t.m.a.n@lists.open-mesh.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.