mirror of
https://github.com/bol-van/zapret.git
synced 2025-12-06 11:36:46 +03:00
nfqws: ipv6 ah header length is in 32-bit words, not 64-bit
This commit is contained in:
@@ -936,7 +936,6 @@ void proto_skip_ipv6(uint8_t **data, size_t *len, uint8_t *proto_type, uint8_t *
|
|||||||
{
|
{
|
||||||
case 0: // Hop-by-Hop Options
|
case 0: // Hop-by-Hop Options
|
||||||
case 43: // routing
|
case 43: // routing
|
||||||
case 51: // authentication
|
|
||||||
case 60: // Destination Options
|
case 60: // Destination Options
|
||||||
case 135: // mobility
|
case 135: // mobility
|
||||||
case 139: // Host Identity Protocol Version v2
|
case 139: // Host Identity Protocol Version v2
|
||||||
@@ -947,6 +946,11 @@ void proto_skip_ipv6(uint8_t **data, size_t *len, uint8_t *proto_type, uint8_t *
|
|||||||
case 44: // fragment. length fixed to 8, hdrlen field defined as reserved
|
case 44: // fragment. length fixed to 8, hdrlen field defined as reserved
|
||||||
hdrlen = 8;
|
hdrlen = 8;
|
||||||
break;
|
break;
|
||||||
|
case 51: // authentication
|
||||||
|
// special case. length in ah header is in 32-bit words minus 2
|
||||||
|
if (*len < 2) return; // error
|
||||||
|
hdrlen = 8 + ((*data)[1] << 2);
|
||||||
|
break;
|
||||||
case 59: // no next header
|
case 59: // no next header
|
||||||
return; // error
|
return; // error
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user