* [B.A.T.M.A.N.] [PATCH maint] batman-adv: make DAT drop ARP requests targeting local clients
@ 2013-05-09 7:35 Antonio Quartulli
2013-05-09 7:57 ` Marek Lindner
0 siblings, 1 reply; 2+ messages in thread
From: Antonio Quartulli @ 2013-05-09 7:35 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Antonio Quartulli
In the outgoing ARP request snooping routine in DAT, ARP
Request sent by local clients which are supposed to be
replied by other local clients can be silently dropped.
The destination host will reply by itself through the LAN
and therefore there is no need to involve DAT.
Reported-by: Carlos Quijano <carlos@crqgestion.es>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Tested-by: Carlos Quijano <carlos@crqgestion.es>
---
distributed-arp-table.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/distributed-arp-table.c b/distributed-arp-table.c
index 8e15d96..2399920 100644
--- a/distributed-arp-table.c
+++ b/distributed-arp-table.c
@@ -837,6 +837,19 @@ bool batadv_dat_snoop_outgoing_arp_request(struct batadv_priv *bat_priv,
dat_entry = batadv_dat_entry_hash_find(bat_priv, ip_dst);
if (dat_entry) {
+ /* If the ARP request is destined for a local client the local
+ * client will answer itself. DAT would only generate a
+ * duplicate packet.
+ *
+ * Moreover, if the soft-interface is enslaved into a bridge, an
+ * additional DAT answer may trigger kernel warnings about
+ * a packet coming from the wrong port.
+ */
+ if (batadv_is_my_client(bat_priv, dat_entry->mac_addr)) {
+ ret = true;
+ goto out;
+ }
+
skb_new = arp_create(ARPOP_REPLY, ETH_P_ARP, ip_src,
bat_priv->soft_iface, ip_dst, hw_src,
dat_entry->mac_addr, hw_src);
--
1.8.1.5
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [B.A.T.M.A.N.] [PATCH maint] batman-adv: make DAT drop ARP requests targeting local clients
2013-05-09 7:35 [B.A.T.M.A.N.] [PATCH maint] batman-adv: make DAT drop ARP requests targeting local clients Antonio Quartulli
@ 2013-05-09 7:57 ` Marek Lindner
0 siblings, 0 replies; 2+ messages in thread
From: Marek Lindner @ 2013-05-09 7:57 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Antonio Quartulli
On Thursday, May 09, 2013 15:35:45 Antonio Quartulli wrote:
> In the outgoing ARP request snooping routine in DAT, ARP
> Request sent by local clients which are supposed to be
> replied by other local clients can be silently dropped.
>
> The destination host will reply by itself through the LAN
> and therefore there is no need to involve DAT.
>
> Reported-by: Carlos Quijano <carlos@crqgestion.es>
> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
> Tested-by: Carlos Quijano <carlos@crqgestion.es>
> ---
> distributed-arp-table.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
Applied in revision d6bd8b3.
Thanks,
Marek
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-09 7:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-09 7:35 [B.A.T.M.A.N.] [PATCH maint] batman-adv: make DAT drop ARP requests targeting local clients Antonio Quartulli
2013-05-09 7:57 ` Marek Lindner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox