From owner-freebsd-ports@freebsd.org Fri Apr 16 05:14:28 2021 Return-Path: Delivered-To: freebsd-ports@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 461415E54A3 for ; Fri, 16 Apr 2021 05:14:28 +0000 (UTC) (envelope-from Jason@zx2c4.com) Received: from mail.zx2c4.com (mail.zx2c4.com [104.131.123.232]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.zx2c4.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FM4Bq1YCqz3Hyr; Fri, 16 Apr 2021 05:14:26 +0000 (UTC) (envelope-from Jason@zx2c4.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1618550063; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=soWBySoAC6M2iaRP5SRGCoRBzLJpQs5bgzE9Q3NSGeY=; b=QTKdtXVA6bZWUOpYcwqI4e/jeXmHlN4afHNWwwEVCcUpkah3w9pxhKEv/DFJ/zfEPw2o7P YMWnL21uK8HsI8F9g4S/OvijSlazvDNFIoqOXDmrgdL/YuGLwCtyb5ttxtEoIVIhMjPW8h 35AeBdUNsS1BZNtCZFlMmNtIz9oitKU= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 725c8780 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Fri, 16 Apr 2021 05:14:23 +0000 (UTC) From: "Jason A. Donenfeld" 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 Date: Thu, 15 Apr 2021 23:14:06 -0600 Message-Id: <20210416051406.1372205-1-Jason@zx2c4.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4FM4Bq1YCqz3Hyr X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=zx2c4.com header.s=20210105 header.b=QTKdtXVA; dmarc=pass (policy=none) header.from=zx2c4.com; spf=pass (mx1.freebsd.org: domain of Jason@zx2c4.com designates 104.131.123.232 as permitted sender) smtp.mailfrom=Jason@zx2c4.com X-Spamd-Result: default: False [-0.83 / 15.00]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[zx2c4.com:s=20210105]; FREEFALL_USER(0.00)[Jason]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.zx2c4.com]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_MED(-0.20)[104.131.123.232:from]; DKIM_TRACE(0.00)[zx2c4.com:+]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_SHORT(-0.13)[-0.130]; DMARC_POLICY_ALLOW(-0.50)[zx2c4.com,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:14061, ipnet:104.131.64.0/18, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-ports] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 05:14:28 -0000 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?= +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 +Signed-off-by: Toke Høiland-Jørgensen +--- + 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