[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@xxxxxxxxxxxxxxx> Signed-off-by: Patrick McHardy <kaber@xxxxxxxxx> --- commit 89efd08437074cc2005dc258622866efa187c46a tree 9614972fb51ab77899d80d89a50b363c438ff74f parent b0b6c99174c0d7d9512cd84e50da2c4426e6ae06 author Jan Engelhardt <jengelh@xxxxxxxxxxxxxxx> Mon, 14 Jan 2008 06:51:15 +0100 committer Patrick McHardy <kaber@xxxxxxxxx> Tue, 15 Jan 2008 06:23:23 +0100 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 9951e7f..3d216d6 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, if (!skb_make_writable(skb, sizeof(struct iphdr))) return NF_DROP; iph = ip_hdr(skb); - ipv4_change_dsfield(iph, ~0, nv); + ipv4_change_dsfield(iph, 0, nv); } return XT_CONTINUE; @@ -156,7 +156,7 @@ tos_tg6(struct sk_buff *skb, const struct net_device *in, if (!skb_make_writable(skb, sizeof(struct iphdr))) return NF_DROP; iph = ipv6_hdr(skb); - ipv6_change_dsfield(iph, ~0, nv); + ipv6_change_dsfield(iph, 0, nv); } return XT_CONTINUE; - To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html