From patchwork Fri Feb 8 08:40:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 683 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director9.mail.ord1d.rsapps.net ([172.27.255.8]) by backend30.mail.ord1d.rsapps.net with LMTP id 0BnNB2LbXVzQbAAAIUCqbw for ; Fri, 08 Feb 2019 14:41:22 -0500 Received: from proxy12.mail.iad3a.rsapps.net ([172.27.255.8]) by director9.mail.ord1d.rsapps.net with LMTP id aHfuBGLbXVz4cQAAalYnBA ; Fri, 08 Feb 2019 14:41:22 -0500 Received: from smtp33.gate.iad3a ([172.27.255.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy12.mail.iad3a.rsapps.net with LMTP id wDFMOmHbXVwUOQAAh9K5Vw ; Fri, 08 Feb 2019 14:41:21 -0500 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp33.gate.iad3a.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dmarc=none (p=nil; dis=none) header.from=greenie.muc.de X-Suspicious-Flag: YES X-Classification-ID: 823027ea-2bd9-11e9-b2a3-525400201c3f-1-1 Received: from [216.105.38.7] ([216.105.38.7:55523] helo=lists.sourceforge.net) by smtp33.gate.iad3a.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 25/95-17183-06BDD5C5; Fri, 08 Feb 2019 14:41:21 -0500 Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1gsC0m-0007wQ-Ne; Fri, 08 Feb 2019 19:40:32 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1gsC0l-0007wH-Db for openvpn-devel@lists.sourceforge.net; Fri, 08 Feb 2019 19:40:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=8GA7uurzap0FZnYNLoET9HpGA0yIgFH3aQFvObKfgC4=; b=eKXgS4jzLmKUyGgwkfxvtRRRDg FqC+bJY+2RnjCMve7iNuO6TwOUgK+dQc33SEFxD5xoDWXNUJedjZnXRu121ZLA5NVqhMOrmvSxVa4 YZu1eO860t/hfVNS3zHxjbhzM37TAlrKp9IDNWycmoi9yg5G0MrGFuQnCSE0jLsHma0A=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:MIME-Version: Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=8GA7uurzap0FZnYNLoET9HpGA0yIgFH3aQFvObKfgC4=; b=husEjG7f89l/Mh/DHrmE5sMYQA 9cMFSmG7fcYiQBmVaeduIQXQDz9hQAL32j90KWSPUXGqwJUbW71guAQSa8Udmtq6FYSrJOJSwI54m FqKCy5Xs353Do2PpCqp3JfsZKyASFpchB1t1as24h1ej0LRroXF1ki8g4O+HYDU6X1B8=; Received: from chekov.greenie.muc.de ([193.149.48.178]) by sfi-mx-4.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) id 1gsC0h-00Ci7s-DK for openvpn-devel@lists.sourceforge.net; Fri, 08 Feb 2019 19:40:30 +0000 Received: from chekov.greenie.muc.de (localhost [127.0.0.1]) by chekov.greenie.muc.de (8.15.2/8.15.2) with ESMTPS id x18JeI6A020367 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 8 Feb 2019 20:40:18 +0100 (CET) (envelope-from gert@chekov.greenie.muc.de) Received: (from gert@localhost) by chekov.greenie.muc.de (8.15.2/8.15.2/Submit) id x18JeIuC020366 for openvpn-devel@lists.sourceforge.net; Fri, 8 Feb 2019 20:40:18 +0100 (CET) (envelope-from gert) From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Fri, 8 Feb 2019 20:40:18 +0100 Message-Id: <20190208194018.20325-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.18.0 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: muc.de] X-Headers-End: 1gsC0h-00Ci7s-DK Subject: [Openvpn-devel] [PATCH] Add unknown-unicast flooding to p2mp tap bridge. X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox Enable flooding of "unknown-unicast" packets from the server to all connected clients (+tap). These are packets that are sent to an unknown destination MAC address and which are not broadcast/multicast packets. "Normal" switches also flood these packets, which allows client-to-client MAC learning without having to have an initial broadcast packet. Without the patch, the p2mp tap server will only forward such packets to the tap interface on the host. This is only active if --client-to-client is configured on the server. Signed-off-by: Gert Doering --- src/openvpn/multi.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 55c167b..aa5ae26 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -2689,6 +2689,13 @@ multi_process_incoming_link(struct multi_context *m, struct multi_instance *inst } c->c2.to_tun.len = 0; } + else + { + /* flood "unknown unicast" packets */ + msg(D_MULTI_LOW, "MULTI: unknown unicast destination [%s], flood", + mroute_addr_print(&src, &gc)); + multi_bcast(m, &c->c2.to_tun, m->pending, NULL); + } } } #ifdef ENABLE_PF