Development discussion of WireGuard
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@toke.dk>
To: bird-users@network.cz
Cc: "Toke Høiland-Jørgensen" <toke@toke.dk>,
	wireguard@lists.zx2c4.com,
	"Stefan Haller" <stefan.haller@stha.de>
Subject: [PATCH] babel: Drop check for IF_MULTICAST interface flag
Date: Thu, 15 Apr 2021 15:44:50 +0200	[thread overview]
Message-ID: <20210415134450.197661-1-toke@toke.dk> (raw)

The babel protocol code was checking interfaces for the IF_MULTICAST flag
and refusing to run if this isn't present. However, there are cases where
this flag doesn't correspond to the actual capability of sending multicast
packets. For instance, Wireguard interfaces on FreeBSD doesn't set the
required flags, but Babel will run just fine over such an interface given
the right configuration.

Since we're also checking for the presence of a link-local addresses right
below the flag check, we don't really need it. So let's just drop the check
and trust that users will only configure Babel on interfaces that can
handle the traffic.

Reported-by: Stefan Haller <stefan.haller@stha.de>
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
---
 proto/babel/babel.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/proto/babel/babel.c b/proto/babel/babel.c
index 4b6b9d7f9f6f..297b86b06a46 100644
--- a/proto/babel/babel.c
+++ b/proto/babel/babel.c
@@ -1658,10 +1658,6 @@ babel_if_notify(struct proto *P, unsigned flags, struct iface *iface)
     if (!(iface->flags & IF_UP))
       return;
 
-    /* We only speak multicast */
-    if (!(iface->flags & IF_MULTICAST))
-      return;
-
     /* Ignore ifaces without link-local address */
     if (!iface->llv6)
       return;
@@ -1736,10 +1732,6 @@ babel_reconfigure_ifaces(struct babel_proto *p, struct babel_config *cf)
     if (!(iface->flags & IF_UP))
       continue;
 
-    /* Ignore non-multicast ifaces */
-    if (!(iface->flags & IF_MULTICAST))
-      continue;
-
     /* Ignore ifaces without link-local address */
     if (!iface->llv6)
       continue;
-- 
2.31.1


             reply	other threads:[~2021-04-15 13:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-15 13:44 Toke Høiland-Jørgensen [this message]
2021-04-19 13:03 ` Ondrej Zajicek
2021-04-19 13:55   ` Toke Høiland-Jørgensen
2021-04-19 16:32     ` Ondrej Zajicek
2021-04-19 18:24       ` Toke Høiland-Jørgensen

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=20210415134450.197661-1-toke@toke.dk \
    --to=toke@toke.dk \
    --cc=bird-users@network.cz \
    --cc=stefan.haller@stha.de \
    --cc=wireguard@lists.zx2c4.com \
    /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).