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 nftables] Add support for masquerade port selection
Date: Fri, 22 Jan 2016 22:06:12 +0100	[thread overview]
Message-ID: <20160122210612.GA9707@salvia> (raw)
In-Reply-To: <20160122205554.GA12691@gmail.com>

On Sat, Jan 23, 2016 at 02:25:55AM +0530, Shivani Bhardwaj wrote:
> Provide full support for masquerading by allowing port range selection.

Almost there:

You have to update stmt_evaluate_masq() too, otherwise...

$ sudo nft add table nat
$ sudo nft add chain nat post { type nat hook postrouting priority 0\; }
$ sudo nft add rule nat post masquerade to :1024-65535
BUG: unknown expression type symbol
nft: netlink_linearize.c:656: netlink_gen_expr: Assertion `0' failed.
Abortado

Then, you can check the listing via:

$ sudo nft list ruleset

Once you get this working, you have to add a new test to
tests/py/inet/masq.t

# python tests/py/nft-tests.py

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

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-22 20:55 [PATCH nftables] Add support for masquerade port selection Shivani Bhardwaj
2016-01-22 21:06 ` 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=20160122210612.GA9707@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).