Hi,

On Tue, 2015-08-11 at 09:00 +0200, Daniel Wagner wrote:
> The SNAT extension wants to know which protocol is used. We need
> to pass in a valid ipt_entry with the protocol set for this reason.
> 
> The parser is keept minimal, which means it does not support
> all fancy features as iptables offers. Though for our main
> purposes is it enough which is
> 
> iptables-test -t nat -A POSTROUTING -o enp0s20u2u1 -j SNAT --to-source 
> 192.168.101.6
> ---
>  src/iptables.c | 14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/src/iptables.c b/src/iptables.c
> index 2602dfd..08fd99a 100644
> --- a/src/iptables.c
> +++ b/src/iptables.c
> @@ -1765,6 +1765,7 @@ struct parse_context {
>       struct xtables_target *xt_t;
>       GList *xt_m;
>       struct xtables_rule_match *xt_rm;
> +     int proto;
>  };
>  
>  static int prepare_getopt_args(const char *str, struct parse_context *ctx)
> @@ -1804,6 +1805,12 @@ static int parse_xt_modules(int c, bool invert,
>  {
>       struct xtables_match *m;
>       struct xtables_rule_match *rm;
> +     struct ipt_entry fw = { 0, };

gcc says:

src/iptables.c: In function ‘parse_xt_modules’:
src/iptables.c:1808:9: error: missing braces around initializer 
[-Werror=missing-braces]
  struct ipt_entry fw = { 0, };
         ^
src/iptables.c:1808:9: error: (near initialization for ‘fw.ip’) 
[-Werror=missing-braces]
src/iptables.c: In function ‘parse_xt_modules’:
src/iptables.c:1808:9: error: missing braces around initializer 
[-Werror=missing-braces]
  struct ipt_entry fw = { 0, };
         ^

Cheers,

        Patrik

_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to