diff mbox

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

Message ID 1394726481-6001-3-git-send-email-jpopelka@redhat.com
State Not Applicable
Headers show

Commit Message

Jiri Popelka March 13, 2014, 4:01 p.m. UTC
---
 iptables/ip6tables-save.c | 2 +-
 iptables/iptables-save.c  | 2 +-
 iptables/xtables-save.c   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Comments

Pablo Neira Ayuso March 14, 2014, 8:44 a.m. UTC | #1
Hi Jiri,

On Thu, Mar 13, 2014 at 05:01:21PM +0100, Jiri Popelka wrote:
> ---
>  iptables/ip6tables-save.c | 2 +-
>  iptables/iptables-save.c  | 2 +-
>  iptables/xtables-save.c   | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/iptables/ip6tables-save.c b/iptables/ip6tables-save.c
> index a86a64a..cf56c63 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, "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.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/iptables/ip6tables-save.c b/iptables/ip6tables-save.c
index a86a64a..cf56c63 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, "cdt:M:", options, NULL)) != -1) {
 		switch (c) {
 		case 'c':
 			show_counters = 1;
diff --git a/iptables/iptables-save.c b/iptables/iptables-save.c
index 2999c7f..ed81dfd 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, "cdt:M:", options, NULL)) != -1) {
 		switch (c) {
 		case 'c':
 			show_counters = 1;
diff --git a/iptables/xtables-save.c b/iptables/xtables-save.c
index 42d2907..d732377 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, "cdt:M:46", options, NULL)) != -1) {
 		switch (c) {
 		case 'c':
 			show_counters = true;