From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D752C2D0DB for ; Thu, 30 Jan 2020 00:38:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3497420661 for ; Thu, 30 Jan 2020 00:38:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="gSW/EOMJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726618AbgA3AiY (ORCPT ); Wed, 29 Jan 2020 19:38:24 -0500 Received: from mail26.static.mailgun.info ([104.130.122.26]:56736 "EHLO mail26.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726401AbgA3AiY (ORCPT ); Wed, 29 Jan 2020 19:38:24 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1580344702; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=NydfmcSZGXmPToYm5WsIL7tRre37KHnFnsFr4TVJbTs=; b=gSW/EOMJvloV4LyahgO6HwVlzxdw7334tJZxNS/3HnzCcBwyTS8uAGWRHg5lOJ67qNbmPnb5 owgPDgajuae3xtpM7C0uP39nfrr0gKNUv/BoRD6YAbL0git+OyFiwEEqknSDrcJqZjQG/K/E 0DtBRuZyek2dLxA2khhldC05SIw= X-Mailgun-Sending-Ip: 104.130.122.26 X-Mailgun-Sid: WyJlM2NhZSIsICJuZXRmaWx0ZXItZGV2ZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by mxa.mailgun.org with ESMTP id 5e32257c.7f7180d72068-smtp-out-n03; Thu, 30 Jan 2020 00:38:20 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 03DADC433A2; Thu, 30 Jan 2020 00:38:20 +0000 (UTC) Received: from subashab-lnx.qualcomm.com (unknown [129.46.15.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: subashab) by smtp.codeaurora.org (Postfix) with ESMTPSA id AA3B4C433CB; Thu, 30 Jan 2020 00:38:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org AA3B4C433CB Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=subashab@codeaurora.org From: Subash Abhinov Kasiviswanathan To: netfilter-devel@vger.kernel.org, fw@strlen.de, pablo@netfilter.org Cc: Manoj Basapathi , Subash Abhinov Kasiviswanathan Subject: [PATCH nf-next] netfilter: xtables: Add snapshot of hardidletimer target Date: Wed, 29 Jan 2020 17:37:07 -0700 Message-Id: <1580344627-2452-1-git-send-email-subashab@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org From: Manoj Basapathi This is a snapshot of hardidletimer netfilter target. This patch implements a hardidletimer Xtables target that can be used to identify when interfaces have been idle for a certain period of time. Timers are identified by labels and are created when a rule is set with a new label. The rules also take a timeout value (in seconds) as an option. If more than one rule uses the same timer label, the timer will be restarted whenever any of the rules get a hit. One entry for each timer is created in sysfs. This attribute contains the timer remaining for the timer to expire. The attributes are located under the xt_idletimer class: /sys/class/xt_hardidletimer/timers/