b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
From: "Linus Lüssing" <linus.luessing@c0d3.blue>
To: Sven Eckelmann <sven@narfation.org>
Cc: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [PATCH v3 1/2] batman-adv: mcast: detect, distribute and maintain multicast router presence
Date: Sat, 8 Jun 2019 13:26:56 +0200	[thread overview]
Message-ID: <20190608112656.GA2503@otheros> (raw)
In-Reply-To: <3461137.lo7lFcuFkP@bentobox>

On Thu, Jun 06, 2019 at 05:48:32PM +0200, Sven Eckelmann wrote:
> On Sunday, 26 May 2019 18:48:28 CEST Linus Lüssing wrote:
> > If a multicast router is detected then this is signalized via the new
> > BATADV_MCAST_WANT_ALL_RTR4 and BATADV_MCAST_WANT_ALL_RTR6
> > multicast tvlv flags (which are sent flipped over the wire for backwards
> > compatibility - so that old nodes will always have them "set").
> [...]
> > @@ -691,7 +868,12 @@ batadv_mcast_mla_flags_update(struct batadv_priv 
> *bat_priv,
> >         batadv_mcast_bridge_log(bat_priv, flags);
> >         batadv_mcast_flags_log(bat_priv, flags->tvlv_flags);
> >  
> > +       /* toggle WANT_ALL_RTR flags as they are sent flipped on the
> > +        * wire for backwards compatibility
> > +        */
> >         mcast_data.flags = flags->tvlv_flags;
> > +       mcast_data.flags ^= BATADV_MCAST_WANT_ALL_RTR4;
> > +       mcast_data.flags ^= BATADV_MCAST_WANT_ALL_RTR6;
> >         memset(mcast_data.reserved, 0, sizeof(mcast_data.reserved));
> 
> Ehrm, this sounds like it is a good way to confuse people. Have a packet field 
> which is called BATADV_MCAST_WANT_ALL_RTR4 but it actually means that it 
> doesn't have BATADV_MCAST_WANT_ALL_RTR4. So maybe we should call this 
> differently in batadv_packet.h's enum batadv_mcast_flags. 
> BATADV_MCAST_WANT_ALL_RTR4 -> BATADV_MCAST_WANT_NO_RTR4? And then switch the 
> logic in batadv_mcast_mla_rtr_flags_softif_get_ipv*, 
> batadv_mcast_mla_rtr_flags_bridge_get, batadv_mcast_mla_rtr_flags_bridge_get, 
> batadv_mcast_mla_softif_get_ipv*, ....
> 
> Or is it really necessary to have this enabled for older nodes?

No, I can swap that. Then we'd just need to make sure we really
and correctly swap the logic every else (which I initially wanted
to avoid, to be able to reuse as much code unmodified as possible as used
by the WANT_ALL_IPV{4,6} flags).

But you are right, when looking at things on the wire (through
Wireshark/tcpdump etc.) it might be confusing for the user to have the
bit flipped. I'll give the WANT_NO_RTR{4,6} a try to so we can
compare.

  reply	other threads:[~2019-06-08 11:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-26 16:48 [PATCH v3 0/2] batman-adv: Add routeable multicast optimizations Linus Lüssing
2019-05-26 16:48 ` [PATCH v3 1/2] batman-adv: mcast: detect, distribute and maintain multicast router presence Linus Lüssing
2019-06-06 15:48   ` Sven Eckelmann
2019-06-08 11:26     ` Linus Lüssing [this message]
2019-05-26 16:48 ` [PATCH v3 2/2] batman-adv: mcast: apply optimizations for routeable packets, too Linus Lüssing

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=20190608112656.GA2503@otheros \
    --to=linus.luessing@c0d3.blue \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --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).