Commit b40d261f authored by Stig Venaas's avatar Stig Venaas
Browse files

made HASHED work for IPv6

git-svn-id: file:///home/svn/mapi/trunk@874 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent 075799ad
......@@ -888,8 +888,13 @@ void apply_function_to_field(int function,int protocol,int field,unsigned char *
case HASHED:
//printf("I will call HASH for algorithm %d and padding %d\n",params->hash_algorithm,params->padding_behavior);
packet_end=((unsigned char *)(packet->iph))+total_len;
if (packet->iph) {
total_len = ntohs(packet->iph->ip_len);
packet_end = (unsigned char *)packet->iph + total_len;
} else { /* assume IPv6 when not IPv4 */
total_len = ntohs(packet->ip6h->ip6_plen) + IP6_HEADER_LEN;
packet_end = (unsigned char *)packet->ip6h + total_len;
int donotreplace=0;
if(field>=CHECKSUM && field<=CODE)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment