From: Tomas Mudrunka <mudrunka@spoje.net>
To: Netfilter Users Mailing list <netfilter@vger.kernel.org>
Subject: Re: Traffic shaping with nftables maps and tc
Date: Fri, 03 Nov 2017 13:37:50 +0100 [thread overview]
Message-ID: <79baac2c7d201c134a2852cca86b5bce@spoje.net> (raw)
In-Reply-To: <CAOkSjBh8H2tn6noj9BrbGcwdk4nnjZxm-4TiTVyhm+jciSYCew@mail.gmail.com>
> Try this:
> meta priority set ip daddr map { 1.1.1.2 : 2:2222, 1.1.1.3 : 3:3333 }
Thank you, that looks promising. However is there way to name this map,
so i can dynamicaly edit it? I've checked nft describe:
$ nft describe ip daddr
payload expression, datatype ipv4_addr (IPv4 address) (basetype
integer), 32 bits
$ nft describe meta priority
meta expression, datatype classid (TC classid) (basetype integer), 32
bits
But then later "classid" seems to fail when name defining table:
# nft add map filter deucalion { type ipv4_addr : classid\; }
<cmdline>:1:45-51: Error: syntax error, unexpected classid, expecting
string or dscp or ecn or mark
add map filter deucalion { type ipv4_addr : classid; }
^^^^^^^
<cmdline>:1:26-52: Error: map definition does not specify key data type
add map filter deucalion { type ipv4_addr : classid; }
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Same goes for this:
map deucalion {
type ipv4_addr : classid;
elements = { 1.1.1.2 : 2:2222, 1.1.1.3 : 3:3333 }
}
chain input {
type filter hook input priority 0; policy accept;
meta priority set ip daddr map @deucalion;
}
--
S pozdravem
Best regards
Tomáš Mudruňka - SPOJE.NET s.r.o.
next prev parent reply other threads:[~2017-11-03 12:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-02 20:34 Traffic shaping with nftables maps and tc Tomas Mudrunka
2017-11-03 0:07 ` Tomas Mudrunka
2017-11-03 10:48 ` Arturo Borrero Gonzalez
2017-11-03 12:37 ` Tomas Mudrunka [this message]
2017-11-03 16:01 ` Arturo Borrero Gonzalez
2017-11-03 16:28 ` Tomas Mudrunka
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=79baac2c7d201c134a2852cca86b5bce@spoje.net \
--to=mudrunka@spoje.net \
--cc=netfilter@vger.kernel.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
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