On Tue, Dec 19, 2017 at 05:57:16PM +0530, Harsha Sharma wrote:
> @@ -1340,7 +1345,9 @@ static int hashlimit_mt_xlate(struct xt_xlate *xl, 
> const char *name,
>       xt_xlate_add(xl, "flow table %s {", name);
>       ret = hashlimit_mode_xlate(xl, cfg->mode, family,
>                                  cfg->srcmask, cfg->dstmask);
> -     xt_xlate_add(xl, " timeout %us limit rate", cfg->expire / 1000);
> +     if (!XT_HASHLIMIT_BYTE_EXPIRE_DEFAULT)
> +             xt_xlate_add(xl, " timeout %us", cfg->expire / 1000);

Better print cfg->expire if only if the default timeout is set.

        if (cfg->expire != XT_HASHLIMIT_XLATE_DEFAULT_TIMEOUT)
                ...

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

Reply via email to