Netfilter-Devel Archive on lore.kernel.org
 help / color / Atom feed
From: sbezverk <sbezverk@gmail.com>
To: Florian Westphal <fw@strlen.de>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
	"netfilter-devel@vger.kernel.org"
	<netfilter-devel@vger.kernel.org>
Subject: Re: Proposing to add a structure to UserData
Date: Mon, 17 Feb 2020 10:42:48 -0500
Message-ID: <A1C979C6-C703-4013-A536-47758175E8A8@gmail.com> (raw)
In-Reply-To: <20200217144034.GC19559@breakpoint.cc>

Hi Florian,

Thank you for letting me know, I checked golang unix package and I did not find definition for NFTNL_UDATA_RULE_COMMENT.  That explains why I did not use it.
Could you please point me where UDATA relate types and subtypes are defined, so I could replicate them in go.

Thank you
Serguei


On 2020-02-17, 9:40 AM, "Florian Westphal" <fw@strlen.de> wrote:

    sbezverk <sbezverk@gmail.com> wrote:
    > I would like to propose to add some structure to UserData. Currently nft tool uses UserData to carry comments and it prints out whatever is stored in it without much of processing. Since UserData is the only available mechanism to store some metadata for a rule, if it is used, then comments in nft cli get totally screwed up.
    
    Then you are using it wrong :-)
    
    Userdata is structured, its not used only for comments.
    Which userdata are you referring to?  We have this for
    rules, sets, and elements.
    
    > If we could add attributes to UserData indicating type NFT_USERDATA_COMMENT with length, then we could preserve nft comments and at the same time allow to use UserData for other things.
    > What do you think?
    
    As far as I can see what you want is already implemented, for example
    rule comments live in NFTNL_UDATA_RULE_COMMENT sub-type.
    



  reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13 14:12 sbezverk
2020-02-17 14:40 ` Florian Westphal
2020-02-17 15:42   ` sbezverk [this message]
2020-02-17 15:48     ` Phil Sutter

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=A1C979C6-C703-4013-A536-47758175E8A8@gmail.com \
    --to=sbezverk@gmail.com \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /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

Netfilter-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netfilter-devel/0 netfilter-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netfilter-devel netfilter-devel/ https://lore.kernel.org/netfilter-devel \
		netfilter-devel@vger.kernel.org
	public-inbox-index netfilter-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netfilter-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git