summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'extensions')
-rw-r--r--extensions/libipt_LOG.c4
-rw-r--r--extensions/libipt_MARK.c8
-rw-r--r--extensions/libipt_REJECT.c34
-rw-r--r--extensions/libipt_TOS.c12
-rw-r--r--extensions/libipt_limit.c2
-rw-r--r--extensions/libipt_mark.c2
-rw-r--r--extensions/libipt_tos.c6
7 files changed, 34 insertions, 34 deletions
diff --git a/extensions/libipt_LOG.c b/extensions/libipt_LOG.c
index cab5739d..ce4adb23 100644
--- a/extensions/libipt_LOG.c
+++ b/extensions/libipt_LOG.c
@@ -113,7 +113,7 @@ parse(int c, char **argv, int invert, unsigned int *flags,
if (*flags & IPT_LOG_OPT_LEVEL)
exit_error(PARAMETER_PROBLEM,
"Can't specify --log-level twice");
-
+
if (check_inverse(optarg, &invert))
exit_error(PARAMETER_PROBLEM,
"Unexpected `!' after --log-level");
@@ -126,7 +126,7 @@ parse(int c, char **argv, int invert, unsigned int *flags,
if (*flags & IPT_LOG_OPT_PREFIX)
exit_error(PARAMETER_PROBLEM,
"Can't specify --log-prefix twice");
-
+
if (check_inverse(optarg, &invert))
exit_error(PARAMETER_PROBLEM,
"Unexpected `!' after --log-prefix");
diff --git a/extensions/libipt_MARK.c b/extensions/libipt_MARK.c
index ef5a60d5..a7cb60c0 100644
--- a/extensions/libipt_MARK.c
+++ b/extensions/libipt_MARK.c
@@ -56,7 +56,7 @@ parse(int c, char **argv, int invert, unsigned int *flags,
"MARK target: Can't specify --set-mark twice");
*flags = 1;
break;
-
+
default:
return 0;
}
@@ -87,7 +87,7 @@ print(const struct ipt_ip *ip,
const struct ipt_mark_target_info *markinfo =
(const struct ipt_mark_target_info *)target->data;
printf("MARK set ");
- print_mark(markinfo->mark, numeric);
+ print_mark(markinfo->mark, numeric);
}
/* Saves the union ipt_targinfo in parsable form to stdout. */
@@ -96,8 +96,8 @@ save(const struct ipt_ip *ip, const struct ipt_entry_target *target)
{
const struct ipt_mark_target_info *markinfo =
(const struct ipt_mark_target_info *)target->data;
-
- printf("--set-mark 0x%lx ", markinfo->mark);
+
+ printf("--set-mark 0x%lx ", markinfo->mark);
}
struct iptables_target mark
diff --git a/extensions/libipt_REJECT.c b/extensions/libipt_REJECT.c
index e3365873..f174c6a3 100644
--- a/extensions/libipt_REJECT.c
+++ b/extensions/libipt_REJECT.c
@@ -18,7 +18,7 @@ struct reject_names {
};
static const struct reject_names reject_table[] = {
- {"icmp-net-unreachable", "net-unreach",
+ {"icmp-net-unreachable", "net-unreach",
IPT_ICMP_NET_UNREACHABLE, "ICMP network unreachable"},
{"icmp-host-unreachable", "host-unreach",
IPT_ICMP_HOST_UNREACHABLE, "ICMP host unreachable"},
@@ -26,17 +26,17 @@ static const struct reject_names reject_table[] = {
IPT_ICMP_PORT_UNREACHABLE, "ICMP port unreachable (default)"},
{"icmp-proto-unreachable", "proto-unreach",
IPT_ICMP_PROT_UNREACHABLE, "ICMP protocol unreachable"},
- {"tcp-reset", "rst",
+ {"tcp-reset", "rst",
IPT_TCP_RESET, "for TCP only: faked TCP RST"},
{"echo-reply", "echoreply",
IPT_ICMP_ECHOREPLY, "for ICMP echo only: faked ICMP echo reply"},
};
-static void
+static void
print_reject_types()
{
unsigned int i;
-
+
printf("Valid reject types:\n");
for (i = 0; i < sizeof(reject_table)/sizeof(struct reject_names); i++) {
@@ -49,7 +49,7 @@ print_reject_types()
/* Saves the union ipt_targinfo in parsable form to stdout. */
/* Function which prints out usage message. */
-static void
+static void
help(void)
{
printf(
@@ -70,10 +70,10 @@ static void
init(struct ipt_entry_target *t, unsigned int *nfcache)
{
struct ipt_reject_info *reject = (struct ipt_reject_info *)t->data;
-
+
/* default */
reject->with = IPT_ICMP_PORT_UNREACHABLE;
-
+
/* Can't cache this */
*nfcache |= NFC_UNKNOWN;
}
@@ -84,15 +84,15 @@ static int
parse(int c, char **argv, int invert, unsigned int *flags,
const struct ipt_entry *entry,
struct ipt_entry_target **target)
-{
+{
struct ipt_reject_info *reject = (struct ipt_reject_info *)(*target)->data;
unsigned int limit = sizeof(reject_table)/sizeof(struct reject_names);
unsigned int i;
-
+
switch(c) {
case '1':
if (check_inverse(optarg, &invert))
- exit_error(PARAMETER_PROBLEM,
+ exit_error(PARAMETER_PROBLEM,
"Unexpected `!' after --reject-with");
for (i = 0; i < limit; i++) {
if ((strncasecmp(reject_table[i].name, optarg, strlen(optarg)) == 0)
@@ -106,7 +106,7 @@ parse(int c, char **argv, int invert, unsigned int *flags,
/* Fall through */
}
return 0;
-}
+}
/* Final check; nothing. */
static void final_check(unsigned int flags)
@@ -114,15 +114,15 @@ static void final_check(unsigned int flags)
}
/* Prints out ipt_reject_info. */
-static void
+static void
print(const struct ipt_ip *ip,
- const struct ipt_entry_target *target,
+ const struct ipt_entry_target *target,
int numeric)
{
- const struct ipt_reject_info *reject
+ const struct ipt_reject_info *reject
= (const struct ipt_reject_info *)target->data;
unsigned int i;
-
+
for (i = 0; i < sizeof(reject_table)/sizeof(struct reject_names); i++) {
if (reject_table[i].with == reject->with)
break;
@@ -133,9 +133,9 @@ print(const struct ipt_ip *ip,
/* Saves ipt_reject in parsable form to stdout. */
static void save(const struct ipt_ip *ip, const struct ipt_entry_target *target)
{
- const struct ipt_reject_info *reject
+ const struct ipt_reject_info *reject
= (const struct ipt_reject_info *)target->data;
-
+
printf("--reject-with %s ", reject_table[reject->with].name);
}
diff --git a/extensions/libipt_TOS.c b/extensions/libipt_TOS.c
index 4a8e91ba..f01fc264 100644
--- a/extensions/libipt_TOS.c
+++ b/extensions/libipt_TOS.c
@@ -31,7 +31,7 @@ static void
help(void)
{
unsigned int i;
-
+
printf(
"TOS target v%s options:\n"
" --set-tos value Set Type of Service field to one of the\n"
@@ -100,7 +100,7 @@ parse(int c, char **argv, int invert, unsigned int *flags,
parse_tos(optarg, tosinfo);
*flags = 1;
break;
-
+
default:
return 0;
}
@@ -120,7 +120,7 @@ static void
print_tos(u_int8_t tos, int numeric)
{
unsigned int i;
-
+
if (!numeric) {
for (i = 0; i<sizeof(TOS_values)/sizeof(struct TOS_value); i++)
if (TOS_values[i].TOS == tos) {
@@ -140,7 +140,7 @@ print(const struct ipt_ip *ip,
const struct ipt_tos_target_info *tosinfo =
(const struct ipt_tos_target_info *)target->data;
printf("TOS set ");
- print_tos(tosinfo->tos, numeric);
+ print_tos(tosinfo->tos, numeric);
}
/* Saves the union ipt_targinfo in parsable form to stdout. */
@@ -149,8 +149,8 @@ save(const struct ipt_ip *ip, const struct ipt_entry_target *target)
{
const struct ipt_tos_target_info *tosinfo =
(const struct ipt_tos_target_info *)target->data;
-
- printf("--set-tos 0x%02x ", tosinfo->tos);
+
+ printf("--set-tos 0x%02x ", tosinfo->tos);
}
struct iptables_target tos
diff --git a/extensions/libipt_limit.c b/extensions/libipt_limit.c
index aed63059..b6cc74f2 100644
--- a/extensions/libipt_limit.c
+++ b/extensions/libipt_limit.c
@@ -107,7 +107,7 @@ parse(int c, char **argv, int invert, unsigned int *flags,
if (!parse_rate(optarg, &r->avg))
exit_error(PARAMETER_PROBLEM,
"bad rate `%s'", optarg);
- break;
+ break;
case '$':
if (check_inverse(optarg, &invert))
diff --git a/extensions/libipt_mark.c b/extensions/libipt_mark.c
index 318cd94d..dcf54488 100644
--- a/extensions/libipt_mark.c
+++ b/extensions/libipt_mark.c
@@ -70,7 +70,7 @@ print_mark(unsigned long mark, unsigned long mask, int invert, int numeric)
{
if (invert)
fputc('!', stdout);
-
+
if(mask != 0xffffffff)
printf("0x%lx/0x%lx ", mark, mask);
else
diff --git a/extensions/libipt_tos.c b/extensions/libipt_tos.c
index eb62081e..6d2d7724 100644
--- a/extensions/libipt_tos.c
+++ b/extensions/libipt_tos.c
@@ -26,7 +26,7 @@ static void
help(void)
{
unsigned int i;
-
+
printf(
"TOS match v%s options:\n"
"[!] --tos value Match Type of Service field from one of the\n"
@@ -108,10 +108,10 @@ static void
print_tos(u_int8_t tos, int invert, int numeric)
{
unsigned int i;
-
+
if (invert)
fputc('!', stdout);
-
+
if (!numeric) {
for (i = 0; i<sizeof(TOS_values)/sizeof(struct TOS_value); i++)
if (TOS_values[i].TOS == tos) {