netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Serguei Bezverkhi (sbezverk)" <sbezverk@cisco.com>
To: Phil Sutter <phil@nwl.cc>, Florian Westphal <fw@strlen.de>
Cc: Laura Garcia <nevola@gmail.com>,
	Arturo Borrero Gonzalez <arturo@netfilter.org>,
	"netfilter-devel@vger.kernel.org"
	<netfilter-devel@vger.kernel.org>
Subject: Re: Numen with reference to vmap
Date: Thu, 19 Dec 2019 18:19:23 +0000	[thread overview]
Message-ID: <6E35A7A0-481D-40B6-A504-04EF0A2DEDA2@cisco.com> (raw)
In-Reply-To: <F56E73D4-3A7E-4CCE-AEA4-C867CC11A08B@cisco.com>

While trying to add an element to the set, I am getting error:

sudo nft --debug all add element ipv4table no-endpoints-services  { tcp . 192.168.80.104 . 8989 : goto do_reject }

Error: Could not process rule: Invalid argument
add element ipv4table no-endpoints-services { tcp . 192.168.80.104 . 8989 : goto do_reject }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Anything am I doing wrong?
Thank you
Serguei

On 2019-12-19, 11:00 AM, "Serguei Bezverkhi (sbezverk)" <sbezverk@cisco.com> wrote:

    HI Phil,
    
    I built 0.9.3 and now it recognizes "th", but there is I suspect a cosmetic issue in the output in nft cli. See below the command I used:
    sudo nft --debug all add rule ipv4table k8s-filter-services ip protocol . ip daddr . th dport vmap @no-endpoints-services
    
    It looks like correctly generating expressions:
    
    ip ipv4table k8s-filter-services 
      [ payload load 1b @ network header + 9 => reg 1 ]
      [ payload load 4b @ network header + 16 => reg 9 ]
      [ payload load 2b @ transport header + 2 => reg 10 ]
      [ lookup reg 1 set no-endpoints-services dreg 0 ]
    
    But when I run "sudo nft list tables ipv4table" the rule is missing third parameter.
    
    table ip ipv4table {
    	map no-endpoints-services {
    		type inet_proto . ipv4_addr . inet_service : verdict
    	}
    
    	chain k8s-filter-services {
    		ip protocol . ip daddr vmap @no-endpoints-services            < ------------------- Missing " th dport"
    	}
    }
    
    It seems just a cosmetic thing, but eventually would be nice to have it fixed, if it has not been already in the master branch. I am using v0.9.3 branch.
    
    Thank you
    Serguei
    On 2019-12-19, 10:46 AM, "n0-1@orbyte.nwl.cc on behalf of Phil Sutter" <n0-1@orbyte.nwl.cc on behalf of phil@nwl.cc> wrote:
    
        Hi,
        
        On Thu, Dec 19, 2019 at 02:59:01PM +0000, Serguei Bezverkhi (sbezverk) wrote:
        > Not sure why, but even with 0.9.2 "th" expression is not recognized.
        > 
        > error: syntax error, unexpected th
        > add rule ipv4table k8s-filter-services ip protocol . ip daddr . th dport vmap @no-endpoints-services
        >                                                                                                           ^^
        > sbezverk@dev-ubuntu-1:mimic-filter$ sudo nft -version
        > nftables v0.9.2 (Scram)
        > sbezverk@dev-ubuntu-1:mimic-filter$
        > 
        > It seems 0.9.3 is out but still no Debian package. Is it possible it did not make it into 0.9.2?
        
        Not sure what's missing on your end. I checked 0.9.2 tarball, at least
        parser should understand the syntax.
        
        Cheers, Phil
        
    
    


  reply	other threads:[~2019-12-19 18:19 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-04  0:54 Numen with reference to vmap Serguei Bezverkhi (sbezverk)
2019-12-04 10:18 ` Phil Sutter
2019-12-04 13:47   ` Serguei Bezverkhi (sbezverk)
2019-12-04 15:17     ` Phil Sutter
2019-12-04 15:42       ` Serguei Bezverkhi (sbezverk)
2019-12-04 15:56         ` Phil Sutter
2019-12-04 16:13           ` Serguei Bezverkhi (sbezverk)
2019-12-04 17:00             ` Phil Sutter
2019-12-04 17:31           ` Arturo Borrero Gonzalez
2019-12-04 17:49             ` Serguei Bezverkhi (sbezverk)
2019-12-04 21:05               ` Serguei Bezverkhi (sbezverk)
2019-12-04 22:32             ` Phil Sutter
2019-12-17  0:51               ` Serguei Bezverkhi (sbezverk)
2019-12-17 12:29                 ` Phil Sutter
2019-12-17 14:05                   ` Serguei Bezverkhi (sbezverk)
2019-12-17 16:41                     ` Phil Sutter
2019-12-18 17:01                       ` Serguei Bezverkhi (sbezverk)
2019-12-18 17:24                         ` Phil Sutter
2019-12-18 19:43                           ` Serguei Bezverkhi (sbezverk)
2019-12-18 19:58                             ` Laura Garcia
2019-12-18 20:54                               ` Serguei Bezverkhi (sbezverk)
2019-12-19 10:48                               ` Phil Sutter
2019-12-19 14:59                                 ` Serguei Bezverkhi (sbezverk)
2019-12-19 15:45                                   ` Phil Sutter
2019-12-19 16:00                                     ` Serguei Bezverkhi (sbezverk)
2019-12-19 18:19                                       ` Serguei Bezverkhi (sbezverk) [this message]
2020-01-04 12:30                                         ` Serguei Bezverkhi (sbezverk)

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=6E35A7A0-481D-40B6-A504-04EF0A2DEDA2@cisco.com \
    --to=sbezverk@cisco.com \
    --cc=arturo@netfilter.org \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=nevola@gmail.com \
    --cc=phil@nwl.cc \
    /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).