Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3341181imj; Mon, 11 Feb 2019 19:13:39 -0800 (PST) X-Google-Smtp-Source: AHgI3IZaq3FYmQv/YXI9/26rIL+7Pp4AIY0s1M1HYSE3gAaUyb7tTI+085EuXcxJleKvdKViKSRQ X-Received: by 2002:a17:902:7044:: with SMTP id h4mr1743131plt.35.1549941219179; Mon, 11 Feb 2019 19:13:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549941219; cv=none; d=google.com; s=arc-20160816; b=VjMFtDcjlVv33XZOTKthym7+ruavY4BHeQQuo/e1N6NGX5umQCdlwmj9x9U90s/GP/ Xv99dhPVDTsIsHtrebXr2VKPIURn3qRDyJYKcnGGIPrZr4IBsdklf9c+re+vUMjeocSk 1rrxwkxL9tPvVArkMS9VBUaZ8vbGv4Im+rol4CCYt5WUvubmZpmbmvzpcSqIKBr7KsVI Gx1iNiN+619tEVSbbCAZEcYjxANvQrufEbk1O8UVOhi7L7QNBT91Lhj433ChVFpNw3AW bLsPx0vveNiAqRBqsgEFFua3RkrblLnIZZeZXKoNZY1kVqrfM0PxgUSaHtXeFdAIidij hnCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=nlIUaIN7SSb56zKhDUggf/vi13Ji6xlM/Rl46p5GXUQ=; b=0z3Tz2nS43GIVZcUdewwOPoKWz3W7IJUO91VjBJPeUd2xI3AzsdBt40ui07FZPvdqR 3LfH1MMLDyeK60OiGbppIWtBc/3s79vvzC8i4vhjLzxvH+Qyc7Cc23QSKKFVshF4AuUC 1jwOYfbH24pDLteYGVy/TBkhrTBh7Wkyedmw43kIuREZj1sIfwilFoIHfml4pPuZd7KQ zBYif4GT7zg6Iv8RUWj/PakyuK06GNA3InvwiGXXwFnqJ6ijovm/yrvW4ZarrVAZj7LY e2vO9sS9Le294k9pO5eAMd6RGyyjN0xLeI64MhhqB/mqgH4gsdCzZof/uzYjjY60Zu/0 Rhtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=mj4j3LJr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alliedtelesis.co.nz Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g186si3146335pgc.320.2019.02.11.19.13.23; Mon, 11 Feb 2019 19:13:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=mj4j3LJr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alliedtelesis.co.nz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727651AbfBLDNJ (ORCPT + 99 others); Mon, 11 Feb 2019 22:13:09 -0500 Received: from gate2.alliedtelesis.co.nz ([202.36.163.20]:40505 "EHLO gate2.alliedtelesis.co.nz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726892AbfBLDNJ (ORCPT ); Mon, 11 Feb 2019 22:13:09 -0500 Received: from mmarshal3.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id 4A232806A8; Tue, 12 Feb 2019 16:13:05 +1300 (NZDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1549941185; bh=nlIUaIN7SSb56zKhDUggf/vi13Ji6xlM/Rl46p5GXUQ=; h=From:To:Cc:Subject:Date; b=mj4j3LJrvHRYur01tNhYuCbTMOVGgN2xjAhW25Ke5o4XS3IKg3Cm+Zui/ygt+Wpkg Ld96sqiUL4BLzqfcyvkxVRuDgdqZeuTlzVgZxtW4B4laWTraB6q1mMSPJnD5zcgUk3 DtbYT5coVKm8K6hpZ0eBGRrsv+k9H1RgudtQWYS7YcYTpZHkaxuq98i98ZhR1W1eh6 ux1e1dxjPqDyi1shlxeGUoMAlTjzHg9k2AccT2EgnKjzyZ8o/2fmaDzXmAyCMkGaSo +mPYVnPyGHlVWaz7fLW+szMR4bKSdPT5FhP2Kn2jHg/M2PP4iar9tVPcfBcND7K6a+ /EZIv42SflO4w== Received: from smtp (Not Verified[10.32.16.33]) by mmarshal3.atlnz.lc with Trustwave SEG (v7,5,8,10121) id ; Tue, 12 Feb 2019 16:12:57 +1300 Received: from callums-dl.ws.atlnz.lc (callums-dl.ws.atlnz.lc [10.33.22.12]) by smtp (Postfix) with ESMTP id B5CB613EF01; Tue, 12 Feb 2019 16:12:56 +1300 (NZDT) Received: by callums-dl.ws.atlnz.lc (Postfix, from userid 1764) id AB8723AA212; Tue, 12 Feb 2019 16:12:56 +1300 (NZDT) From: Callum Sinclair To: davem@davemloft.net, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, nikolay@cumulusnetworks.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: nicolas.dichtel@6wind.com, Callum Sinclair Subject: [PATCH net-next v4] ipmr: ip6mr: Create new sockopt to clear mfc cache or vifs Date: Tue, 12 Feb 2019 16:12:54 +1300 Message-Id: <20190212031255.16121-1-callum.sinclair@alliedtelesis.co.nz> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable x-atlnz-ls: pat Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Created a way to clear the multicast forwarding cache on a socket without having to either remove the entries manually using the delete entry socket option or destroy and recreate the multicast socket. Calling the socket option MRT_FLUSH will allow any combination of the four flag options to be cleared. MRT_FLUSH_MFC will clear all non static mfc entries MRT_FLUSH_MFC_STATIC will clear all static mfc entries MRT_FLUSH_VIFS will clear all non static interfaces MRT_FLUSH_VIFS_STATIC will clear all static interfaces. Callum Sinclair (1): ipmr: ip6mr: Create new sockopt to clear mfc cache or vifs include/uapi/linux/mroute.h | 9 ++++- include/uapi/linux/mroute6.h | 9 ++++- net/ipv4/ipmr.c | 73 ++++++++++++++++++++------------- net/ipv6/ip6mr.c | 78 +++++++++++++++++++++++------------- 4 files changed, 112 insertions(+), 57 deletions(-) --=20 2.20.1