netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Shivani Bhardwaj <shivanib134@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH libnftnl v2] Add support for masq port selection
Date: Fri, 22 Jan 2016 20:01:09 +0100	[thread overview]
Message-ID: <20160122190109.GA1374@salvia> (raw)
In-Reply-To: <20160122162907.GA5750@gmail.com>

Shivani, this looks good, only one comment below.

On Fri, Jan 22, 2016 at 09:59:07PM +0530, Shivani Bhardwaj wrote:
> @@ -51,6 +57,8 @@ int main(int argc, char *argv[])
>  		print_err("OOM");
>  
>  	nftnl_expr_set_u32(ex, NFTNL_EXPR_MASQ_FLAGS, 0x1234568);
> +	nftnl_expr_set_u32(ex, NFTNL_EXPR_MASQ_REG_PROTO_MIN, 0x1234568);
> +	nftnl_expr_set_u32(ex, NFTNL_EXPR_MASQ_REG_PROTO_MAX, 0x1234568);

I think the tests are more effective if you set different values, ie.

        nftnl_expr_set_u32(ex, NFTNL_EXPR_MASQ_FLAGS, 0x12345678);
        nftnl_expr_set_u32(ex, NFTNL_EXPR_MASQ_REG_PROTO_MIN, 0x45671234);
        nftnl_expr_set_u32(ex, NFTNL_EXPR_MASQ_REG_PROTO_MAX, 0x87654321);

Beware that my kernel patch is only compile tested.

And please follow up with the nftables patch, let me know if you have
questions with it.

Thanks.

      reply	other threads:[~2016-01-22 19:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-22 16:29 [PATCH libnftnl v2] Add support for masq port selection Shivani Bhardwaj
2016-01-22 19:01 ` Pablo Neira Ayuso [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160122190109.GA1374@salvia \
    --to=pablo@netfilter.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=shivanib134@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).