b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven.eckelmann@gmx.de>
To: greg@kroah.com
Cc: b.a.t.m.a.n@lists.open-mesh.net
Subject: [B.A.T.M.A.N.] [PATCH 20/21] Staging: batman-adv: Don't inform about dropped packets in nodebug
Date: Sun,  5 Sep 2010 01:58:37 +0200	[thread overview]
Message-ID: <1283644718-653-21-git-send-email-sven.eckelmann@gmx.de> (raw)
In-Reply-To: <1283644718-653-1-git-send-email-sven.eckelmann@gmx.de>

Information about dropped packets are usually only interesting for
debugging purposes and otherwise open the possibility to flood the logs
of the target machine with useless information.

pr_debug will not output those information on a nodebug kernel.

Reported-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
---
 drivers/staging/batman-adv/routing.c |   15 +++++++--------
 drivers/staging/batman-adv/vis.c     |    2 +-
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/batman-adv/routing.c b/drivers/staging/batman-adv/routing.c
index eda08b5..e12fd99 100644
--- a/drivers/staging/batman-adv/routing.c
+++ b/drivers/staging/batman-adv/routing.c
@@ -859,9 +859,9 @@ static int recv_icmp_ttl_exceeded(struct bat_priv *bat_priv,
 
 	/* send TTL exceeded if packet is an echo request (traceroute) */
 	if (icmp_packet->msg_type != ECHO_REQUEST) {
-		pr_warning("Warning - can't forward icmp packet from %pM to "
-			   "%pM: ttl exceeded\n", icmp_packet->orig,
-			   icmp_packet->dst);
+		pr_debug("Warning - can't forward icmp packet from %pM to "
+			 "%pM: ttl exceeded\n", icmp_packet->orig,
+			 icmp_packet->dst);
 		return NET_RX_DROP;
 	}
 
@@ -1141,9 +1141,9 @@ static int route_unicast_packet(struct sk_buff *skb,
 
 	/* TTL exceeded */
 	if (unicast_packet->ttl < 2) {
-		pr_warning("Warning - can't forward unicast packet from %pM to "
-			   "%pM: ttl exceeded\n", ethhdr->h_source,
-			   unicast_packet->dest);
+		pr_debug("Warning - can't forward unicast packet from %pM to "
+			 "%pM: ttl exceeded\n", ethhdr->h_source,
+			 unicast_packet->dest);
 		return NET_RX_DROP;
 	}
 
@@ -1224,8 +1224,7 @@ int recv_ucast_frag_packet(struct sk_buff *skb, struct batman_if *recv_if)
 			hash_find(bat_priv->orig_hash, unicast_packet->orig));
 
 		if (!orig_node) {
-			pr_warning("couldn't find orig node for "
-				"fragmentation\n");
+			pr_debug("couldn't find orig node for fragmentation\n");
 			spin_unlock_irqrestore(&bat_priv->orig_hash_lock,
 					       flags);
 			return NET_RX_DROP;
diff --git a/drivers/staging/batman-adv/vis.c b/drivers/staging/batman-adv/vis.c
index 071d3b7..b2cec8e 100644
--- a/drivers/staging/batman-adv/vis.c
+++ b/drivers/staging/batman-adv/vis.c
@@ -745,7 +745,7 @@ static void send_vis_packet(struct bat_priv *bat_priv, struct vis_info *info)
 
 	packet = (struct vis_packet *)info->skb_packet->data;
 	if (packet->ttl < 2) {
-		pr_warning("Error - can't send vis packet: ttl exceeded\n");
+		pr_debug("Error - can't send vis packet: ttl exceeded\n");
 		return;
 	}
 
-- 
1.7.1


  parent reply	other threads:[~2010-09-04 23:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-04 23:58 [B.A.T.M.A.N.] Staging: batman-adv for 2.6.37 (1) Sven Eckelmann
2010-09-04 23:58 ` [B.A.T.M.A.N.] [PATCH 01/21] Revert: "Staging: batman-adv: Adding netfilter-bridge hooks" Sven Eckelmann
2010-09-04 23:58 ` [B.A.T.M.A.N.] [PATCH 02/21] Staging: batman-adv: Remove CHANGELOG Sven Eckelmann
2010-09-04 23:58 ` [B.A.T.M.A.N.] [PATCH 03/21] Staging: batman-adv: Start new development cycle Sven Eckelmann
2010-09-04 23:58 ` [B.A.T.M.A.N.] [PATCH 04/21] Staging: batman-adv: Count Ethernet header for incoming packets Sven Eckelmann
2010-09-04 23:58 ` [B.A.T.M.A.N.] [PATCH 05/21] Staging: batman-adv: Calculate hamming weight using optimized kernel functions Sven Eckelmann
2010-09-04 23:58 ` [B.A.T.M.A.N.] [PATCH 06/21] Staging: batman-adv: move queue counters into bat_priv Sven Eckelmann
2010-09-04 23:58 ` [B.A.T.M.A.N.] [PATCH 07/21] Staging: batman-adv: refactoring unicast payload code Sven Eckelmann
2010-09-04 23:58 ` [B.A.T.M.A.N.] [PATCH 08/21] Staging: batman-adv: layer2 unicast packet fragmentation Sven Eckelmann
2010-09-04 23:58 ` [B.A.T.M.A.N.] [PATCH 09/21] Staging: batman-adv: Directly prepare icmp packets in socket buffer Sven Eckelmann
2010-09-04 23:58 ` [B.A.T.M.A.N.] [PATCH 10/21] Staging: batman-adv: register the batman-adv packet type per interface Sven Eckelmann
2010-09-04 23:58 ` [B.A.T.M.A.N.] [PATCH 11/21] Staging: batman-adv: Keep header writable and unshared Sven Eckelmann
2010-09-04 23:58 ` [B.A.T.M.A.N.] [PATCH 12/21] Staging: batman-adv: Only clone skb data for multiple broadcasts Sven Eckelmann
2010-09-04 23:58 ` [B.A.T.M.A.N.] [PATCH 13/21] Staging: batman-adv: Aggregate batman packets directly in skb Sven Eckelmann
2010-09-04 23:58 ` [B.A.T.M.A.N.] [PATCH 14/21] Staging: batman-adv: Prepare vis packets directly inside a skb Sven Eckelmann
2010-09-04 23:58 ` [B.A.T.M.A.N.] [PATCH 15/21] Staging: batman-adv: Create copy of skb with pre-allocated headroom Sven Eckelmann
2010-09-04 23:58 ` [B.A.T.M.A.N.] [PATCH 16/21] Staging: batman-adv: Provide full headers and packets as linear skb Sven Eckelmann
2010-09-04 23:58 ` [B.A.T.M.A.N.] [PATCH 17/21] Staging: batman-adv: attach each hard-interface to a soft-interface Sven Eckelmann
2010-09-04 23:58 ` [B.A.T.M.A.N.] [PATCH 18/21] Staging: batman-adv: multiple mesh clouds Sven Eckelmann
2010-09-04 23:58 ` [B.A.T.M.A.N.] [PATCH 19/21] Staging: batman-adv: Remove duplicate of attached device name Sven Eckelmann
2010-09-04 23:58 ` Sven Eckelmann [this message]
2010-09-04 23:58 ` [B.A.T.M.A.N.] [PATCH 21/21] Staging: batman-adv: Update mtu of bat device by changing mtu of slave device Sven Eckelmann
2010-09-05  7:33 ` [B.A.T.M.A.N.] Staging: batman-adv for 2.6.37 (1) Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1283644718-653-21-git-send-email-sven.eckelmann@gmx.de \
    --to=sven.eckelmann@gmx.de \
    --cc=b.a.t.m.a.n@lists.open-mesh.net \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=greg@kroah.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).