From: "Linus Lüssing" <linus.luessing@c0d3.blue>
To: The list for a Better Approach To Mobile Ad-hoc Networking
<b.a.t.m.a.n@lists.open-mesh.org>
Cc: Daniel Ehlers <sargon@toppoint.de>
Subject: Re: [B.A.T.M.A.N.] [PATCH] batman-adv: allow snooping gratuitous ARP Replies
Date: Fri, 15 Feb 2019 18:45:44 +0100 [thread overview]
Message-ID: <20190215174544.GC1472@otheros> (raw)
In-Reply-To: <1b6712e2-92a2-06c1-6545-47dedea57065@unstable.cc>
Hi Antonio,
On Fri, Feb 15, 2019 at 04:36:08PM +1000, Antonio Quartulli wrote:
> Is there any situation where an OS would reject a gracious ARP? Or are
> they always blindly accepted and processed accordingly?
> If they have any protection against any misuse, I guess batman-adv
> should try to do the same.
I have played some more with gratuitous ARPs and this is what I
could find out:
sysfs, /proc/sys/net/ipv4/conf/<iface>/*arp*:
drop_gratuitous_arp = 0 (default)
arp_accept = 0 (default)
-> no new address added via gratuitous ARP
cmp.: https://elixir.bootlin.com/linux/v4.20.10/source/net/ipv4/arp.c#L872
-> but existing entries are updated
drop_gratuitous_arp = 1:
-> grat. ARP ignored completely
cmp.: https://elixir.bootlin.com/linux/v4.20.10/source/net/ipv4/arp.c#L776
drop_gratuitous_arp = 0 (default)
arp_accept = 1
-> grat. ARP Reply updates existing entries and creates new ones
Also, I noticed that using a zero MAC address for the ethernet header
destination did not work. Even if setting promisc-mode on the veth
in its extra network namespace interface, the neighbor table would
not be populated. Using the broadcast MAC for the ethernet header
(and arp_accept = 1) worked, though. But would defeat the idea
of using gratuitous ARP to populate the DHT without flooded
messages. I wasn't able to spot where the ethernet destination is
checked yet.
Regards, Linus
prev parent reply other threads:[~2019-02-15 17:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-14 15:51 [B.A.T.M.A.N.] [PATCH] batman-adv: allow snooping gratuitous ARP Replies Linus Lüssing
2019-02-14 16:16 ` Marek Lindner
2019-02-14 17:49 ` Linus Lüssing
2019-02-15 6:36 ` Antonio Quartulli
2019-02-15 17:45 ` Linus Lüssing [this message]
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=20190215174544.GC1472@otheros \
--to=linus.luessing@c0d3.blue \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=sargon@toppoint.de \
/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