Skip to contentSkip to conversation

iptables-restore(8): missing -T in synopsis

PATCH Applied Jiri Popelka 2 participants 6 messages Mar 13, 2014 – Mar 14, 2014 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 iptables-restore(8): missing -T in synopsis

---
 iptables/iptables-restore.8.in | 1 +
 1 file changed, 1 insertion(+)
iptables/iptables-restore.8.in +1 -0
index feb57ef..4ad7a52 100644
@@ -24,6 +24,7 @@ iptables-restore \(em Restore IP Tables
 ip6tables-restore \(em Restore IPv6 Tables
 .SH SYNOPSIS
 \fBiptables\-restore\fP [\fB\-chntv\fP] [\fB\-M\fP \fImodprobe\fP]
+[\fB\-T\fP \fIname\fP]
 .P
 \fBip6tables\-restore\fP [\fB\-chntv\fP] [\fB\-M\fP \fImodprobe\fP]
 [\fB\-T\fP \fIname\fP]
Signature · 1 line
1.8.5.3
#1 lore raw

PATCH 2/3 iptables-restore(8): file to read from can be specified as argument

original bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=1022228

---
 iptables/iptables-restore.8.in | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
iptables/iptables-restore.8.in +5 -4
index 4ad7a52..7a286b9 100644
@@ -24,17 +24,18 @@ iptables-restore \(em Restore IP Tables
 ip6tables-restore \(em Restore IPv6 Tables
 .SH SYNOPSIS
 \fBiptables\-restore\fP [\fB\-chntv\fP] [\fB\-M\fP \fImodprobe\fP]
-[\fB\-T\fP \fIname\fP]
+[\fB\-T\fP \fIname\fP] [\fBfile\fP]
 .P
 \fBip6tables\-restore\fP [\fB\-chntv\fP] [\fB\-M\fP \fImodprobe\fP]
-[\fB\-T\fP \fIname\fP]
+[\fB\-T\fP \fIname\fP] [\fBfile\fP]
 .SH DESCRIPTION
 .PP
 .B iptables-restore
 and
 .B ip6tables-restore
-are used to restore IP and IPv6 Tables from data specified on STDIN. Use
-I/O redirection provided by your shell to read from a file
+are used to restore IP and IPv6 Tables from data specified on STDIN or in
+\fIfile\fP. Use I/O redirection provided by your shell to read from a file or
+specify \fIfile\fP as an argument.
 .TP
 \fB\-c\fR, \fB\-\-counters\fR
 restore the values of all packet and byte counters
Signature · 1 line
1.8.5.3
#3 lore raw

PATCH 3/3 iptables: save - fix getopt_long()'s optstring

In reply to Jiri Popelka
---
 iptables/ip6tables-save.c | 2 +-
 iptables/iptables-save.c  | 2 +-
 iptables/xtables-save.c   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
iptables/ip6tables-save.c +1 -1
index a86a64a..cf56c63 100644
@@ -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, "cdt:M:", options, NULL)) != -1) {
 		switch (c) {
 		case 'c':
 			show_counters = 1;
iptables/iptables-save.c +1 -1
index 2999c7f..ed81dfd 100644
@@ -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, "cdt:M:", options, NULL)) != -1) {
 		switch (c) {
 		case 'c':
 			show_counters = 1;
iptables/xtables-save.c +1 -1
index 42d2907..d732377 100644
@@ -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, "cdt:M:46", options, NULL)) != -1) {
 		switch (c) {
 		case 'c':
 			show_counters = true;
Signature · 1 line
1.8.5.3
#4 lore raw

Re: [PATCH 3/3] iptables: save - fix getopt_long()'s optstring

Hi Jiri,

Quoted 11 lines · Jiri Popelka
---
 iptables/ip6tables-save.c | 2 +-
 iptables/iptables-save.c  | 2 +-
 iptables/xtables-save.c   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
iptables/ip6tables-save.c +0 -0
index a86a64a..cf56c63 100644

iptables/ip6tables-save.c int ip6tables_save_main(int argc, char *argv[]) · line 140

Quoted 5 lines
iptables/ip6tables-save.c +1 -1
@@ -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, "cdt:M:", options, NULL)) != -1) {

b is also removed.

My bet is that noone is using that, but just to make sure we break some stupid script somewhere, just leave it there and add some warning message to indicate that you can remove from your scripts. Thanks.