b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
From: Antonio Quartulli <a@unstable.cc>
To: Sven Eckelmann <sven@narfation.org>
Cc: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.org>,
	Andre Kasper <Andre.Kasper@gmx.de>,
	linus.luessing@c0d3.blue
Subject: Re: [B.A.T.M.A.N.] [PATCH] batctl: Validate translated mac addresses
Date: Sat, 14 Apr 2018 16:11:28 +0800	[thread overview]
Message-ID: <af29c3fe-d25e-51d2-7ca1-47738f25ab7a@unstable.cc> (raw)
In-Reply-To: <1658833.3ZLkxubxK8@sven-edge>


[-- Attachment #1.1: Type: text/plain, Size: 2383 bytes --]



On 14/04/18 15:10, Sven Eckelmann wrote:
> On Samstag, 14. April 2018 04:34:42 CEST Antonio Quartulli wrote:
>>
>> On 14/04/18 02:16, Sven Eckelmann wrote:
> [...]
>> We already handle the case of multiple originators handling the same MAC
>> address, no? In that case I think we pick the "best" originator.
> 
> Yes, but this doesn't make a lot of sense for multicast and zero mac 
> addresses. The translate layer of batctl is usually used to ping/traceroute to 
> some originator. But multicast and zero mac addresses don't represent a 
> "client" which can be used to identify some originator. So it doesn't seem to 
> make sense to allow them here.

Right.

> 
> Or even without the ping/traceroute stuff, the concept of calling `batctl 
> translate` should give you an answer which you can understand. So it should 
> tell you that batman-adv is very likely to transmit a unicast packet with this 
> destination address to this originator. But this cannot work for multicast 
> destination addresses because multiple answer should be given here - which is 
> out of scope for this command. Which reminds me that I should propose a second 
> patch which checks whether the input for translate_mac is "valid" before 
> trying to translate it.
> 
>> This case sounds more like a validity check because "a zero MAC should
>> not be in the translation table", or am I wrong?
> 
> Partially, yes. I personally don't care (at the moment) whether there is a 
> zero mac address in the translation table. The current translation table code 
> (batadv_tt_local_add) doesn't check whether there is a zero mac address 
> (is_zero_ether_addr). But Linus had some ideas when zero mac addresses can be 
> useful - maybe he tell us whether it makes sense/problems to have them in the 
> translation table.

Yeah, I agree that zero "may appear" in the table and therefore we have
to "check" what we are getting back and whether it makes sense for us in
this context.


Actually my comment was not about changing your approach, but just
making it more explicit in the commit and in the error message.

An error message like like "returned invalid all-zero mac address" (or
"multicast address") might help to distinguish similar "ambiguities" in
the future. No?



Cheers,



> 
> Kind regards,
> 	Sven
> 

-- 
Antonio Quartulli


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-04-14  8:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-13 18:16 [B.A.T.M.A.N.] [PATCH] batctl: Validate translated mac addresses Sven Eckelmann
2018-04-14  2:34 ` Antonio Quartulli
2018-04-14  7:10   ` Sven Eckelmann
2018-04-14  8:11     ` Antonio Quartulli [this message]
2018-04-14  9:20       ` Sven Eckelmann
2018-04-14  9:35         ` Antonio Quartulli
2018-04-14  9:36 ` Antonio Quartulli
2018-04-17  8:35 ` Sven Eckelmann

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=af29c3fe-d25e-51d2-7ca1-47738f25ab7a@unstable.cc \
    --to=a@unstable.cc \
    --cc=Andre.Kasper@gmx.de \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=linus.luessing@c0d3.blue \
    --cc=sven@narfation.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;
as well as URLs for NNTP newsgroup(s).