Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1734490imj; Sun, 17 Feb 2019 13:08:56 -0800 (PST) X-Google-Smtp-Source: AHgI3Iapj/HL03tPuoKa30bCnuF3Ldw3bAERGiowE2+cl+Z7Anly7eplnleRLnHrVBt3xSeFtGGa X-Received: by 2002:a62:3ac8:: with SMTP id v69mr20769519pfj.150.1550437736360; Sun, 17 Feb 2019 13:08:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550437736; cv=none; d=google.com; s=arc-20160816; b=sEihloBQ530QbX9QgLWAQBGzLtxGJZTuB7KWyjJF5tAifd7Ewywh9H0J4qemLOsA8G fnJvUXA1dqB7mWKH4jx4W0CG4EZ0tSqLXE+4Kr5Z7xuR/6rzPbw+2p07Zzi8txt+UJZw KM1fcNg9nUGHDm6NAJpVoi8F1WdmMaw8vkrG9L6t/SyBIVaoxxvGrs/WS14b+d4u8F9D cTYt4wIXSlldeB6Yd2f8wp0xtqnzdcmNJEoNrSkgk6zugPJcx7g3lwBEJLFe5xRxsBdk 9nUpdyl/1IfD6wy655uVrVADVEza61R0mbfyKgbRN7zZaKwQF6QYTDHhw77eHEp5zCYH CVgA== 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=impbUH9nV+toQTY7M/OP/YMGwFlXyj2IM63BNKJzDAE=; b=ZdGoLKwtzAcTWlz6VWZWVP/vzBCEBCRyW8tQn4+Unj0KN2b84uVcKpJx1ijlZO48F5 UK8jhzEIK8AC4c/MY5hqxfkgbEmWAWbBf7D82RnIH9kh1FDC9idkVuKHzpjuaCKaRZ3f PYXrgHZCeaa9Vir62aWPC24BH9zKlE2AieQA5omK3eaCoDn1iE+kFaV4WNf6+4MTH0qZ hy29TlrGidzIbmy9wwB7KyjG5Zjd6NvECBAwr5CqFJWq9Hmjf0uXGtWsDRIgBsdA9eI6 3GAJyltjQCmLYZjNoA552rrYd172uk5eLV06zQiQRhT8oN/GjEwQJ2eSzuPIe3UlFBqs Bgkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=HExZ1Ocv; 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 g75si4334559pfe.146.2019.02.17.13.08.40; Sun, 17 Feb 2019 13:08:56 -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=HExZ1Ocv; 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 S1726423AbfBQVH5 (ORCPT + 99 others); Sun, 17 Feb 2019 16:07:57 -0500 Received: from gate2.alliedtelesis.co.nz ([202.36.163.20]:51333 "EHLO gate2.alliedtelesis.co.nz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725916AbfBQVH5 (ORCPT ); Sun, 17 Feb 2019 16:07:57 -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 4EC7D8025D; Mon, 18 Feb 2019 10:07:54 +1300 (NZDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1550437674; bh=impbUH9nV+toQTY7M/OP/YMGwFlXyj2IM63BNKJzDAE=; h=From:To:Cc:Subject:Date; b=HExZ1OcvB1ueKN8ypfri4ohYOWnc8goEj+HR7I8Mwr7MEwIxQJry2kQXgC1zXif7j iIrSuuSjmjY4hQOO6sWJ4zjsV/XmZ8BHHdq5kXwJrgN4ojBA0Ov0pNy6pzpbjLzokx SB1t+aSPEf8IqwPHCGxJR3jtq3Fg2AFe9a37ADtzHG52oWq7C7PdnJXsTWilOCcHQ2 cLbhQ2VsgoUk+CgUT4cJZnoiNZPHjUV8Rw6kwSoF2XwX7qZjL0lNejkB436XVd0ugD VgaVxpY4wPmzBq+rwJVPcLyN9PqBKm0fQUny+qsGCFEzt2YMhYUOP2cfTkoiOUn5I1 xWxIV9dKfESFQ== Received: from smtp (Not Verified[10.32.16.33]) by mmarshal3.atlnz.lc with Trustwave SEG (v7,5,8,10121) id ; Mon, 18 Feb 2019 10:07:54 +1300 Received: from callums-dl.ws.atlnz.lc (callums-dl.ws.atlnz.lc [10.33.22.12]) by smtp (Postfix) with ESMTP id EDB0F13EEFC; Mon, 18 Feb 2019 10:07:53 +1300 (NZDT) Received: by callums-dl.ws.atlnz.lc (Postfix, from userid 1764) id D39333A064C; Mon, 18 Feb 2019 10:07:53 +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 v6] ipmr: ip6mr: Create new sockopt to clear mfc cache or vifs Date: Mon, 18 Feb 2019 10:07:51 +1300 Message-Id: <20190217210752.20914-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 and clear the unresol= ved cache 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 | 75 +++++++++++++++++++++------------- net/ipv6/ip6mr.c | 78 +++++++++++++++++++++++------------- 4 files changed, 115 insertions(+), 56 deletions(-) --=20 2.20.1