File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ header-y += xt_cpu.h
4343header-y += xt_dccp.h
4444header-y += xt_devgroup.h
4545header-y += xt_dscp.h
46+ header-y += xt_ecn.h
4647header-y += xt_esp.h
4748header-y += xt_hashlimit.h
4849header-y += xt_helper.h
Original file line number Diff line number Diff line change 1+ /* iptables module for matching the ECN header in IPv4 and TCP header
2+ *
3+ * (C) 2002 Harald Welte <laforge@gnumonks.org>
4+ *
5+ * This software is distributed under GNU GPL v2, 1991
6+ *
7+ * ipt_ecn.h,v 1.4 2002/08/05 19:39:00 laforge Exp
8+ */
9+ #ifndef _XT_ECN_H
10+ #define _XT_ECN_H
11+
12+ #include <linux/types.h>
13+ #include <linux/netfilter/xt_dscp.h>
14+
15+ #define IPT_ECN_IP_MASK (~XT_DSCP_MASK)
16+
17+ #define IPT_ECN_OP_MATCH_IP 0x01
18+ #define IPT_ECN_OP_MATCH_ECE 0x10
19+ #define IPT_ECN_OP_MATCH_CWR 0x20
20+
21+ #define IPT_ECN_OP_MATCH_MASK 0xce
22+
23+ /* match info */
24+ struct ipt_ecn_info {
25+ __u8 operation ;
26+ __u8 invert ;
27+ __u8 ip_ect ;
28+ union {
29+ struct {
30+ __u8 ect ;
31+ } tcp ;
32+ } proto ;
33+ };
34+
35+ #endif /* _XT_ECN_H */
Original file line number Diff line number Diff line change 1- /* iptables module for matching the ECN header in IPv4 and TCP header
2- *
3- * (C) 2002 Harald Welte <laforge@gnumonks.org>
4- *
5- * This software is distributed under GNU GPL v2, 1991
6- *
7- * ipt_ecn.h,v 1.4 2002/08/05 19:39:00 laforge Exp
8- */
91#ifndef _IPT_ECN_H
102#define _IPT_ECN_H
113
12- #include <linux/types.h>
13- #include <linux/netfilter/xt_dscp.h>
14-
15- #define IPT_ECN_IP_MASK (~XT_DSCP_MASK)
16-
17- #define IPT_ECN_OP_MATCH_IP 0x01
18- #define IPT_ECN_OP_MATCH_ECE 0x10
19- #define IPT_ECN_OP_MATCH_CWR 0x20
20-
21- #define IPT_ECN_OP_MATCH_MASK 0xce
22-
23- /* match info */
24- struct ipt_ecn_info {
25- __u8 operation ;
26- __u8 invert ;
27- __u8 ip_ect ;
28- union {
29- struct {
30- __u8 ect ;
31- } tcp ;
32- } proto ;
33- };
4+ #include <linux/netfilter/xt_ecn.h>
345
356#endif /* _IPT_ECN_H */
Original file line number Diff line number Diff line change @@ -76,11 +76,11 @@ config IP_NF_MATCH_AH
7676config IP_NF_MATCH_ECN
7777 tristate '"ecn" match support'
7878 depends on NETFILTER_ADVANCED
79- help
80- This option adds a `ECN' match, which allows you to match against
81- the IPv4 and TCP header ECN fields.
82-
83- To compile it as a module, choose M here. If unsure, say N .
79+ select NETFILTER_XT_MATCH_ECN
80+ ---help---
81+ This is a backwards-compat option for the user's convenience
82+ (e.g. when running oldconfig). It selects
83+ CONFIG_NETFILTER_XT_MATCH_ECN .
8484
8585config IP_NF_MATCH_RPFILTER
8686 tristate '"rpfilter" reverse path filter match support'
Original file line number Diff line number Diff line change @@ -49,7 +49,6 @@ obj-$(CONFIG_IP_NF_SECURITY) += iptable_security.o
4949
5050# matches
5151obj-$(CONFIG_IP_NF_MATCH_AH) += ipt_ah.o
52- obj-$(CONFIG_IP_NF_MATCH_ECN) += ipt_ecn.o
5352obj-$(CONFIG_IP_NF_MATCH_RPFILTER) += ipt_rpfilter.o
5453
5554# targets
Original file line number Diff line number Diff line change @@ -778,6 +778,15 @@ config NETFILTER_XT_MATCH_DSCP
778778
779779 To compile it as a module, choose M here. If unsure, say N.
780780
781+ config NETFILTER_XT_MATCH_ECN
782+ tristate '"ecn" match support'
783+ depends on NETFILTER_ADVANCED
784+ ---help---
785+ This option adds an "ECN" match, which allows you to match against
786+ the IPv4 and TCP header ECN fields.
787+
788+ To compile it as a module, choose M here. If unsure, say N.
789+
781790config NETFILTER_XT_MATCH_ESP
782791 tristate '"esp" match support'
783792 depends on NETFILTER_ADVANCED
Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_CPU) += xt_cpu.o
8181obj-$(CONFIG_NETFILTER_XT_MATCH_DCCP) += xt_dccp.o
8282obj-$(CONFIG_NETFILTER_XT_MATCH_DEVGROUP) += xt_devgroup.o
8383obj-$(CONFIG_NETFILTER_XT_MATCH_DSCP) += xt_dscp.o
84+ obj-$(CONFIG_NETFILTER_XT_MATCH_ECN) += xt_ecn.o
8485obj-$(CONFIG_NETFILTER_XT_MATCH_ESP) += xt_esp.o
8586obj-$(CONFIG_NETFILTER_XT_MATCH_HASHLIMIT) += xt_hashlimit.o
8687obj-$(CONFIG_NETFILTER_XT_MATCH_HELPER) += xt_helper.o
Original file line number Diff line number Diff line change 2121MODULE_AUTHOR ("Harald Welte <laforge@netfilter.org>" );
2222MODULE_DESCRIPTION ("Xtables: Explicit Congestion Notification (ECN) flag match for IPv4" );
2323MODULE_LICENSE ("GPL" );
24+ MODULE_ALIAS ("ipt_ecn" );
2425
2526static inline bool match_ip (const struct sk_buff * skb ,
2627 const struct ipt_ecn_info * einfo )
You can’t perform that action at this time.
0 commit comments