netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: fernando@oss.ntt.co.jp
Cc: netdev@vger.kernel.org, yoshfuji@linux-ipv6.org,
	jengelh@medozas.de, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] netfilter/IPv6: fix DSCP mangle code
Date: Fri, 22 Apr 2011 00:08:38 -0700 (PDT)	[thread overview]
Message-ID: <20110422.000838.193727308.davem@davemloft.net> (raw)
In-Reply-To: <1303455759.2023.39.camel@nausicaa>

From: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Date: Fri, 22 Apr 2011 16:02:39 +0900

> The mask indicates the bits one wants to zero out, so it needs to be
> inverted before applying to the original TOS field.
> 
> Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
> ---

Netfilter patches should be sent to the netfilter developer
list, CC:'d

> diff -urNp linux-2.6.37-orig/net/netfilter/xt_DSCP.c linux-2.6.37/net/netfilter/xt_DSCP.c
> --- linux-2.6.37-orig/net/netfilter/xt_DSCP.c	2011-01-05 09:50:19.000000000 +0900
> +++ linux-2.6.37/net/netfilter/xt_DSCP.c	2011-04-21 16:01:25.801890733 +0900
> @@ -99,7 +99,7 @@ tos_tg6(struct sk_buff *skb, const struc
>  	u_int8_t orig, nv;
>  
>  	orig = ipv6_get_dsfield(iph);
> -	nv   = (orig & info->tos_mask) ^ info->tos_value;
> +	nv   = (orig & ~info->tos_mask) ^ info->tos_value;
>  
>  	if (orig != nv) {
>  		if (!skb_make_writable(skb, sizeof(struct iphdr)))
> 
> 

       reply	other threads:[~2011-04-22  7:08 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1303455759.2023.39.camel@nausicaa>
2011-04-22  7:08 ` David Miller [this message]
2011-04-22  7:29   ` [PATCH] netfilter/IPv6: fix DSCP mangle code Fernando Luis Vazquez Cao
2011-04-22  7:19 ` [PATCH] netfilter/IPv6: initialize TOS field in REJECT target module Fernando Luis Vazquez Cao
2011-04-22  7:34   ` Eric Dumazet
2011-04-22  7:47     ` Fernando Luis Vazquez Cao
2011-04-22  8:06       ` Eric Dumazet
2011-04-22  8:11         ` Fernando Luis Vazquez Cao
2011-04-22  8:37           ` Eric Dumazet
2011-04-26  1:13             ` Pablo Neira Ayuso
2011-04-26  1:26               ` Fernando Luis Vazquez Cao
2011-04-26  5:17                 ` David Miller
2011-04-26  5:25                   ` Fernando Luis Vazquez Cao
2011-04-26 15:34                     ` Pablo Neira Ayuso
2011-04-26 15:35                       ` Pablo Neira Ayuso
2011-04-27  4:21                         ` Fernando Luis Vazquez Cao
2011-05-06  8:27                       ` Fernando Luis Vázquez Cao
2011-05-06 10:38                         ` Pablo Neira Ayuso
2011-05-06 10:45                           ` Jan Engelhardt
2011-04-26  5:17               ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110422.000838.193727308.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=fernando@oss.ntt.co.jp \
    --cc=jengelh@medozas.de \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=yoshfuji@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).