Re: [PATCH] iptables: extensions: libxt_CONNMARK: Add translation to nft

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

 



Applied with minor glitches.

On Fri, Jun 17, 2016 at 06:10:50PM +0200, rodanber@xxxxxxxxx wrote:
> +static int
> +connmark_tg_xlate(const void *ip, const struct xt_entry_target *target,
> +		  struct xt_xlate *xl, int numeric)
> +{
> +	const struct xt_connmark_tginfo1 *info = (const void *)target->data;
> +	
   ^^^^^
I can see there unnecessary indentation for an empty line.

> +	switch (info->mode) {
> +	case XT_CONNMARK_SET:
> +		xt_xlate_add(xl, "ct mark set ");
> +		if (info->ctmark == 0)
> +			xt_xlate_add(xl, "ct mark and 0x%x", ~info->ctmask);
> +		else if (info->ctmark == info->ctmask)
> +			xt_xlate_add(xl, "ct mark or 0x%x",
> +				     info->ctmark);
> +		else if (info->ctmask == 0)
> +			xt_xlate_add(xl, "ct mark xor 0x%x",
> +				     info->ctmark);
> +		else if (info->ctmask == 0xFFFFFFFFU)
> +			xt_xlate_add(xl, "0x%x ", info->ctmark);
> +		else
> +			xt_xlate_add(xl, "ct mark xor 0x%x and 0x%x",
> +				     info->ctmark, ~info->ctmask);
> +		break;
> +	case XT_CONNMARK_SAVE:
> +		xt_xlate_add(xl, "ct mark set mark");
> +		if (!(info->nfmask == UINT32_MAX && info->ctmask == UINT32_MAX))
> +		{

Wrong coding style, instead:

		if (!(info->nfmask == UINT32_MAX &&
                    info->ctmask == UINT32_MAX)) {
                        ...

I have fixed this here this time. 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