Skip to content
Snippets Groups Projects
Commit b5a4fb1c authored by Steven Barth's avatar Steven Barth
Browse files

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: default avatarHans Dedecker <dedeckeh@gmail.com>

SVN-Revision: 38818
parent e4eef7e6
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment