SPOJE.NET

Technická dokumentace

Uživatelské nástroje

Nástroje pro tento web


howto:network:nftables

Rozdíly

Zde můžete vidět rozdíly mezi vybranou verzí a aktuální verzí dané stránky.

Odkaz na výstup diff

Následující verze
Předchozí verze
Následující verzeObě strany příští revize
howto:network:nftables [2018/11/28 21:55] – vytvořeno harviehowto:network:nftables [2018/11/28 22:05] harvie
Řádek 2: Řádek 2:
  
 ===== Traffic Shaping with nftables and tc ===== ===== Traffic Shaping with nftables and tc =====
 +
 +<code bash>
 +nft add table ip filter
 +nft add map filter deucalion { type ipv4_addr : classid\; }
 +</code>
  
 <file ini deucalion.nft> <file ini deucalion.nft>
 +table ip filter {
  map deucalion {  map deucalion {
  type ipv4_addr : classid;  type ipv4_addr : classid;
Řádek 14: Řádek 20:
  meta priority set ip daddr map @deucalion;  meta priority set ip daddr map @deucalion;
  }  }
 +}
 +</file>
 +
 +==== Patch ====
 +
 +This patch is already merged upstream:
 +
 +  * https://www.spinics.net/lists/netfilter/msg57694.html
 +  * https://www.spinics.net/lists/netfilter/threads.html#57694
 +
 +<file diff nft-classid.patch>
 +parser: allow classid as set key
 +
 +From: Arturo Borrero Gonzalez <arturo@xxxxxxxxxxxxx>
 +
 +Allow TC classid as set key.
 +
 +Signed-off-by: Arturo Borrero Gonzalez <arturo@xxxxxxxxxxxxx>
 +---
 + src/parser_bison.y |    1 +
 + 1 file changed, 1 insertion(+)
 +
 +diff --git a/src/parser_bison.y b/src/parser_bison.y
 +index 7016f5b..2918875 100644
 +--- a/src/parser_bison.y
 ++++ b/src/parser_bison.y
 +@@ -1545,6 +1545,7 @@ type_identifier : STRING { $$ = $1; }
 +  | MARK { $$ = xstrdup("mark"); }
 +  | DSCP { $$ = xstrdup("dscp"); }
 +  | ECN { $$ = xstrdup("ecn"); }
 ++ | CLASSID { $$ = xstrdup("classid"); }
 +  ;
 + 
 + hook_spec : TYPE STRING HOOK STRING dev_spec PRIORITY prio_spec
 </file> </file>
howto/network/nftables.txt · Poslední úprava: 2018/11/28 23:08 autor: harvie