[netfilter-cvslog] r7301 - in trunk/iptables: . extensions

kaber at trash.net kaber at trash.net
Tue Jan 29 14:42:48 CET 2008


Author: kaber at trash.net
Date: 2008-01-29 14:42:48 +0100 (Tue, 29 Jan 2008)
New Revision: 7301

Modified:
   trunk/iptables/extensions/libxt_quota.c
   trunk/iptables/ip6tables-restore.c
   trunk/iptables/ip6tables-save.c
   trunk/iptables/ip6tables.c
   trunk/iptables/iptables-restore.c
   trunk/iptables/iptables-save.c
   trunk/iptables/iptables.c
Log:
[PATCH]: whitespace cleanup

Max Kellermann <max at duempel.org>


Modified: trunk/iptables/extensions/libxt_quota.c
===================================================================
--- trunk/iptables/extensions/libxt_quota.c	2008-01-29 13:40:11 UTC (rev 7300)
+++ trunk/iptables/extensions/libxt_quota.c	2008-01-29 13:42:48 UTC (rev 7301)
@@ -12,69 +12,69 @@
 #include <linux/netfilter/xt_quota.h>
 
 static const struct option quota_opts[] = {
-        {"quota", 1, NULL, '1'},
-        { }
+	{"quota", 1, NULL, '1'},
+	{ }
 };
 
 /* print usage */
 static void quota_help(void)
 {
-        printf("quota options:\n"
-               " --quota quota			quota (bytes)\n" "\n");
+	printf("quota options:\n"
+	       " --quota quota			quota (bytes)\n" "\n");
 }
 
 /* print matchinfo */
 static void
 quota_print(const void *ip, const struct xt_entry_match *match, int numeric)
 {
-        struct xt_quota_info *q = (struct xt_quota_info *) match->data;
-        printf("quota: %llu bytes", (unsigned long long) q->quota);
+	struct xt_quota_info *q = (struct xt_quota_info *) match->data;
+	printf("quota: %llu bytes", (unsigned long long) q->quota);
 }
 
 /* save matchinfo */
 static void
 quota_save(const void *ip, const struct xt_entry_match *match)
 {
-        struct xt_quota_info *q = (struct xt_quota_info *) match->data;
-        printf("--quota %llu ", (unsigned long long) q->quota);
+	struct xt_quota_info *q = (struct xt_quota_info *) match->data;
+	printf("--quota %llu ", (unsigned long long) q->quota);
 }
 
 /* parse quota option */
 static int
 parse_quota(const char *s, u_int64_t * quota)
 {
-        *quota = strtoull(s, (char **) NULL, 10);
+	*quota = strtoull(s, (char **) NULL, 10);
 
 #ifdef DEBUG_XT_QUOTA
-        printf("Quota: %llu\n", *quota);
+	printf("Quota: %llu\n", *quota);
 #endif
 
-        if (*quota == -1)
-                exit_error(PARAMETER_PROBLEM, "quota invalid: '%s'\n", s);
-        else
-                return 1;
+	if (*quota == -1)
+		exit_error(PARAMETER_PROBLEM, "quota invalid: '%s'\n", s);
+	else
+		return 1;
 }
 
 /* parse all options, returning true if we found any for us */
 static int
 quota_parse(int c, char **argv, int invert, unsigned int *flags,
-            const void *entry, struct xt_entry_match **match)
+	    const void *entry, struct xt_entry_match **match)
 {
-        struct xt_quota_info *info = (struct xt_quota_info *) (*match)->data;
+	struct xt_quota_info *info = (struct xt_quota_info *) (*match)->data;
 
-        switch (c) {
-        case '1':
-                if (check_inverse(optarg, &invert, NULL, 0))
-                        exit_error(PARAMETER_PROBLEM, "quota: unexpected '!'");
-                if (!parse_quota(optarg, &info->quota))
-                        exit_error(PARAMETER_PROBLEM,
-                                   "bad quota: '%s'", optarg);
-                break;
+	switch (c) {
+	case '1':
+		if (check_inverse(optarg, &invert, NULL, 0))
+			exit_error(PARAMETER_PROBLEM, "quota: unexpected '!'");
+		if (!parse_quota(optarg, &info->quota))
+			exit_error(PARAMETER_PROBLEM,
+				   "bad quota: '%s'", optarg);
+		break;
 
-        default:
-                return 0;
-        }
-        return 1;
+	default:
+		return 0;
+	}
+	return 1;
 }
 
 struct xtables_match quota_match = {

Modified: trunk/iptables/ip6tables-restore.c
===================================================================
--- trunk/iptables/ip6tables-restore.c	2008-01-29 13:40:11 UTC (rev 7300)
+++ trunk/iptables/ip6tables-restore.c	2008-01-29 13:42:48 UTC (rev 7301)
@@ -1,10 +1,10 @@
-/* Code to restore the iptables state, from file by ip6tables-save. 
+/* Code to restore the iptables state, from file by ip6tables-save.
  * Author:  Andras Kis-Szabo <kisza at sch.bme.hu>
  *
  * based on iptables-restore
  * Authors:
- * 	Harald Welte <laforge at gnumonks.org>
- * 	Rusty Russell <rusty at linuxcare.com.au>
+ *      Harald Welte <laforge at gnumonks.org>
+ *      Rusty Russell <rusty at linuxcare.com.au>
  * This code is distributed under the terms of GNU GPL v2
  *
  * $Id$
@@ -22,7 +22,7 @@
 #ifdef DEBUG
 #define DEBUGP(x, args...) fprintf(stderr, x, ## args)
 #else
-#define DEBUGP(x, args...) 
+#define DEBUGP(x, args...)
 #endif
 
 static int binary = 0, counters = 0, verbose = 0, noflush = 0;
@@ -50,8 +50,8 @@
 			"	   [ --test ]\n"
 			"	   [ --help ]\n"
 			"	   [ --noflush ]\n"
-		        "          [ --modprobe=<command>]\n", name);
-		
+			"          [ --modprobe=<command>]\n", name);
+
 	exit(1);
 }
 
@@ -92,7 +92,7 @@
 static char *newargv[255];
 static int newargc;
 
-/* function adding one argument to newargv, updating newargc 
+/* function adding one argument to newargv, updating newargc
  * returns true if argument added, false otherwise */
 static int add_argv(char *what) {
 	DEBUGP("add_argv: %s\n", what);
@@ -100,7 +100,7 @@
 		newargv[newargc] = strdup(what);
 		newargc++;
 		return 1;
-	} else 
+	} else
 		return 0;
 }
 
@@ -163,7 +163,7 @@
 				break;
 		}
 	}
-	
+
 	if (optind == argc - 1) {
 		in = fopen(argv[optind], "r");
 		if (!in) {
@@ -177,7 +177,7 @@
 		exit(1);
 	}
 	else in = stdin;
-	
+
 	/* Grab standard input. */
 	while (fgets(buffer, sizeof(buffer), in)) {
 		int ret = 0;
@@ -205,7 +205,7 @@
 			table = strtok(buffer+1, " \t\n");
 			DEBUGP("line %u, table '%s'\n", line, table);
 			if (!table) {
-				exit_error(PARAMETER_PROBLEM, 
+				exit_error(PARAMETER_PROBLEM,
 					"%s: line %u table name invalid\n",
 					program_name, line);
 				exit(1);
@@ -220,12 +220,12 @@
 			if (noflush == 0) {
 				DEBUGP("Cleaning all chains of table '%s'\n",
 					table);
-				for_each_chain(flush_entries, verbose, 1, 
+				for_each_chain(flush_entries, verbose, 1,
 						&handle);
-	
+
 				DEBUGP("Deleting all user-defined chains "
 				       "of table '%s'\n", table);
-				for_each_chain(delete_chain, verbose, 0, 
+				for_each_chain(delete_chain, verbose, 0,
 						&handle) ;
 			}
 
@@ -285,7 +285,7 @@
 							  "for chain '%s'\n", chain);
 
 				} else {
-					memset(&count, 0, 
+					memset(&count, 0,
 					       sizeof(struct ip6t_counters));
 				}
 
@@ -347,7 +347,7 @@
 			add_argv(argv[0]);
 			add_argv("-t");
 			add_argv((char *) &curtable);
-			
+
 			if (counters && pcnt && bcnt) {
 				add_argv("--set-counters");
 				add_argv((char *) pcnt);
@@ -360,7 +360,7 @@
 
 			quote_open = 0;
 			param_start = parsestart;
-			
+
 			for (curchar = parsestart; *curchar; curchar++) {
 				if (*curchar == '"') {
 					/* quote_open cannot be true if there
@@ -398,7 +398,7 @@
 					/* check if table name specified */
 					if (!strncmp(param_buffer, "-t", 3)
                                             || !strncmp(param_buffer, "--table", 8)) {
-						exit_error(PARAMETER_PROBLEM, 
+						exit_error(PARAMETER_PROBLEM,
 						   "Line %u seems to have a "
 						   "-t table option.\n", line);
 						exit(1);
@@ -417,7 +417,7 @@
 			for (a = 0; a < newargc; a++)
 				DEBUGP("argv[%u]: %s\n", a, newargv[a]);
 
-			ret = do_command6(newargc, newargv, 
+			ret = do_command6(newargc, newargv,
 					 &newargv[2], &handle);
 
 			free_argv();

Modified: trunk/iptables/ip6tables-save.c
===================================================================
--- trunk/iptables/ip6tables-save.c	2008-01-29 13:40:11 UTC (rev 7300)
+++ trunk/iptables/ip6tables-save.c	2008-01-29 13:42:48 UTC (rev 7301)
@@ -2,7 +2,7 @@
 /* Author:  Andras Kis-Szabo <kisza at sch.bme.hu>
  * Original code: iptables-save
  * Authors: Paul 'Rusty' Russel <rusty at linuxcare.com.au> and
- * 	    Harald Welte <laforge at gnumonks.org>
+ *          Harald Welte <laforge at gnumonks.org>
  * This code is distributed under the terms of GNU GPL v2
  */
 #include <getopt.h>
@@ -49,7 +49,7 @@
 			if (iface[i] != '\0')
 				printf("%c", iface[i]);
 		} else {
-			/* we can access iface[i-1] here, because 
+			/* we can access iface[i-1] here, because
 			 * a few lines above we make sure that mask[0] != 0 */
 			if (iface[i-1] != '\0')
 				printf("+");
@@ -81,11 +81,11 @@
 		unsigned int i;
 		const char *invertstr = invert ? "! " : "";
 
-                struct protoent *pent = getprotobynumber(proto);
-                if (pent) {
+		struct protoent *pent = getprotobynumber(proto);
+		if (pent) {
 			printf("-p %s%s ",
 			       invertstr, pent->p_name);
-	                return;
+			return;
 		}
 
 		for (i = 0; i < sizeof(chain_protos)/sizeof(struct pprot); i++)
@@ -144,8 +144,8 @@
 
 /* We want this to be readable, so only print out neccessary fields.
  * Because that's the kind of world I want to live in.  */
-static void print_rule(const struct ip6t_entry *e, 
-		ip6tc_handle_t *h, const char *chain, int counters)
+static void print_rule(const struct ip6t_entry *e,
+		       ip6tc_handle_t *h, const char *chain, int counters)
 {
 	struct ip6t_entry_target *t;
 	const char *target_name;
@@ -159,7 +159,7 @@
 
 	/* Print IP part. */
 	print_ip("-s", &(e->ipv6.src), &(e->ipv6.smsk),
-			e->ipv6.invflags & IP6T_INV_SRCIP);	
+			e->ipv6.invflags & IP6T_INV_SRCIP);
 
 	print_ip("-d", &(e->ipv6.dst), &(e->ipv6.dmsk),
 			e->ipv6.invflags & IP6T_INV_DSTIP);
@@ -182,7 +182,7 @@
 
 	if (e->ipv6.flags & IP6T_F_TOS)
 		printf("%s-? %d ",
-		       e->ipv6.invflags & IP6T_INV_TOS ? "! " : "", 
+		       e->ipv6.invflags & IP6T_INV_TOS ? "! " : "",
 		       e->ipv6.tos);
 
 	/* Print matchinfo part */
@@ -190,7 +190,7 @@
 		IP6T_MATCH_ITERATE(e, print_match, &e->ipv6);
 	}
 
-	/* Print target name */	
+	/* Print target name */
 	target_name = ip6tc_get_target(e, h);
 	if (target_name && (*target_name != '\0'))
 		printf("-j %s ", target_name);
@@ -213,7 +213,7 @@
 			/* If the target size is greater than ip6t_entry_target
 			 * there is something to be saved, we just don't know
 			 * how to print it */
-			if (t->u.target_size != 
+			if (t->u.target_size !=
 			    sizeof(struct ip6t_entry_target)) {
 				fprintf(stderr, "Target `%s' is missing "
 						"save function\n",
@@ -228,7 +228,7 @@
 /* Debugging prototype. */
 static int for_each_table(int (*func)(const char *tablename))
 {
-        int ret = 1;
+	int ret = 1;
 	FILE *procfile = NULL;
 	char tablename[IP6T_TABLE_MAXNAMELEN+1];
 
@@ -249,8 +249,8 @@
 
 	return ret;
 }
-	
 
+
 static int do_output(const char *tablename)
 {
 	ip6tc_handle_t h;
@@ -261,7 +261,7 @@
 
 	h = ip6tc_init(tablename);
 	if (!h)
- 		exit_error(OTHER_PROBLEM, "Can't initialize: %s\n",
+		exit_error(OTHER_PROBLEM, "Can't initialize: %s\n",
 			   ip6tc_strerror(errno));
 
 	if (!binary) {
@@ -271,7 +271,7 @@
 		       IPTABLES_VERSION, ctime(&now));
 		printf("*%s\n", tablename);
 
-		/* Dump out chain names first, 
+		/* Dump out chain names first,
 		 * thereby preventing dependency conflicts */
 		for (chain = ip6tc_first_chain(&h);
 		     chain;

Modified: trunk/iptables/ip6tables.c
===================================================================
--- trunk/iptables/ip6tables.c	2008-01-29 13:40:11 UTC (rev 7300)
+++ trunk/iptables/ip6tables.c	2008-01-29 13:42:48 UTC (rev 7301)
@@ -337,8 +337,8 @@
 "  --set-counters PKTS BYTES	set the counter during insert/append\n"
 "[!] --version	-V		print package version.\n");
 
-	/* Print out any special helps. A user might like to be able to add a --help 
-	   to the commandline, and see expected results. So we call help for all 
+	/* Print out any special helps. A user might like to be able to add a --help
+	   to the commandline, and see expected results. So we call help for all
 	   specified matches & targets */
 	for (t = xtables_targets; t; t = t->next) {
 		if (t->used) {
@@ -495,7 +495,7 @@
 
 		/* first deal with the special case of 'all' to prevent
 		 * people from being able to redefine 'all' in nsswitch
-		 * and/or provoke expensive [not working] ldap/nis/... 
+		 * and/or provoke expensive [not working] ldap/nis/...
 		 * lookups */
 		if (!strcmp(s, "all"))
 			return 0;
@@ -802,7 +802,7 @@
 	}
 
 	fputc(fw->ipv6.invflags & IP6T_INV_SRCIP ? '!' : ' ', stdout);
-	if (!memcmp(&fw->ipv6.smsk, &in6addr_any, sizeof in6addr_any) 
+	if (!memcmp(&fw->ipv6.smsk, &in6addr_any, sizeof in6addr_any)
 	    && !(format & FMT_NUMERIC))
 		printf(FMT("%-19s ","%s "), "anywhere");
 	else {
@@ -950,7 +950,7 @@
 		mptr += IP6T_ALIGN(sizeof(struct ip6t_entry_match)) + matchp->match->size;
 	}
 
-	memset(mptr, 0xFF, 
+	memset(mptr, 0xFF,
 	       IP6T_ALIGN(sizeof(struct ip6t_entry_target))
 	       + xtables_targets->userspacesize);
 
@@ -991,7 +991,7 @@
 for_each_chain(int (*fn)(const ip6t_chainlabel, int, ip6tc_handle_t *),
 	       int verbose, int builtinstoo, ip6tc_handle_t *handle)
 {
-        int ret = 1;
+	int ret = 1;
 	const char *chain;
 	char *chains;
 	unsigned int i, chaincount = 0;
@@ -1000,7 +1000,7 @@
 	while (chain) {
 		chaincount++;
 		chain = ip6tc_next_chain(handle);
-        }
+	}
 
 	chains = fw_malloc(sizeof(ip6t_chainlabel) * chaincount);
 	i = 0;
@@ -1009,18 +1009,18 @@
 		strcpy(chains + i*sizeof(ip6t_chainlabel), chain);
 		i++;
 		chain = ip6tc_next_chain(handle);
-        }
+	}
 
 	for (i = 0; i < chaincount; i++) {
 		if (!builtinstoo
 		    && ip6tc_builtin(chains + i*sizeof(ip6t_chainlabel),
 				    *handle) == 1)
 			continue;
-	        ret &= fn(chains + i*sizeof(ip6t_chainlabel), verbose, handle);
+		ret &= fn(chains + i*sizeof(ip6t_chainlabel), verbose, handle);
 	}
 
 	free(chains);
-        return ret;
+	return ret;
 }
 
 int
@@ -1055,7 +1055,7 @@
 		return for_each_chain(delete_chain, verbose, 0, handle);
 
 	if (verbose)
-	        fprintf(stdout, "Deleting chain `%s'\n", chain);
+		fprintf(stdout, "Deleting chain `%s'\n", chain);
 	return ip6tc_delete_chain(chain, handle);
 }
 
@@ -1367,7 +1367,7 @@
 			    && (fw.ipv6.invflags & IP6T_INV_PROTO))
 				exit_error(PARAMETER_PROBLEM,
 					   "rule would never match protocol");
-			
+
 			if (is_exthdr(fw.ipv6.proto)
 			    && (fw.ipv6.invflags & IP6T_INV_PROTO) == 0)
 				fprintf(stderr,
@@ -1542,7 +1542,7 @@
 					       &target->tflags,
 					       &fw, &target->t))) {
 				for (matchp = matches; matchp; matchp = matchp->next) {
-					if (matchp->completed) 
+					if (matchp->completed)
 						continue;
 					if (matchp->match->parse(c - matchp->match->option_offset,
 						     argv, invert,
@@ -1579,7 +1579,7 @@
 				if (m == NULL
 				    && protocol
 				    && (!find_proto(protocol, DONT_LOAD,
-						   options&OPT_NUMERIC, NULL) 
+						   options&OPT_NUMERIC, NULL)
 					|| (find_proto(protocol, DONT_LOAD,
 							options&OPT_NUMERIC, NULL)
 					    && (proto_used == 0))
@@ -1588,7 +1588,7 @@
 						       options&OPT_NUMERIC, &matches))) {
 					/* Try loading protocol */
 					size_t size;
-					
+
 					proto_used = 1;
 
 					size = IP6T_ALIGN(sizeof(struct ip6t_entry_match))

Modified: trunk/iptables/iptables-restore.c
===================================================================
--- trunk/iptables/iptables-restore.c	2008-01-29 13:40:11 UTC (rev 7300)
+++ trunk/iptables/iptables-restore.c	2008-01-29 13:42:48 UTC (rev 7301)
@@ -1,4 +1,4 @@
-/* Code to restore the iptables state, from file by iptables-save. 
+/* Code to restore the iptables state, from file by iptables-save.
  * (C) 2000-2002 by Harald Welte <laforge at gnumonks.org>
  * based on previous code from Rusty Russell <rusty at linuxcare.com.au>
  *
@@ -19,7 +19,7 @@
 #ifdef DEBUG
 #define DEBUGP(x, args...) fprintf(stderr, x, ## args)
 #else
-#define DEBUGP(x, args...) 
+#define DEBUGP(x, args...)
 #endif
 
 static int binary = 0, counters = 0, verbose = 0, noflush = 0;
@@ -49,8 +49,8 @@
 			"	   [ --help ]\n"
 			"	   [ --noflush ]\n"
 			"	   [ --table=<TABLE> ]\n"
-		        "          [ --modprobe=<command>]\n", name);
-		
+			"          [ --modprobe=<command>]\n", name);
+
 	exit(1);
 }
 
@@ -168,7 +168,7 @@
 				break;
 		}
 	}
-	
+
 	if (optind == argc - 1) {
 		in = fopen(argv[optind], "r");
 		if (!in) {
@@ -182,7 +182,7 @@
 		exit(1);
 	}
 	else in = stdin;
-	
+
 	/* Grab standard input. */
 	while (fgets(buffer, sizeof(buffer), in)) {
 		int ret = 0;
@@ -210,7 +210,7 @@
 			table = strtok(buffer+1, " \t\n");
 			DEBUGP("line %u, table '%s'\n", line, table);
 			if (!table) {
-				exit_error(PARAMETER_PROBLEM, 
+				exit_error(PARAMETER_PROBLEM,
 					"%s: line %u table name invalid\n",
 					program_name, line);
 				exit(1);
@@ -227,12 +227,12 @@
 			if (noflush == 0) {
 				DEBUGP("Cleaning all chains of table '%s'\n",
 					table);
-				for_each_chain(flush_entries, verbose, 1, 
+				for_each_chain(flush_entries, verbose, 1,
 						&handle);
-	
+
 				DEBUGP("Deleting all user-defined chains "
 				       "of table '%s'\n", table);
-				for_each_chain(delete_chain, verbose, 0, 
+				for_each_chain(delete_chain, verbose, 0,
 						&handle) ;
 			}
 
@@ -292,7 +292,7 @@
 							   "for chain '%s'\n", chain);
 
 				} else {
-					memset(&count, 0, 
+					memset(&count, 0,
 					       sizeof(struct ipt_counters));
 				}
 
@@ -355,7 +355,7 @@
 			add_argv(argv[0]);
 			add_argv("-t");
 			add_argv((char *) &curtable);
-			
+
 			if (counters && pcnt && bcnt) {
 				add_argv("--set-counters");
 				add_argv((char *) pcnt);
@@ -368,7 +368,7 @@
 
 			quote_open = 0;
 			param_len = 0;
-			
+
 			for (curchar = parsestart; *curchar; curchar++) {
 				char param_buffer[1024];
 
@@ -404,8 +404,8 @@
 
 					/* check if table name specified */
 					if (!strncmp(param_buffer, "-t", 3)
-                                            || !strncmp(param_buffer, "--table", 8)) {
-						exit_error(PARAMETER_PROBLEM, 
+					    || !strncmp(param_buffer, "--table", 8)) {
+						exit_error(PARAMETER_PROBLEM,
 						   "Line %u seems to have a "
 						   "-t table option.\n", line);
 						exit(1);
@@ -430,7 +430,7 @@
 					param_buffer[param_len++] = *curchar;
 
 					if (param_len >= sizeof(param_buffer))
-						exit_error(PARAMETER_PROBLEM, 
+						exit_error(PARAMETER_PROBLEM,
 						   "Parameter too long!");
 				}
 			}
@@ -441,7 +441,7 @@
 			for (a = 0; a < newargc; a++)
 				DEBUGP("argv[%u]: %s\n", a, newargv[a]);
 
-			ret = do_command(newargc, newargv, 
+			ret = do_command(newargc, newargv,
 					 &newargv[2], &handle);
 
 			free_argv();

Modified: trunk/iptables/iptables-save.c
===================================================================
--- trunk/iptables/iptables-save.c	2008-01-29 13:40:11 UTC (rev 7300)
+++ trunk/iptables/iptables-save.c	2008-01-29 13:42:48 UTC (rev 7301)
@@ -55,7 +55,7 @@
 			if (iface[i] != '\0')
 				printf("%c", iface[i]);
 		} else {
-			/* we can access iface[i-1] here, because 
+			/* we can access iface[i-1] here, because
 			 * a few lines above we make sure that mask[0] != 0 */
 			if (iface[i-1] != '\0')
 				printf("+");
@@ -172,7 +172,7 @@
 
 /* We want this to be readable, so only print out neccessary fields.
  * Because that's the kind of world I want to live in.  */
-static void print_rule(const struct ipt_entry *e, 
+static void print_rule(const struct ipt_entry *e,
 		iptc_handle_t *h, const char *chain, int counters)
 {
 	struct ipt_entry_target *t;
@@ -187,7 +187,7 @@
 
 	/* Print IP part. */
 	print_ip("-s", e->ip.src.s_addr,e->ip.smsk.s_addr,
-			e->ip.invflags & IPT_INV_SRCIP);	
+			e->ip.invflags & IPT_INV_SRCIP);
 
 	print_ip("-d", e->ip.dst.s_addr, e->ip.dmsk.s_addr,
 			e->ip.invflags & IPT_INV_DSTIP);
@@ -209,7 +209,7 @@
 		IPT_MATCH_ITERATE(e, print_match, &e->ip);
 	}
 
-	/* Print target name */	
+	/* Print target name */
 	target_name = iptc_get_target(e, h);
 	if (target_name && (*target_name != '\0'))
 #ifdef IPT_F_GOTO
@@ -236,7 +236,7 @@
 			/* If the target size is greater than ipt_entry_target
 			 * there is something to be saved, we just don't know
 			 * how to print it */
-			if (t->u.target_size != 
+			if (t->u.target_size !=
 			    sizeof(struct ipt_entry_target)) {
 				fprintf(stderr, "Target `%s' is missing "
 						"save function\n",
@@ -251,7 +251,7 @@
 /* Debugging prototype. */
 static int for_each_table(int (*func)(const char *tablename))
 {
-        int ret = 1;
+	int ret = 1;
 	FILE *procfile = NULL;
 	char tablename[IPT_TABLE_MAXNAMELEN+1];
 
@@ -272,8 +272,8 @@
 
 	return ret;
 }
-	
 
+
 static int do_output(const char *tablename)
 {
 	iptc_handle_t h;
@@ -284,7 +284,7 @@
 
 	h = iptc_init(tablename);
 	if (!h)
- 		exit_error(OTHER_PROBLEM, "Can't initialize: %s\n",
+		exit_error(OTHER_PROBLEM, "Can't initialize: %s\n",
 			   iptc_strerror(errno));
 
 	if (!binary) {
@@ -294,12 +294,12 @@
 		       IPTABLES_VERSION, ctime(&now));
 		printf("*%s\n", tablename);
 
-		/* Dump out chain names first, 
+		/* Dump out chain names first,
 		 * thereby preventing dependency conflicts */
 		for (chain = iptc_first_chain(&h);
 		     chain;
 		     chain = iptc_next_chain(&h)) {
-			
+
 			printf(":%s ", chain);
 			if (iptc_builtin(chain, h)) {
 				struct ipt_counters count;
@@ -310,8 +310,8 @@
 				printf("- [0:0]\n");
 			}
 		}
-				
 
+
 		for (chain = iptc_first_chain(&h);
 		     chain;
 		     chain = iptc_next_chain(&h)) {

Modified: trunk/iptables/iptables.c
===================================================================
--- trunk/iptables/iptables.c	2008-01-29 13:40:11 UTC (rev 7300)
+++ trunk/iptables/iptables.c	2008-01-29 13:42:48 UTC (rev 7301)
@@ -1058,7 +1058,7 @@
 		return for_each_chain(delete_chain, verbose, 0, handle);
 
 	if (verbose)
-	        fprintf(stdout, "Deleting chain `%s'\n", chain);
+		fprintf(stdout, "Deleting chain `%s'\n", chain);
 	return iptc_delete_chain(chain, handle);
 }
 
@@ -1180,7 +1180,7 @@
 	if (uname(&uts) == -1) {
 		fprintf(stderr, "Unable to retrieve kernel version.\n");
 		free_opts(1);
-		exit(1); 
+		exit(1);
 	}
 
 	sscanf(uts.release, "%d.%d.%d", &x, &y, &z);
@@ -1337,7 +1337,7 @@
 				newname = argv[optind++];
 			else
 				exit_error(PARAMETER_PROBLEM,
-				           "-%c requires old-chain-name and "
+					   "-%c requires old-chain-name and "
 					   "new-chain-name",
 					    cmd2char(CMD_RENAME_CHAIN));
 			break;
@@ -1429,8 +1429,8 @@
 					     target->revision);
 				if (target->init != NULL)
 					target->init(target->t);
-				opts = merge_options(opts, 
-						     target->extra_opts, 
+				opts = merge_options(opts,
+						     target->extra_opts,
 						     &target->option_offset);
 				if (opts == NULL)
 					exit_error(OTHER_PROBLEM,
@@ -1488,8 +1488,8 @@
 				m->init(m->m);
 			if (m != m->next) {
 				/* Merge options for non-cloned matches */
-				opts = merge_options(opts, 
-						     m->extra_opts, 
+				opts = merge_options(opts,
+						     m->extra_opts,
 						     &m->option_offset);
 				if (opts == NULL)
 					exit_error(OTHER_PROBLEM,
@@ -1579,7 +1579,7 @@
 					       &target->tflags,
 					       &fw, &target->t))) {
 				for (matchp = matches; matchp; matchp = matchp->next) {
-					if (matchp->completed) 
+					if (matchp->completed)
 						continue;
 					if (matchp->match->parse(c - matchp->match->option_offset,
 						     argv, invert,
@@ -1616,7 +1616,7 @@
 				if (m == NULL
 				    && protocol
 				    && (!find_proto(protocol, DONT_LOAD,
-						   options&OPT_NUMERIC, NULL) 
+						   options&OPT_NUMERIC, NULL)
 					|| (find_proto(protocol, DONT_LOAD,
 							options&OPT_NUMERIC, NULL)
 					    && (proto_used == 0))
@@ -1625,7 +1625,7 @@
 						       options&OPT_NUMERIC, &matches))) {
 					/* Try loading protocol */
 					size_t size;
-					
+
 					proto_used = 1;
 
 					size = IPT_ALIGN(sizeof(struct ipt_entry_match))
@@ -1640,7 +1640,7 @@
 						m->init(m->m);
 
 					opts = merge_options(opts,
-							     m->extra_opts, 
+							     m->extra_opts,
 							     &m->option_offset);
 					if (opts == NULL)
 						exit_error(OTHER_PROBLEM,
@@ -1685,11 +1685,11 @@
 
 	if (shostnetworkmask)
 		ipparse_hostnetworkmask(shostnetworkmask, &saddrs,
-		                        &fw.ip.smsk, &nsaddrs);
+					&fw.ip.smsk, &nsaddrs);
 
 	if (dhostnetworkmask)
 		ipparse_hostnetworkmask(dhostnetworkmask, &daddrs,
-		                        &fw.ip.dmsk, &ndaddrs);
+					&fw.ip.dmsk, &ndaddrs);
 
 	if ((nsaddrs > 1 || ndaddrs > 1) &&
 	    (fw.ip.invflags & (IPT_INV_SRCIP | IPT_INV_DSTIP)))




More information about the netfilter-cvslog mailing list