From bc9d2e5006b2963f9cc117076ecf38a5c3782964 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Wed, 11 May 2016 00:22:11 +0200 Subject: src: add ecn support This supports both IPv4: # nft --debug=netlink add rule ip filter forward ip ecn ce counter ip filter forward [ payload load 1b @ network header + 1 => reg 1 ] [ bitwise reg 1 = (reg=1 & 0x00000003 ) ^ 0x00000000 ] [ cmp eq reg 1 0x00000003 ] [ counter pkts 0 bytes 0 ] For IPv6: # nft --debug=netlink add rule ip6 filter forward ip6 ecn ce counter ip6 filter forward [ payload load 1b @ network header + 1 => reg 1 ] [ bitwise reg 1 = (reg=1 & 0x00000030 ) ^ 0x00000000 ] [ cmp eq reg 1 0x00000030 ] [ counter pkts 0 bytes 0 ] Signed-off-by: Pablo Neira Ayuso --- include/datatype.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/datatype.h') diff --git a/include/datatype.h b/include/datatype.h index e385bac1..c7e110f5 100644 --- a/include/datatype.h +++ b/include/datatype.h @@ -80,6 +80,7 @@ enum datatypes { TYPE_ICMPX_CODE, TYPE_DEVGROUP, TYPE_DSCP, + TYPE_ECN, __TYPE_MAX }; #define TYPE_MAX (__TYPE_MAX - 1) -- cgit v1.2.3