public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
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.] [PATCHv3 4/6] batman-adv: drop unicast packets from other backbone gw
Date: Fri, 06 May 2016 12:43:25 +0200	[thread overview]
Message-ID: <5062590.3XvjaM2H77@sven-edge> (raw)
In-Reply-To: <1462525107-19750-5-git-send-email-apape@phoenixcontact.com>

[-- Attachment #1: Type: text/plain, Size: 1491 bytes --]

On Friday 06 May 2016 10:58:25 Andreas Pape wrote:
[...]
> +		/* 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);

I think we already told this before: This is overwriting the previous
orig_node without freeing the reference. It most likely has also other weird
consequences. Here is the relevant code to better understand what it
overwrites:

		if (is4addr) {
			subtype = unicast_4addr_packet->subtype;
			batadv_dat_inc_counter(bat_priv, subtype);

			/* Only payload data should be considered for speedy
			 * join. For example, DAT also uses unicast 4addr
			 * types, but those packets should not be considered
			 * for speedy join, since the clients do not actually
			 * reside at the sending originator.
			 */
			if (subtype == BATADV_P_DATA) {
				orig_addr = unicast_4addr_packet->src;
				orig_node = batadv_orig_hash_find(bat_priv,
								  orig_addr);
			}
		}

		/* 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 (orig_node &&
		    batadv_bla_is_backbone_gw(skb, orig_node, hdr_size)) {
			batadv_dbg(BATADV_DBG_BLA, bat_priv,
				   "recv_unicast_packet(): Dropped unicast pkt received from another backbone gw %pM.\n",
				   orig_addr);
			batadv_orig_node_put(orig_node);
			return NET_RX_DROP;
		}

Kind regards,
	Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-05-06 10:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-06  8:58 [B.A.T.M.A.N.] [PATCHv3 0/6] batman-adv: Optimizations for setups running dat and bla Andreas Pape
2016-05-06  8:58 ` [B.A.T.M.A.N.] [PATCHv3 1/6] batman-adv: prevent multiple ARP replies sent by gateways if dat enbled Andreas Pape
2016-05-06  8:58 ` [B.A.T.M.A.N.] [PATCHv3 2/6] batman-adv: speed up dat by snooping received ip traffic Andreas Pape
2016-05-06  9:53   ` Sven Eckelmann
2016-05-06 10:03   ` Sven Eckelmann
2016-05-19 19:33   ` Linus Lüssing
2016-05-19 22:22     ` Linus Lüssing
2016-05-19 19:45   ` Linus Lüssing
2016-05-19 20:30     ` Linus Lüssing
2016-05-19 22:48       ` Linus Lüssing
2016-05-19 23:11       ` Linus Lüssing
2016-05-20 11:32     ` [B.A.T.M.A.N.] Antwort: " Andreas Pape
2016-05-20 12:56       ` Antonio Quartulli
2016-05-20 13:51   ` [B.A.T.M.A.N.] " Antonio Quartulli
2016-06-13 13:45     ` Andreas Pape
2016-06-23 20:34       ` Linus Lüssing
2016-05-06  8:58 ` [B.A.T.M.A.N.] [PATCHv3 3/6] batman-adv: prevent duplication of ARP replies when DAT is used Andreas Pape
2016-05-06  8:58 ` [B.A.T.M.A.N.] [PATCHv3 4/6] batman-adv: drop unicast packets from other backbone gw Andreas Pape
2016-05-06 10:43   ` Sven Eckelmann [this message]
2016-05-06  8:58 ` [B.A.T.M.A.N.] [PATCHv3 5/6] batman-adv: changed debug messages for easier bla debugging Andreas Pape
2016-05-06  8:58 ` [B.A.T.M.A.N.] [PATCHv3 6/6] batman-adv: handle race condition for claims between gateways Andreas Pape

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=5062590.3XvjaM2H77@sven-edge \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox