All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antonio Quartulli <ordex@autistici.org>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] [PATCH 5/6] batman-adv: Distributed ARP Table - add snooping functions for ARP messages
Date: Tue, 1 Nov 2011 10:16:05 +0100	[thread overview]
Message-ID: <20111101091604.GD20215@ritirata.org> (raw)
In-Reply-To: <20111031001221.GF10726@pandem0nium>

On Mon, Oct 31, 2011 at 01:12:21AM +0100, Simon Wunderlich wrote:
> This patch fails checkpatch.pl --strict.
> 
> On Sun, Oct 30, 2011 at 09:56:01AM +0100, Antonio Quartulli wrote:
> > +bool arp_snoop_outgoing_request(struct bat_priv *bat_priv, struct sk_buff *skb)
> > [...]
> > +	arp_neigh_update(bat_priv, ip_src, hw_src);
> > +
> > +	n = neigh_lookup(&arp_tbl, &ip_dst, primary_if->soft_iface);
> > +	/* check if it is a valid neigh entry */
> > +	if (n && (n->nud_state & NUD_CONNECTED)) {
> > +		skb_new = arp_create(ARPOP_REPLY, ETH_P_ARP, ip_src,
> > +				     primary_if->soft_iface, ip_dst, hw_src, n->ha,
> > +				     hw_src);
> > +		unicast_send_skb(skb_new, bat_priv);
> > +		bat_dbg(DBG_ARP, bat_priv, "ARP request replied locally\n");
> 
> This function is hooked up in the tx patch, why do we send the unicast reply to
> the mesh? Shouldn't it be sent on the soft interface instead? I don't really understand this one ...

You are right. As we have already discussed on IRC, I should use netif_rx()
directly here (to deliver the packet to the soft_iface).

> >  	if (is_my_mac(unicast_packet->dest)) {
> >  		interface_rx(recv_if->soft_iface, skb, recv_if, hdr_size);
> > +
> >  		return NET_RX_SUCCESS;
> >  	}
> >  
> 
> This added newline is useless.

Yeah :D

Thanks,

-- 
Antonio Quartulli

..each of us alone is worth nothing..
Ernesto "Che" Guevara

  reply	other threads:[~2011-11-01  9:16 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-30  8:55 [B.A.T.M.A.N.] [PATCH 0/6] DAT: Distributed ARP Table Antonio Quartulli
2011-10-30  8:55 ` [B.A.T.M.A.N.] [PATCH 1/6] batman-adv: implement an helper function to forge unicast packets Antonio Quartulli
2011-10-31  0:05   ` Simon Wunderlich
2011-11-01  9:12     ` Antonio Quartulli
2011-10-30  8:55 ` [B.A.T.M.A.N.] [PATCH 2/6] batman-adv: add a new log level for DAT-ARP debugging Antonio Quartulli
2011-10-30  8:55 ` [B.A.T.M.A.N.] [PATCH 3/6] batman-adv: Distributed ARP Table - create the DHT helper functions Antonio Quartulli
2011-10-31  0:08   ` Simon Wunderlich
2011-10-30  8:56 ` [B.A.T.M.A.N.] [PATCH 4/6] batman-adv: Distributed ARP Table - add ARP parsing functions Antonio Quartulli
2011-10-31  0:10   ` Simon Wunderlich
2011-11-01  9:14     ` Antonio Quartulli
2011-10-30  8:56 ` [B.A.T.M.A.N.] [PATCH 5/6] batman-adv: Distributed ARP Table - add snooping functions for ARP messages Antonio Quartulli
2011-10-30  9:18   ` Sven Eckelmann
2011-10-30  9:29     ` Antonio Quartulli
2011-10-31  0:12   ` Simon Wunderlich
2011-11-01  9:16     ` Antonio Quartulli [this message]
2011-10-30  8:56 ` [B.A.T.M.A.N.] [PATCH 6/6] batman-adv: Distributed ARP Table - increase default soft_iface ARP table timeout Antonio Quartulli
2011-10-31  0:03 ` [B.A.T.M.A.N.] [PATCH 0/6] DAT: Distributed ARP Table Simon Wunderlich
2011-10-31  9:26   ` Martin Hundebøll
2011-10-31  9:42     ` Marek Lindner
2011-10-31  9:48       ` Simon Wunderlich
2011-11-01  9:16         ` Antonio Quartulli
2011-10-31 18:53 ` Gus Wirth
2011-10-31 23:11   ` Simon Wunderlich
2011-11-01  9:10   ` Antonio Quartulli

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=20111101091604.GD20215@ritirata.org \
    --to=ordex@autistici.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.