All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: davem@davemloft.net
Cc: netfilter-devel@lists.netfilter.org, Patrick McHardy <kaber@trash.net>
Subject: [NETFILTER 10/18]: xt_CONNMARK: use tabs for indentation
Date: Tue, 22 Aug 2006 00:52:31 +0200 (MEST)	[thread overview]
Message-ID: <20060821225231.10288.68694.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20060821225217.10288.69738.sendpatchset@localhost.localdomain>

[NETFILTER]: xt_CONNMARK: use tabs for indentation

Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit c3e06d8b091765def127afcc148835736d64fad5
tree cd0512e19c5b2958a06ac0c0bf22a018242787df
parent 54ba0f09d3cb3d4ce48e4eb8cb9cae3ac60bade1
author Patrick McHardy <kaber@trash.net> Sun, 13 Aug 2006 17:19:50 +0200
committer Patrick McHardy <kaber@trash.net> Sun, 13 Aug 2006 17:19:50 +0200

 net/netfilter/xt_CONNMARK.c |   57 ++++++++++++++++++++++---------------------
 1 files changed, 29 insertions(+), 28 deletions(-)

diff --git a/net/netfilter/xt_CONNMARK.c b/net/netfilter/xt_CONNMARK.c
index 784482b..19989a9 100644
--- a/net/netfilter/xt_CONNMARK.c
+++ b/net/netfilter/xt_CONNMARK.c
@@ -49,36 +49,37 @@ target(struct sk_buff **pskb,
 	u_int32_t *ctmark = nf_ct_get_mark(*pskb, &ctinfo);
 
 	if (ctmark) {
-	    switch(markinfo->mode) {
-	    case XT_CONNMARK_SET:
-		newmark = (*ctmark & ~markinfo->mask) | markinfo->mark;
-		if (newmark != *ctmark) {
-		    *ctmark = newmark;
+		switch(markinfo->mode) {
+		case XT_CONNMARK_SET:
+			newmark = (*ctmark & ~markinfo->mask) | markinfo->mark;
+			if (newmark != *ctmark) {
+				*ctmark = newmark;
 #ifdef CONFIG_IP_NF_CONNTRACK_EVENTS
-		    ip_conntrack_event_cache(IPCT_MARK, *pskb);
+				ip_conntrack_event_cache(IPCT_MARK, *pskb);
 #else
-		    nf_conntrack_event_cache(IPCT_MARK, *pskb);
+				nf_conntrack_event_cache(IPCT_MARK, *pskb);
 #endif
 		}
-		break;
-	    case XT_CONNMARK_SAVE:
-		newmark = (*ctmark & ~markinfo->mask) | ((*pskb)->nfmark & markinfo->mask);
-		if (*ctmark != newmark) {
-		    *ctmark = newmark;
+			break;
+		case XT_CONNMARK_SAVE:
+			newmark = (*ctmark & ~markinfo->mask) |
+				  ((*pskb)->nfmark & markinfo->mask);
+			if (*ctmark != newmark) {
+				*ctmark = newmark;
 #ifdef CONFIG_IP_NF_CONNTRACK_EVENTS
-		    ip_conntrack_event_cache(IPCT_MARK, *pskb);
+				ip_conntrack_event_cache(IPCT_MARK, *pskb);
 #else
-		    nf_conntrack_event_cache(IPCT_MARK, *pskb);
+				nf_conntrack_event_cache(IPCT_MARK, *pskb);
 #endif
+			}
+			break;
+		case XT_CONNMARK_RESTORE:
+			nfmark = (*pskb)->nfmark;
+			diff = (*ctmark ^ nfmark) & markinfo->mask;
+			if (diff != 0)
+				(*pskb)->nfmark = nfmark ^ diff;
+			break;
 		}
-		break;
-	    case XT_CONNMARK_RESTORE:
-		nfmark = (*pskb)->nfmark;
-		diff = (*ctmark ^ nfmark) & markinfo->mask;
-		if (diff != 0)
-		    (*pskb)->nfmark = nfmark ^ diff;
-		break;
-	    }
 	}
 
 	return XT_CONTINUE;
@@ -95,17 +96,17 @@ checkentry(const char *tablename,
 	struct xt_connmark_target_info *matchinfo = targinfo;
 
 	if (matchinfo->mode == XT_CONNMARK_RESTORE) {
-	    if (strcmp(tablename, "mangle") != 0) {
-		    printk(KERN_WARNING "CONNMARK: restore can only be called from \"mangle\" table, not \"%s\"\n", tablename);
-		    return 0;
-	    }
+		if (strcmp(tablename, "mangle") != 0) {
+			printk(KERN_WARNING "CONNMARK: restore can only be "
+			       "called from \"mangle\" table, not \"%s\"\n",
+			       tablename);
+			return 0;
+		}
 	}
-
 	if (matchinfo->mark > 0xffffffff || matchinfo->mask > 0xffffffff) {
 		printk(KERN_WARNING "CONNMARK: Only supports 32bit mark\n");
 		return 0;
 	}
-
 	return 1;
 }
 

  parent reply	other threads:[~2006-08-21 22:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-21 22:52 [NETFILTER 00/18]: Netfilter Update for 2.6.19 Patrick McHardy
2006-08-21 22:52 ` [NETFILTER 01/18]: x_tables: replace IPv4 dscp match by address family independent version Patrick McHardy
2006-08-21 22:52 ` [NETFILTER 02/18]: x_tables: replace IPv4 DSCP target " Patrick McHardy
2006-08-21 22:52 ` [NETFILTER 03/18]: ipt_recent: add module parameter for changing ownership of /proc/net/ipt_recent/* Patrick McHardy
2006-08-21 22:52 ` [NETFILTER 04/18]: conntrack: introduce connection mark event Patrick McHardy
2006-08-21 22:52 ` [NETFILTER 05/18]: ctnetlink: dump connection mark Patrick McHardy
2006-08-21 22:52 ` [NETFILTER 06/18]: ctnetlink: check for listeners before sending expectation events Patrick McHardy
2006-08-21 22:52 ` [NETFILTER 07/18]: ctnetlink: remove impossible events tests for updates Patrick McHardy
2006-08-21 22:52 ` [NETFILTER 08/18]: nfnetlink_queue: fix typo in error message Patrick McHardy
2006-08-21 22:52 ` [NETFILTER 09/18]: replace open coded checksum updates Patrick McHardy
2006-08-21 22:52 ` Patrick McHardy [this message]
2006-08-21 22:52 ` [NETFILTER 11/18]: x_tables: add helpers for mass match/target registration Patrick McHardy
2006-08-21 22:52 ` [NETFILTER 12/18]: x_tables: make use of mass registation helpers Patrick McHardy
2006-08-22 20:48   ` [NETFILTER]: x_tables: Fix typos after conversion to use mass registation helper Thomas Graf
2006-08-22 20:52     ` David Miller
2006-08-21 22:52 ` [NETFILTER 13/18]: x_tables: remove unused argument to target functions Patrick McHardy
2006-08-21 22:52 ` [NETFILTER 14/18]: x_tables: remove unused size argument to check/destroy functions Patrick McHardy
2006-08-21 22:52 ` [NETFILTER 15/18]: nfnetlink: remove unnecessary packed attributes Patrick McHardy
2006-08-21 22:52 ` [NETFILTER 16/18]: x_tables: add data member to struct xt_match Patrick McHardy
2006-08-21 22:52 ` [NETFILTER 17/18]: ip6_tables: consolidate dst and hbh matches Patrick McHardy
2006-08-21 22:52 ` [NETFILTER 18/18]: xt_tcpmss: minor cleanups Patrick McHardy
2006-08-22  7:44 ` [NETFILTER 00/18]: Netfilter Update for 2.6.19 David Miller
2006-08-22  8:40 ` Amin Azez
2006-08-22  8:47   ` Patrick McHardy

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=20060821225231.10288.68694.sendpatchset@localhost.localdomain \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --cc=netfilter-devel@lists.netfilter.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.