b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: 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: Thu, 06 Jun 2019 17:48:32 +0200	[thread overview]
Message-ID: <3461137.lo7lFcuFkP@bentobox> (raw)
In-Reply-To: <20190526164829.4247-2-linus.luessing@c0d3.blue>

[-- Attachment #1: Type: text/plain, Size: 1557 bytes --]

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?

Kind regards,
	Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2019-06-06 15:48 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 [this message]
2019-06-08 11:26     ` Linus Lüssing
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=3461137.lo7lFcuFkP@bentobox \
    --to=sven@narfation.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;
as well as URLs for NNTP newsgroup(s).