libipt_condition.c and libip6t_condition.c
PATCH 1/1 libipt_condition.c and libip6t_condition.c
Harald,
the following two patches move the call to check_inverse() to a saner
place and surround the condition name by double-quotes in save().
Please apply.
Stephane.
userspace/extensions/libipt_condition.c +4 -3
@@ -1,3 +1,4 @@ +/* Shared library add-on to iptables for condition match */ #include <stdio.h> #include <stdlib.h> #include <string.h>
@@ -39,13 +40,13 @@struct condition_info *info = (struct condition_info *) (*match)->data; -check_inverse (optarg, &invert, &optind,0 ); -if (c =='X' ) {if (*flags)exit_error (PARAMETER_PROBLEM ,"Can't specify multiple conditions" ); +check_inverse (optarg, &invert, &optind,0 ); +if (strlen (argv[optind -1 ]) <CONDITION_NAME_LEN )strcpy (info->name, argv[optind -1 ]);else
@@ -88,7 +89,7 @@const struct condition_info *info = (const struct condition_info *) match->data; -printf ("--condition %s%s " , (info->invert) ?"! " :"" , info->name); +printf ("--condition %s\"%s\" " , (info->invert) ?"! " :"" , info->name); }
userspace/extensions/libip6t_condition.c +4 -3
@@ -1,3 +1,4 @@ +/* Shared library add-on to ip6tables for condition match */ #include <stdio.h> #include <stdlib.h> #include <string.h>
@@ -39,13 +40,13 @@struct condition6_info *info = (struct condition6_info *) (*match)->data; -check_inverse (optarg, &invert, &optind,0 ); -if (c =='X' ) {if (*flags)exit_error (PARAMETER_PROBLEM ,"Can't specify multiple conditions" ); +check_inverse (optarg, &invert, &optind,0 ); +if (strlen (argv[optind -1 ]) <CONDITION6_NAME_LEN )strcpy (info->name, argv[optind -1 ]);else
@@ -88,7 +89,7 @@const struct condition6_info *info = (const struct condition6_info *) match->data; -printf ("--condition %s%s " , (info->invert) ?"! " :"" , info->name); +printf ("--condition %s\"%s\" " , (info->invert) ?"! " :"" , info->name); }
Harald Welte
AppliedQuoted 6 lines · Stephane Ouellette
Harald,
the following two patches move the call to
check_inverse()to a saner
place and surround the condition name by double-quotes insave().Please apply.
applied to cvs, thanks.
Quoted 1 line
Stephane.
Signature · 5 lines
- Harald Welte <[email protected]> http://www.netfilter.org/ ============================================================================ "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie