Date: Thu, 15 Apr 2021 23:14:06 -0600 From: "Jason A. Donenfeld" <Jason@zx2c4.com> To: olivier@FreeBSD.org, mat@FreeBSD.org, decke@freebsd.org, freebsd-ports@freebsd.org Subject: [PATCH] net/bird2: add multicast patch from bird mailing list Message-ID: <20210416051406.1372205-1-Jason@zx2c4.com>
next in thread | raw e-mail | index | archive | help
This patch was made in response to a FreeBSD networking discussion and is important in enabling babel support on interfaces that are neither pointtopoint nor broadcast. The upstream patch submission is: https://bird.network.cz/pipermail/bird-users/2021-April/015415.html --- net/bird2/files/patch-babel.c | 55 +++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 net/bird2/files/patch-babel.c diff --git a/net/bird2/files/patch-babel.c b/net/bird2/files/patch-babel.c new file mode 100644 index 000000000000..67181656fa07 --- /dev/null +++ b/net/bird2/files/patch-babel.c @@ -0,0 +1,55 @@ +From 70bb0dc8e041212fd9ee03e79c7b3301abf782ce Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= <toke@toke.dk> +Date: Thu, 15 Apr 2021 15:44:50 +0200 +Subject: [PATCH] babel: Drop check for IF_MULTICAST interface flag +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +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 4b6b9d7f..297b86b0 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 + -- 2.31.1
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20210416051406.1372205-1-Jason>