From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [iptables-nftables RFC PATCH 0/6] IPv6 Support
Date: Sun, 13 Jan 2013 20:23:53 +0100 [thread overview]
Message-ID: <20130113192353.GB16399@1984> (raw)
In-Reply-To: <1357828179-18664-1-git-send-email-tomasz.bursztyka@linux.intel.com>
Hi Tomasz,
On Thu, Jan 10, 2013 at 04:29:33PM +0200, Tomasz Bursztyka wrote:
> Hi,
>
> Here is an attempt to get iptables-nftables supporting IPv6. I
> haven't tested it really, so I send it more as an RFC.
>
> Starting from xtables.c which supports only IPv4, patch 2 combines
> the support for IPv6 in it. The family attribute provided in patch
> 1 is set then used in nft.c to use it accordingly, in patch 3.
>
> Patch 4 finalizes it in handling the right informations for rule
> manipulations depending on the family.
>
> Patch 5 and 6 then adds the support of IPv6 when it comes to
> respectively save and print the firewall.
Good job.
I have merged the 6 patches into one single, they all belong to the
same scope.
I have also tested this, fixed a couple of issues (regarding deletion,
xtables-save/-restore, printing IPv6 destination via xtables -6 -L -n
and spot error if `-f' is used with xtables -6, probably something
else, I forgot, you can diff you initial patch and final result).
I have pushed this into the repository:
http://1984.lsi.us.es/git/iptables-nftables/commit/?id=453ece127f96f155146eff5c2a8b30574d08335d
It would be good if you can move all specific IPv4 and IPv6 code to
nft-ipv4.c and nft-ipv6.c files respectively.
You can use a structure with callbacks like:
struct xtables_family {
int (*add)(...);
void (*print)(...);
void (*print_save)(...);
int (*parse)(...);
int (*is_same)(...);
}
By looking at the previous patch and searching for:
switch(h->family) {
case AF_INET:
...
break;
case AF_INET6:
...
break;
}
Should help to identify the code that needs to be moved to the
specific file.
That encapsulation will help to prepare bridging and arp support.
Thanks a lot!
prev parent reply other threads:[~2013-01-13 19:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-10 14:29 [iptables-nftables RFC PATCH 0/6] IPv6 Support Tomasz Bursztyka
2013-01-10 14:29 ` [iptables-nftables RFC PATCH 1/6] nft: Add a family attribute to nft_handle Tomasz Bursztyka
2013-01-10 14:29 ` [iptables-nftables RFC PATCH 2/6] xtables: Combine IPv6 support with IPv4 support Tomasz Bursztyka
2013-01-11 9:10 ` [iptables-nftables RFC PATCH - v2 - " Tomasz Bursztyka
2013-01-10 14:29 ` [iptables-nftables RFC PATCH 3/6] nft: Use handle's family attribute instead of hardcoded AF_INET one Tomasz Bursztyka
2013-01-10 14:29 ` [iptables-nftables RFC PATCH 4/6] nft: Support IPv6 rules manipulation Tomasz Bursztyka
2013-01-10 14:29 ` [iptables-nftables RFC PATCH 5/6] nft: Use the right payload parsing function when saving a rule Tomasz Bursztyka
2013-01-10 14:29 ` [iptables-nftables RFC PATCH 6/6] nft: Handle IPv6 when printing out firewall rules Tomasz Bursztyka
2013-01-13 19:23 ` 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=20130113192353.GB16399@1984 \
--to=pablo@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=tomasz.bursztyka@linux.intel.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).