mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
netfilter: ip6t_NPT: Fix prefix mangling
Make sure only the bits that are part of the prefix are mangled. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
f5271fff56
commit
d4c38fa87d
1 changed files with 1 additions and 1 deletions
|
|
@ -51,7 +51,7 @@ static bool ip6t_npt_map_pfx(const struct ip6t_npt_tginfo *npt,
|
|||
|
||||
idx = i / 32;
|
||||
addr->s6_addr32[idx] &= mask;
|
||||
addr->s6_addr32[idx] |= npt->dst_pfx.in6.s6_addr32[idx];
|
||||
addr->s6_addr32[idx] |= ~mask & npt->dst_pfx.in6.s6_addr32[idx];
|
||||
}
|
||||
|
||||
if (pfx_len <= 48)
|
||||
|
|
|
|||
Loading…
Reference in a new issue