public inbox for b.a.t.m.a.n@lists.open-mesh.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.] [PATCHv4 5/7] batman-adv: Distributed ARP Table - add snooping functions for ARP messages
Date: Sat, 26 Nov 2011 10:09:17 +0100	[thread overview]
Message-ID: <20111126090916.GA17206@ritirata.org> (raw)
In-Reply-To: <20111125210911.GA23936@lunn.ch>

On Fri, Nov 25, 2011 at 10:09:11 +0100, Andrew Lunn wrote:
> It might make sense to drop such messages, since they are
> invalid. However, nothing obvious comes to mind which would go wrong
> if you did cache them, other than somebody could DOS you by sending
> lots of ARP entries for multicast addresses.

Yes, I was thinking the same. A DOS is the major threat we could face without
this validity check. However, since we use the kernel function to add such
entries into the table it might be that the kernel already does this checks for
us. I'll look towards it

> 
> > > In a similar direction, how does duplicate address detection work?
> > > i.e. i ARP my own address to see if somebody else is using it? 
>  
> > Don't think so. Actually I/we didn't think too much about this kind of
> > cases. Well, a duplicate entry is simply overwritten: I mean, if we
> > already have the entry [IPa,MACa] in the table, any other ARP reply containing
> > [IPa,MACb] will update the older one and MACa will be lost.
> 
> The basic idea with duplicate address detection is to send out an ARP
> request for your own address. If you get an answer, you know somebody
> is using the address. I think Windoz then shuts the interface down, or
> at least gives a warning. So in the case of duplicate address
> detection, you want to fallback to broadcasting the ARP request and
> see if anybody answers. You can detect if a node is performing
> aduplicate detection, if the ARP requests source MAC address is the
> same as the answer in the cache. If so, fall back to broadcasting
> rather than answering from the cache.
> 
> Looking at RFC 3927 might also be interesting, since it uses ARP
> messages in a different way.
> 
> Also, i know some dhcp servers try to ping an IP address before giving
> it out, just to be sure it is not in use. Answering the ARP request
> from what could be an out of date cache entry doesn't i think causes a
> problem, so long as the ping that follows it does not get
> answered. But maybe some DHCP servers just perform an ARP request?
> 

Mh...but I think this behaviour is somehow left untouched. The mechanisms you
are describing are higher-level matters. Since we only limit to fill tables and
get answer, all the other mechanisms/procedures which use the tables should
still continue to work as they are. If a windows client will issue an ARP req to
see is someone else is using the same IP, DAT will simply answer as a normal
table would do. Therefore I think that this kind of worries are not matter of
DAT.

I hope I clearly explained my thought.

Then we could always add more feature in order to "facilitate" such mechanisms,
but up to now I think that DAT simply provides the same behaviour a normal table
would do.

Thank you for your comments!
Cheers,

-- 
Antonio Quartulli

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

  reply	other threads:[~2011-11-26  9:09 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-24 22:21 [B.A.T.M.A.N.] [PATCHv4 0/7] DAT: Distributed ARP Table Antonio Quartulli
2011-11-24 22:21 ` [B.A.T.M.A.N.] [PATCHv4 1/7] batman-adv: implement an helper function to forge unicast packets Antonio Quartulli
2011-11-25  8:18   ` Andrew Lunn
2011-11-25  8:54     ` Sven Eckelmann
2011-11-24 22:21 ` [B.A.T.M.A.N.] [PATCHv4 2/7] batman-adv: add a new log level for DAT-ARP debugging Antonio Quartulli
2011-11-24 22:21 ` [B.A.T.M.A.N.] [PATCHv4 3/7] batman-adv: Distributed ARP Table - create the DHT helper functions Antonio Quartulli
2011-11-24 22:21 ` [B.A.T.M.A.N.] [PATCHv4 4/7] batman-adv: Distributed ARP Table - add ARP parsing functions Antonio Quartulli
2011-11-25  8:31   ` Andrew Lunn
2011-11-25 11:04     ` Antonio Quartulli
2011-11-24 22:21 ` [B.A.T.M.A.N.] [PATCHv4 5/7] batman-adv: Distributed ARP Table - add snooping functions for ARP messages Antonio Quartulli
2011-11-25  1:18   ` Marek Lindner
2011-11-25  8:45   ` Andrew Lunn
2011-11-25 11:17     ` Antonio Quartulli
2011-11-25 21:09       ` Andrew Lunn
2011-11-26  9:09         ` Antonio Quartulli [this message]
2011-11-24 22:21 ` [B.A.T.M.A.N.] [PATCHv4 6/7] batman-adv: Distributed ARP Table - increase default soft_iface ARP table timeout Antonio Quartulli
2011-11-24 22:21 ` [B.A.T.M.A.N.] [PATCHv4 7/7] batman-adv: add Distributed ARP Table compile option Antonio Quartulli
2011-11-25  1:19   ` Marek Lindner

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=20111126090916.GA17206@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox