diff options
author | Jan Engelhardt <jengelh@computergmbh.de> | 2008-01-15 02:32:54 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:02:18 -0500 |
commit | cdfe8b9797f1a47fe24a9bf9e98a351bae11ab99 (patch) | |
tree | dfc56c31da97df3b357af245177fdc64984a7f85 /net | |
parent | 9bb268ed7c5f0ec76a5bd6824450a104231152ba (diff) |
[NETFILTER]: xt_TOS: Properly set the TOS field
Fix incorrect mask value passed to ipv4_change_dsfield/ipv6_change_dsfield.
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/xt_DSCP.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/xt_DSCP.c b/net/netfilter/xt_DSCP.c index 9951e7f85e32..3d216d650c82 100644 --- a/net/netfilter/xt_DSCP.c +++ b/net/netfilter/xt_DSCP.c | |||
@@ -134,7 +134,7 @@ tos_tg(struct sk_buff *skb, const struct net_device *in, | |||
134 | if (!skb_make_writable(skb, sizeof(struct iphdr))) | 134 | if (!skb_make_writable(skb, sizeof(struct iphdr))) |
135 | return NF_DROP; | 135 | return NF_DROP; |
136 | iph = ip_hdr(skb); | 136 | iph = ip_hdr(skb); |
137 | ipv4_change_dsfield(iph, ~0, nv); | 137 | ipv4_change_dsfield(iph, 0, nv); |
138 | } | 138 | } |
139 | 139 | ||
140 | return XT_CONTINUE; | 140 | return XT_CONTINUE; |
@@ -156,7 +156,7 @@ tos_tg6(struct sk_buff *skb, const struct net_device *in, | |||
156 | if (!skb_make_writable(skb, sizeof(struct iphdr))) | 156 | if (!skb_make_writable(skb, sizeof(struct iphdr))) |
157 | return NF_DROP; | 157 | return NF_DROP; |
158 | iph = ipv6_hdr(skb); | 158 | iph = ipv6_hdr(skb); |
159 | ipv6_change_dsfield(iph, ~0, nv); | 159 | ipv6_change_dsfield(iph, 0, nv); |
160 | } | 160 | } |
161 | 161 | ||
162 | return XT_CONTINUE; | 162 | return XT_CONTINUE; |