diff options
-rw-r--r-- | Documentation/feature-removal-schedule.txt | 3 | ||||
-rw-r--r-- | include/linux/netfilter_ipv4/Kbuild | 2 | ||||
-rw-r--r-- | include/linux/netfilter_ipv4/ipt_TOS.h | 12 | ||||
-rw-r--r-- | include/linux/netfilter_ipv4/ipt_tos.h | 13 | ||||
-rw-r--r-- | net/netfilter/xt_DSCP.c | 46 | ||||
-rw-r--r-- | net/netfilter/xt_dscp.c | 17 |
6 files changed, 0 insertions, 93 deletions
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index f8cd450be9aa..3aa4a779092b 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -235,9 +235,6 @@ Who: Thomas Gleixner <tglx@linutronix.de> | |||
235 | --------------------------- | 235 | --------------------------- |
236 | 236 | ||
237 | What (Why): | 237 | What (Why): |
238 | - include/linux/netfilter_ipv4/ipt_TOS.h ipt_tos.h header files | ||
239 | (superseded by xt_TOS/xt_tos target & match) | ||
240 | |||
241 | - "forwarding" header files like ipt_mac.h in | 238 | - "forwarding" header files like ipt_mac.h in |
242 | include/linux/netfilter_ipv4/ and include/linux/netfilter_ipv6/ | 239 | include/linux/netfilter_ipv4/ and include/linux/netfilter_ipv6/ |
243 | 240 | ||
diff --git a/include/linux/netfilter_ipv4/Kbuild b/include/linux/netfilter_ipv4/Kbuild index 3a7105bb8f33..86d81a285f9c 100644 --- a/include/linux/netfilter_ipv4/Kbuild +++ b/include/linux/netfilter_ipv4/Kbuild | |||
@@ -9,7 +9,6 @@ header-y += ipt_NFQUEUE.h | |||
9 | header-y += ipt_REJECT.h | 9 | header-y += ipt_REJECT.h |
10 | header-y += ipt_SAME.h | 10 | header-y += ipt_SAME.h |
11 | header-y += ipt_TCPMSS.h | 11 | header-y += ipt_TCPMSS.h |
12 | header-y += ipt_TOS.h | ||
13 | header-y += ipt_TTL.h | 12 | header-y += ipt_TTL.h |
14 | header-y += ipt_ULOG.h | 13 | header-y += ipt_ULOG.h |
15 | header-y += ipt_addrtype.h | 14 | header-y += ipt_addrtype.h |
@@ -40,7 +39,6 @@ header-y += ipt_sctp.h | |||
40 | header-y += ipt_state.h | 39 | header-y += ipt_state.h |
41 | header-y += ipt_string.h | 40 | header-y += ipt_string.h |
42 | header-y += ipt_tcpmss.h | 41 | header-y += ipt_tcpmss.h |
43 | header-y += ipt_tos.h | ||
44 | header-y += ipt_ttl.h | 42 | header-y += ipt_ttl.h |
45 | 43 | ||
46 | unifdef-y += ip_queue.h | 44 | unifdef-y += ip_queue.h |
diff --git a/include/linux/netfilter_ipv4/ipt_TOS.h b/include/linux/netfilter_ipv4/ipt_TOS.h deleted file mode 100644 index 6bf9e1fdfd88..000000000000 --- a/include/linux/netfilter_ipv4/ipt_TOS.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #ifndef _IPT_TOS_H_target | ||
2 | #define _IPT_TOS_H_target | ||
3 | |||
4 | #ifndef IPTOS_NORMALSVC | ||
5 | #define IPTOS_NORMALSVC 0 | ||
6 | #endif | ||
7 | |||
8 | struct ipt_tos_target_info { | ||
9 | u_int8_t tos; | ||
10 | }; | ||
11 | |||
12 | #endif /*_IPT_TOS_H_target*/ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_tos.h b/include/linux/netfilter_ipv4/ipt_tos.h deleted file mode 100644 index a21f5df23c50..000000000000 --- a/include/linux/netfilter_ipv4/ipt_tos.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #ifndef _IPT_TOS_H | ||
2 | #define _IPT_TOS_H | ||
3 | |||
4 | struct ipt_tos_info { | ||
5 | u_int8_t tos; | ||
6 | u_int8_t invert; | ||
7 | }; | ||
8 | |||
9 | #ifndef IPTOS_NORMALSVC | ||
10 | #define IPTOS_NORMALSVC 0 | ||
11 | #endif | ||
12 | |||
13 | #endif /*_IPT_TOS_H*/ | ||
diff --git a/net/netfilter/xt_DSCP.c b/net/netfilter/xt_DSCP.c index 6a347e768f86..74ce89260056 100644 --- a/net/netfilter/xt_DSCP.c +++ b/net/netfilter/xt_DSCP.c | |||
@@ -18,7 +18,6 @@ | |||
18 | 18 | ||
19 | #include <linux/netfilter/x_tables.h> | 19 | #include <linux/netfilter/x_tables.h> |
20 | #include <linux/netfilter/xt_DSCP.h> | 20 | #include <linux/netfilter/xt_DSCP.h> |
21 | #include <linux/netfilter_ipv4/ipt_TOS.h> | ||
22 | 21 | ||
23 | MODULE_AUTHOR("Harald Welte <laforge@netfilter.org>"); | 22 | MODULE_AUTHOR("Harald Welte <laforge@netfilter.org>"); |
24 | MODULE_DESCRIPTION("Xtables: DSCP/TOS field modification"); | 23 | MODULE_DESCRIPTION("Xtables: DSCP/TOS field modification"); |
@@ -73,41 +72,6 @@ static bool dscp_tg_check(const struct xt_tgchk_param *par) | |||
73 | } | 72 | } |
74 | 73 | ||
75 | static unsigned int | 74 | static unsigned int |
76 | tos_tg_v0(struct sk_buff *skb, const struct xt_target_param *par) | ||
77 | { | ||
78 | const struct ipt_tos_target_info *info = par->targinfo; | ||
79 | struct iphdr *iph = ip_hdr(skb); | ||
80 | u_int8_t oldtos; | ||
81 | |||
82 | if ((iph->tos & IPTOS_TOS_MASK) != info->tos) { | ||
83 | if (!skb_make_writable(skb, sizeof(struct iphdr))) | ||
84 | return NF_DROP; | ||
85 | |||
86 | iph = ip_hdr(skb); | ||
87 | oldtos = iph->tos; | ||
88 | iph->tos = (iph->tos & IPTOS_PREC_MASK) | info->tos; | ||
89 | csum_replace2(&iph->check, htons(oldtos), htons(iph->tos)); | ||
90 | } | ||
91 | |||
92 | return XT_CONTINUE; | ||
93 | } | ||
94 | |||
95 | static bool tos_tg_check_v0(const struct xt_tgchk_param *par) | ||
96 | { | ||
97 | const struct ipt_tos_target_info *info = par->targinfo; | ||
98 | const uint8_t tos = info->tos; | ||
99 | |||
100 | if (tos != IPTOS_LOWDELAY && tos != IPTOS_THROUGHPUT && | ||
101 | tos != IPTOS_RELIABILITY && tos != IPTOS_MINCOST && | ||
102 | tos != IPTOS_NORMALSVC) { | ||
103 | printk(KERN_WARNING "TOS: bad tos value %#x\n", tos); | ||
104 | return false; | ||
105 | } | ||
106 | |||
107 | return true; | ||
108 | } | ||
109 | |||
110 | static unsigned int | ||
111 | tos_tg(struct sk_buff *skb, const struct xt_target_param *par) | 75 | tos_tg(struct sk_buff *skb, const struct xt_target_param *par) |
112 | { | 76 | { |
113 | const struct xt_tos_target_info *info = par->targinfo; | 77 | const struct xt_tos_target_info *info = par->targinfo; |
@@ -168,16 +132,6 @@ static struct xt_target dscp_tg_reg[] __read_mostly = { | |||
168 | }, | 132 | }, |
169 | { | 133 | { |
170 | .name = "TOS", | 134 | .name = "TOS", |
171 | .revision = 0, | ||
172 | .family = NFPROTO_IPV4, | ||
173 | .table = "mangle", | ||
174 | .target = tos_tg_v0, | ||
175 | .targetsize = sizeof(struct ipt_tos_target_info), | ||
176 | .checkentry = tos_tg_check_v0, | ||
177 | .me = THIS_MODULE, | ||
178 | }, | ||
179 | { | ||
180 | .name = "TOS", | ||
181 | .revision = 1, | 135 | .revision = 1, |
182 | .family = NFPROTO_IPV4, | 136 | .family = NFPROTO_IPV4, |
183 | .table = "mangle", | 137 | .table = "mangle", |
diff --git a/net/netfilter/xt_dscp.c b/net/netfilter/xt_dscp.c index c3f8085460d7..0280d3a8c161 100644 --- a/net/netfilter/xt_dscp.c +++ b/net/netfilter/xt_dscp.c | |||
@@ -15,7 +15,6 @@ | |||
15 | 15 | ||
16 | #include <linux/netfilter/x_tables.h> | 16 | #include <linux/netfilter/x_tables.h> |
17 | #include <linux/netfilter/xt_dscp.h> | 17 | #include <linux/netfilter/xt_dscp.h> |
18 | #include <linux/netfilter_ipv4/ipt_tos.h> | ||
19 | 18 | ||
20 | MODULE_AUTHOR("Harald Welte <laforge@netfilter.org>"); | 19 | MODULE_AUTHOR("Harald Welte <laforge@netfilter.org>"); |
21 | MODULE_DESCRIPTION("Xtables: DSCP/TOS field match"); | 20 | MODULE_DESCRIPTION("Xtables: DSCP/TOS field match"); |
@@ -55,14 +54,6 @@ static bool dscp_mt_check(const struct xt_mtchk_param *par) | |||
55 | return true; | 54 | return true; |
56 | } | 55 | } |
57 | 56 | ||
58 | static bool | ||
59 | tos_mt_v0(const struct sk_buff *skb, const struct xt_match_param *par) | ||
60 | { | ||
61 | const struct ipt_tos_info *info = par->matchinfo; | ||
62 | |||
63 | return (ip_hdr(skb)->tos == info->tos) ^ info->invert; | ||
64 | } | ||
65 | |||
66 | static bool tos_mt(const struct sk_buff *skb, const struct xt_match_param *par) | 57 | static bool tos_mt(const struct sk_buff *skb, const struct xt_match_param *par) |
67 | { | 58 | { |
68 | const struct xt_tos_match_info *info = par->matchinfo; | 59 | const struct xt_tos_match_info *info = par->matchinfo; |
@@ -94,14 +85,6 @@ static struct xt_match dscp_mt_reg[] __read_mostly = { | |||
94 | }, | 85 | }, |
95 | { | 86 | { |
96 | .name = "tos", | 87 | .name = "tos", |
97 | .revision = 0, | ||
98 | .family = NFPROTO_IPV4, | ||
99 | .match = tos_mt_v0, | ||
100 | .matchsize = sizeof(struct ipt_tos_info), | ||
101 | .me = THIS_MODULE, | ||
102 | }, | ||
103 | { | ||
104 | .name = "tos", | ||
105 | .revision = 1, | 88 | .revision = 1, |
106 | .family = NFPROTO_IPV4, | 89 | .family = NFPROTO_IPV4, |
107 | .match = tos_mt, | 90 | .match = tos_mt, |