From: Pablo Neira Ayuso <pablo@netfilter.org>
To: stephane.ml.bryant@gmail.com
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nf-next v2 2/2] netfilter: bridge: pass L2 header and VLAN as netlink attributes in queues to userspace
Date: Mon, 15 Feb 2016 20:45:37 +0100 [thread overview]
Message-ID: <20160215194537.GA8411@salvia> (raw)
In-Reply-To: <1455202396-5334-3-git-send-email-stephane.ml.bryant@gmail.com>
On Thu, Feb 11, 2016 at 03:53:16PM +0100, stephane.ml.bryant@gmail.com wrote:
> From: stephane <stephane.ml.bryant@gmail.com>
>
> -this creates 2 netlink attribute NLQA_VLAN and NLQA_L2HDR
> -these are filled up for the PF_BRIDGE family on the way to userspace, and
> used on the way back to modify the original skb accordingly
>
> Signed-off-by: Stephane Bryant <stephane.ml.bryant@gmail.com>
> ---
> include/uapi/linux/netfilter/nfnetlink_queue.h | 7 ++
> net/netfilter/nfnetlink_queue.c | 130 ++++++++++++++++++++++++-
> 2 files changed, 132 insertions(+), 5 deletions(-)
>
> diff --git a/include/uapi/linux/netfilter/nfnetlink_queue.h b/include/uapi/linux/netfilter/nfnetlink_queue.h
> index b67a853..211fcdc 100644
> --- a/include/uapi/linux/netfilter/nfnetlink_queue.h
> +++ b/include/uapi/linux/netfilter/nfnetlink_queue.h
> @@ -30,6 +30,11 @@ struct nfqnl_msg_packet_timestamp {
> __aligned_be64 usec;
> };
>
> +struct nfqnl_msg_vlan {
> + __be16 proto;
> + __u16 tci;
> +} __attribute__ ((packed));
I'd rather use nested attributes instead of passing structures through
netlink.
I'm aware we're using structure in the existing code, that decision
was made long time ago and we cannot change it. But as I said for new
code I'd rather see nested attributes. See nla_nest_start and nla_nest_end.
Thanks.
prev parent reply other threads:[~2016-02-15 19:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-11 14:53 [PATCH nf-next v2 0/2] netfilter: bridge: add queuing to userspace for AF_ stephane.ml.bryant
2016-02-11 14:53 ` [PATCH nf-next v2 1/2] netfilter: bridge: add nf_afinfo to enable queuing to userspace stephane.ml.bryant
2016-02-13 23:45 ` Florian Westphal
2016-02-11 14:53 ` [PATCH nf-next v2 2/2] netfilter: bridge: pass L2 header and VLAN as netlink attributes in queues " stephane.ml.bryant
2016-02-13 23:42 ` Florian Westphal
2016-02-15 19:45 ` 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=20160215194537.GA8411@salvia \
--to=pablo@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=stephane.ml.bryant@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).