* [PATCH 1/2] iptables: save&restore: warn that -b/--binary isn't implemented
@ 2014-03-14 11:52 Jiri Popelka
2014-03-14 11:52 ` [PATCH 2/2] iptables: save: actually parse -M/--modprobe option Jiri Popelka
2014-03-17 11:49 ` [PATCH 1/2] iptables: save&restore: warn that -b/--binary isn't implemented Pablo Neira Ayuso
0 siblings, 2 replies; 4+ messages in thread
From: Jiri Popelka @ 2014-03-14 11:52 UTC (permalink / raw)
To: netfilter-devel; +Cc: Jiri Popelka
see also 296dca39be
---
iptables/ip6tables-restore.c | 8 +++-----
iptables/ip6tables-save.c | 3 +++
iptables/iptables-restore.c | 8 +++-----
iptables/iptables-save.c | 3 +++
iptables/xtables-restore.c | 8 +++-----
iptables/xtables-save.c | 3 +++
6 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/iptables/ip6tables-restore.c b/iptables/ip6tables-restore.c
index b8b9e0d..0f4dd97 100644
--- a/iptables/ip6tables-restore.c
+++ b/iptables/ip6tables-restore.c
@@ -25,11 +25,10 @@
#define DEBUGP(x, args...)
#endif
-static int binary = 0, counters = 0, verbose = 0, noflush = 0;
+static int counters = 0, verbose = 0, noflush = 0;
/* Keeping track of external matches and targets. */
static const struct option options[] = {
- {.name = "binary", .has_arg = false, .val = 'b'},
{.name = "counters", .has_arg = false, .val = 'c'},
{.name = "verbose", .has_arg = false, .val = 'v'},
{.name = "test", .has_arg = false, .val = 't'},
@@ -44,8 +43,7 @@ static void print_usage(const char *name, const char *version) __attribute__((no
static void print_usage(const char *name, const char *version)
{
- fprintf(stderr, "Usage: %s [-b] [-c] [-v] [-t] [-h]\n"
- " [ --binary ]\n"
+ fprintf(stderr, "Usage: %s [-c] [-v] [-t] [-h]\n"
" [ --counters ]\n"
" [ --verbose ]\n"
" [ --test ]\n"
@@ -207,7 +205,7 @@ int ip6tables_restore_main(int argc, char *argv[])
while ((c = getopt_long(argc, argv, "bcvthnM:T:", options, NULL)) != -1) {
switch (c) {
case 'b':
- binary = 1;
+ fprintf(stderr, "-b/--binary option is not implemented\n");
break;
case 'c':
counters = 1;
diff --git a/iptables/ip6tables-save.c b/iptables/ip6tables-save.c
index a86a64a..16821da 100644
--- a/iptables/ip6tables-save.c
+++ b/iptables/ip6tables-save.c
@@ -139,6 +139,9 @@ int ip6tables_save_main(int argc, char *argv[])
while ((c = getopt_long(argc, argv, "bcdt:", options, NULL)) != -1) {
switch (c) {
+ case 'b':
+ fprintf(stderr, "-b/--binary option is not implemented\n");
+ break;
case 'c':
show_counters = 1;
break;
diff --git a/iptables/iptables-restore.c b/iptables/iptables-restore.c
index 8c942ff..261822d 100644
--- a/iptables/iptables-restore.c
+++ b/iptables/iptables-restore.c
@@ -22,11 +22,10 @@
#define DEBUGP(x, args...)
#endif
-static int binary = 0, counters = 0, verbose = 0, noflush = 0;
+static int counters = 0, verbose = 0, noflush = 0;
/* Keeping track of external matches and targets. */
static const struct option options[] = {
- {.name = "binary", .has_arg = false, .val = 'b'},
{.name = "counters", .has_arg = false, .val = 'c'},
{.name = "verbose", .has_arg = false, .val = 'v'},
{.name = "test", .has_arg = false, .val = 't'},
@@ -43,8 +42,7 @@ static void print_usage(const char *name, const char *version) __attribute__((no
static void print_usage(const char *name, const char *version)
{
- fprintf(stderr, "Usage: %s [-b] [-c] [-v] [-t] [-h]\n"
- " [ --binary ]\n"
+ fprintf(stderr, "Usage: %s [-c] [-v] [-t] [-h]\n"
" [ --counters ]\n"
" [ --verbose ]\n"
" [ --test ]\n"
@@ -207,7 +205,7 @@ iptables_restore_main(int argc, char *argv[])
while ((c = getopt_long(argc, argv, "bcvthnM:T:", options, NULL)) != -1) {
switch (c) {
case 'b':
- binary = 1;
+ fprintf(stderr, "-b/--binary option is not implemented\n");
break;
case 'c':
counters = 1;
diff --git a/iptables/iptables-save.c b/iptables/iptables-save.c
index 2999c7f..2c25b71 100644
--- a/iptables/iptables-save.c
+++ b/iptables/iptables-save.c
@@ -138,6 +138,9 @@ iptables_save_main(int argc, char *argv[])
while ((c = getopt_long(argc, argv, "bcdt:", options, NULL)) != -1) {
switch (c) {
+ case 'b':
+ fprintf(stderr, "-b/--binary option is not implemented\n");
+ break;
case 'c':
show_counters = 1;
break;
diff --git a/iptables/xtables-restore.c b/iptables/xtables-restore.c
index f7850bb..3cb095f 100644
--- a/iptables/xtables-restore.c
+++ b/iptables/xtables-restore.c
@@ -24,11 +24,10 @@
#define DEBUGP(x, args...)
#endif
-static int binary = 0, counters = 0, verbose = 0, noflush = 0;
+static int counters = 0, verbose = 0, noflush = 0;
/* Keeping track of external matches and targets. */
static const struct option options[] = {
- {.name = "binary", .has_arg = false, .val = 'b'},
{.name = "counters", .has_arg = false, .val = 'c'},
{.name = "verbose", .has_arg = false, .val = 'v'},
{.name = "test", .has_arg = false, .val = 't'},
@@ -47,8 +46,7 @@ static void print_usage(const char *name, const char *version) __attribute__((no
static void print_usage(const char *name, const char *version)
{
- fprintf(stderr, "Usage: %s [-b] [-c] [-v] [-t] [-h]\n"
- " [ --binary ]\n"
+ fprintf(stderr, "Usage: %s [-c] [-v] [-t] [-h]\n"
" [ --counters ]\n"
" [ --verbose ]\n"
" [ --test ]\n"
@@ -208,7 +206,7 @@ xtables_restore_main(int family, const char *progname, int argc, char *argv[])
while ((c = getopt_long(argc, argv, "bcvthnM:T:46", options, NULL)) != -1) {
switch (c) {
case 'b':
- binary = 1;
+ fprintf(stderr, "-b/--binary option is not implemented\n");
break;
case 'c':
counters = 1;
diff --git a/iptables/xtables-save.c b/iptables/xtables-save.c
index 42d2907..fe77283 100644
--- a/iptables/xtables-save.c
+++ b/iptables/xtables-save.c
@@ -106,6 +106,9 @@ xtables_save_main(int family, const char *progname, int argc, char *argv[])
while ((c = getopt_long(argc, argv, "bcdt:46", options, NULL)) != -1) {
switch (c) {
+ case 'b':
+ fprintf(stderr, "-b/--binary option is not implemented\n");
+ break;
case 'c':
show_counters = true;
break;
--
1.8.5.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] iptables: save: actually parse -M/--modprobe option
2014-03-14 11:52 [PATCH 1/2] iptables: save&restore: warn that -b/--binary isn't implemented Jiri Popelka
@ 2014-03-14 11:52 ` Jiri Popelka
2014-03-17 11:49 ` Pablo Neira Ayuso
2014-03-17 11:49 ` [PATCH 1/2] iptables: save&restore: warn that -b/--binary isn't implemented Pablo Neira Ayuso
1 sibling, 1 reply; 4+ messages in thread
From: Jiri Popelka @ 2014-03-14 11:52 UTC (permalink / raw)
To: netfilter-devel; +Cc: Jiri Popelka
---
iptables/ip6tables-save.c | 2 +-
iptables/iptables-save.8.in | 2 +-
iptables/iptables-save.c | 2 +-
iptables/xtables-save.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/iptables/ip6tables-save.c b/iptables/ip6tables-save.c
index 16821da..56e5afb 100644
--- a/iptables/ip6tables-save.c
+++ b/iptables/ip6tables-save.c
@@ -137,7 +137,7 @@ int ip6tables_save_main(int argc, char *argv[])
init_extensions6();
#endif
- while ((c = getopt_long(argc, argv, "bcdt:", options, NULL)) != -1) {
+ while ((c = getopt_long(argc, argv, "bcdt:M:", options, NULL)) != -1) {
switch (c) {
case 'b':
fprintf(stderr, "-b/--binary option is not implemented\n");
diff --git a/iptables/iptables-save.8.in b/iptables/iptables-save.8.in
index 6128280..7f99d8a 100644
--- a/iptables/iptables-save.8.in
+++ b/iptables/iptables-save.8.in
@@ -36,7 +36,7 @@ and
are used to dump the contents of IP or IPv6 Table in easily parseable format
to STDOUT. Use I/O-redirection provided by your shell to write to a file.
.TP
-\fB\-M\fP \fImodprobe_program\fP
+\fB\-M\fR, \fB\-\-modprobe\fR \fImodprobe_program\fP
Specify the path to the modprobe program. By default, iptables-save will
inspect /proc/sys/kernel/modprobe to determine the executable's path.
.TP
diff --git a/iptables/iptables-save.c b/iptables/iptables-save.c
index 2c25b71..bcf88ae 100644
--- a/iptables/iptables-save.c
+++ b/iptables/iptables-save.c
@@ -136,7 +136,7 @@ iptables_save_main(int argc, char *argv[])
init_extensions4();
#endif
- while ((c = getopt_long(argc, argv, "bcdt:", options, NULL)) != -1) {
+ while ((c = getopt_long(argc, argv, "bcdt:M:", options, NULL)) != -1) {
switch (c) {
case 'b':
fprintf(stderr, "-b/--binary option is not implemented\n");
diff --git a/iptables/xtables-save.c b/iptables/xtables-save.c
index fe77283..d51cdcf 100644
--- a/iptables/xtables-save.c
+++ b/iptables/xtables-save.c
@@ -104,7 +104,7 @@ xtables_save_main(int family, const char *progname, int argc, char *argv[])
exit(EXIT_FAILURE);
}
- while ((c = getopt_long(argc, argv, "bcdt:46", options, NULL)) != -1) {
+ while ((c = getopt_long(argc, argv, "bcdt:M:46", options, NULL)) != -1) {
switch (c) {
case 'b':
fprintf(stderr, "-b/--binary option is not implemented\n");
--
1.8.5.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] iptables: save&restore: warn that -b/--binary isn't implemented
2014-03-14 11:52 [PATCH 1/2] iptables: save&restore: warn that -b/--binary isn't implemented Jiri Popelka
2014-03-14 11:52 ` [PATCH 2/2] iptables: save: actually parse -M/--modprobe option Jiri Popelka
@ 2014-03-17 11:49 ` Pablo Neira Ayuso
1 sibling, 0 replies; 4+ messages in thread
From: Pablo Neira Ayuso @ 2014-03-17 11:49 UTC (permalink / raw)
To: Jiri Popelka; +Cc: netfilter-devel
Applied, thanks.
Please, Signed-off-by your userspace netfilter patches next time.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] iptables: save: actually parse -M/--modprobe option
2014-03-14 11:52 ` [PATCH 2/2] iptables: save: actually parse -M/--modprobe option Jiri Popelka
@ 2014-03-17 11:49 ` Pablo Neira Ayuso
0 siblings, 0 replies; 4+ messages in thread
From: Pablo Neira Ayuso @ 2014-03-17 11:49 UTC (permalink / raw)
To: Jiri Popelka; +Cc: netfilter-devel
Also applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-03-17 11:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-14 11:52 [PATCH 1/2] iptables: save&restore: warn that -b/--binary isn't implemented Jiri Popelka
2014-03-14 11:52 ` [PATCH 2/2] iptables: save: actually parse -M/--modprobe option Jiri Popelka
2014-03-17 11:49 ` Pablo Neira Ayuso
2014-03-17 11:49 ` [PATCH 1/2] iptables: save&restore: warn that -b/--binary isn't implemented Pablo Neira Ayuso
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.