From patchwork Fri Apr 26 17:29:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Linus_L=C3=BCssing?= X-Patchwork-Id: 17897 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id BB4D28141C; Fri, 26 Apr 2019 19:29:59 +0200 (CEST) Authentication-Results: open-mesh.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=c0d3.blue header.i=@c0d3.blue header.b="n8WYzQLr"; dkim-atps=neutral Received-SPF: None (mailfrom) identity=mailfrom; client-ip=138.201.29.205; helo=mail.aperture-lab.de; envelope-from=linus.luessing@c0d3.blue; receiver= Received: from mail.aperture-lab.de (mail.aperture-lab.de [138.201.29.205]) by open-mesh.org (Postfix) with ESMTPS id 995C080988 for ; Fri, 26 Apr 2019 19:29:57 +0200 (CEST) From: =?utf-8?q?Linus_L=C3=BCssing?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c0d3.blue; s=2018; t=1556299797; h=from:from:sender: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:in-reply-to: references; bh=vM/O64/Wg2OAPDtDjZiE2mUWVvG5m37tJHRUp0rGpfA=; b=n8WYzQLrOf3gWlbLlxR29Jp+pVgVhN1t5VfpRxY2FFEzxi7Rx8YXVFA78+RhPQ0WjJv+Iy hrUN+fYa1UKIU7h6RI809S7BJIS34amKCl2hyEDuMG/JyMZJJNxLEIpoGt3gAqG/MBeagq QDPmJ4AIb3Qql0gOlDPg12cW493yBVRSSLrCa9WcrzR1jc4FP6Pu648n/aLa3Ej6+rHsCL zW2DfsXSQlOyWGEJiJZ29WKJdBlonmAkCVq+sAJ8voC0vEwtT9JNioA7bi7D9Im68lLDG8 oxS7hFk2bzUn46yFn0v9mQ6Z8CfNjofApNTe6/EGHrjI9oB9bapfIQiUtPivDA== To: b.a.t.m.a.n@lists.open-mesh.org Date: Fri, 26 Apr 2019 19:29:55 +0200 Message-Id: <20190426172955.18574-1-linus.luessing@c0d3.blue> MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=c0d3.blue; s=2018; t=1556299797; h=from:from:sender: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:in-reply-to: references; bh=vM/O64/Wg2OAPDtDjZiE2mUWVvG5m37tJHRUp0rGpfA=; b=JUjEkEAgQMNlCfb2nY0LvNWgVf48ohTPSUDdyhCM5EEe8E5Ns0jvJJ3Hq7jCqyn8JrP2i4 AtfDs/pHxQjMxSAfaO3xdQ1Gt7UTG60ye4/xyNjkiQf+MgSIxUQ1S9tS0y5GKYGB46cSz1 +za1MraZZU/FEPnp+tce/xrLIF4NXgG8ts9EHcBRJw4E0AlwXRqdlllRp88lijYfVk0xPq 4PtWYI79Hb+42mzqryftzezVK+N5sFeEsLF6cxuht2i+b4AbDSYsNSDud14DwSSgOD34vd fq7ZaXN0wtILo5KSty6l0AsBBnu6TTX1abyns5qmFwaVB12wHI/S5UH325fezg== ARC-Seal: i=1; s=2018; d=c0d3.blue; t=1556299797; a=rsa-sha256; cv=none; b=ZtBCIHI0hpmb23vKObKOuUa+Pd/ipFfQYO6q3jGbcBfix6WTcgTnam7N4QqMuF87meBVDR 6I5RxNM9ZlwIRRLdof1SH8+kvHHAxwE55Eu3bToTvxoblF39qyZ7oK/H1LYzWcQOl5rbbc dMQld1kL/YPdN+NLJoQpCvI0z/YklmLQf84FnLHNdH6swQ7XV30QQPkLld5DllonS1syvr iITD8eJcr8ohryzC55BmjJadu3ShjwGyPFin8GHgTbli9vwKaYCodvNdbZNWYpi1spMyji ldcH1xig04aEnRy+TGg4xTpEXDRWIdCVQpF7nZGYKRj1E52c1BARLBcooPZaZg== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=linus.luessing@c0d3.blue smtp.mailfrom=linus.luessing@c0d3.blue Authentication-Results: ORIGINATING; auth=pass smtp.auth=linus.luessing@c0d3.blue smtp.mailfrom=linus.luessing@c0d3.blue Subject: [B.A.T.M.A.N.] [PATCH] batctl: Add noflood command X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" Adds support for the new 'noflood' setting in batman-adv. Signed-off-by: Linus Lüssing --- Makefile | 1 + README.rst | 10 ++++++++++ batman_adv.h | 10 ++++++++++ man/batctl.8 | 7 +++++++ 4 files changed, 28 insertions(+) diff --git a/Makefile b/Makefile index df8b7b9..6a363d7 100755 --- a/Makefile +++ b/Makefile @@ -61,6 +61,7 @@ $(eval $(call add_command,multicast_mode,y)) $(eval $(call add_command,nc_nodes,y)) $(eval $(call add_command,neighbors,y)) $(eval $(call add_command,network_coding,y)) +$(eval $(call add_command,noflood,y)) $(eval $(call add_command,orig_interval,y)) $(eval $(call add_command,originators,y)) $(eval $(call add_command,ping,y)) diff --git a/README.rst b/README.rst index 03ea5e5..67d42f6 100644 --- a/README.rst +++ b/README.rst @@ -571,6 +571,16 @@ Usage:: * Example 4: ``batctl mark 0x0f`` +batctl noflood +======================= + +display or modify noflood setting (||) + +Usage:: + + batctl noflood|nf [0|1|2] + + batctl translocal ================= diff --git a/batman_adv.h b/batman_adv.h index 67f4636..ea2ffda 100644 --- a/batman_adv.h +++ b/batman_adv.h @@ -480,6 +480,16 @@ enum batadv_nl_attrs { */ BATADV_ATTR_MULTICAST_FANOUT, + /** + * @BATADV_ATTR_NOFLOOD: defines if and how strictly flooding prevention + * is configured. If the value is 0 then flood prevention is disabled. + * If the value is 1 then flood prevention is enabled for all multicast + * /broadcast packets excluding ICMPv6 and IGMP (cautious mode). If set + * to 2 then flood prevention is enabled for all multicast/broadcast + * packets (aggressive mode). + */ + BATADV_ATTR_NOFLOOD, + /* add attributes above here, update the policy in netlink.c */ /** diff --git a/man/batctl.8 b/man/batctl.8 index 8d7332a..7518f9c 100644 --- a/man/batctl.8 +++ b/man/batctl.8 @@ -116,6 +116,13 @@ If no parameter is given the current multicast fanout setting is displayed. Othe the multicast fanout. The multicast fanout defines the maximum number of packet copies that may be generated for a multicast-to-unicast conversion. Once this limit is exceeded distribution will fall back to broadcast. .br +.IP "\fBnoflood\fP|\fBnf\fP [\fB0|1|2\fP]" +If no parameter is given the current noflood setting is displayed. Otherwise the parameter is used to set the +the noflood option. The noflood option defines if and how strictly flooding prevention is configured. If the value is +0 then flood prevention is disabled. If the value is 1 then flood prevention is enabled for all multicast/broadcast +packets excluding ICMPv6 and IGMP (cautious mode). If set to 2 then flood prevention is enabled for all multicast/broadcast +packets (aggressive mode). +.br .IP "\fBloglevel\fP|\fBll\fP [\fBlevel\fP[ \fBlevel\fP[ \fBlevel\fP]] \fB...\fP]" If no parameter is given the current log level settings are displayed otherwise the parameter(s) is/are used to set the log level. Level 'none' disables all verbose logging. Level 'batman' enables messages related to routing / flooding / broadcasting.