Re: [PATCH iptables 2/2] xtables-translate: fix issue with quotes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2016-07-25 17:31 GMT+02:00 Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>:
> On Fri, Jul 22, 2016 at 05:48:34PM +0200, Pablo M. Bermudo Garay wrote:
>> Some translations included escaped quotes when they were called from
>> nft:
>>
>> $ sudo nft list ruleset
>> table ip mangle {
>>     chain FORWARD {
>>         type filter hook forward priority -150; policy accept;
>>         ct helper \"ftp\" counter packets 0 bytes 0
>>                   ^^   ^^
>>     }
>> }
>>
>> This behavior is only correct when xlate functions are called from a
>> xtables-translate command. This patch solves that issue if nft revision
>> is using the field added to the xt_xlate struct with "xtables-translate:
>> add new field to identify the caller" commit.
>
> Please, rebase this change on top of:
>
> http://git.netfilter.org/iptables/commit/?id=7a0992da44cfb6cab0ccd1beadcf326df8773552
>
> I'd suggest you add a new parameter for this, something like:
>
>         bool escape_quotes;
>
> Or is there use for this nft_compat field you propose out of this.

For the moment, the quotes issue is the only use I have found for the
nft_compat field. So the escape_quotes boolean seems a good idea.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux