Re: Traffic shaping with nftables maps and tc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux