This is a note to let you know that I've just added the patch titled

    netfilter: ip6t_NPT: Fix translation for non-multiple of 32 prefix lengths

to the 3.8-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     
netfilter-ip6t_npt-fix-translation-for-non-multiple-of-32-prefix-lengths.patch
and it can be found in the queue-3.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 906b1c394d0906a154fbdc904ca506bceb515756 Mon Sep 17 00:00:00 2001
From: Matthias Schiffer <[email protected]>
Date: Sat, 30 Mar 2013 10:23:12 +0000
Subject: netfilter: ip6t_NPT: Fix translation for non-multiple of 32 prefix 
lengths

From: Matthias Schiffer <[email protected]>

commit 906b1c394d0906a154fbdc904ca506bceb515756 upstream.

The bitmask used for the prefix mangling was being calculated
incorrectly, leading to the wrong part of the address being replaced
when the prefix length wasn't a multiple of 32.

Signed-off-by: Matthias Schiffer <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 net/ipv6/netfilter/ip6t_NPT.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/ipv6/netfilter/ip6t_NPT.c
+++ b/net/ipv6/netfilter/ip6t_NPT.c
@@ -57,7 +57,7 @@ static bool ip6t_npt_map_pfx(const struc
                if (pfx_len - i >= 32)
                        mask = 0;
                else
-                       mask = htonl(~((1 << (pfx_len - i)) - 1));
+                       mask = htonl((1 << (i - pfx_len + 32)) - 1);
 
                idx = i / 32;
                addr->s6_addr32[idx] &= mask;


Patches currently in stable-queue which might be from 
[email protected] are

queue-3.8/netfilter-ip6t_npt-fix-translation-for-non-multiple-of-32-prefix-lengths.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to