mirror of
https://github.com/hak5/wifipineapple-openwrt.git
synced 2025-10-29 16:57:19 +00:00
6rd: Clear correct IPv6 address bits in 6rdcalc
The correct bits are now cleared in the IPv6 address as the shift value to the correct byte in the IPv6 address was wrong. Depending on the stack values this could result in a hanging 6rdcalc program due to an endless loop. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38818 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
b041af2c64
commit
1c82c32e7d
@ -110,7 +110,7 @@ int main(int argc, const char **argv)
|
||||
|
||||
/* Clear remaining bits. */
|
||||
while (v6it < 128) {
|
||||
byte6 = (unsigned char *)(&v6.s6_addr) + (v6it >> 2);
|
||||
byte6 = (unsigned char *)(&v6.s6_addr) + (v6it >> 3);
|
||||
bit6 = 128 >> (v6it & 0x07);
|
||||
|
||||
*byte6 &= ~bit6;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user