Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arne Øslebø
mapi
Commits
b40d261f
Commit
b40d261f
authored
Sep 01, 2006
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/anonflib/anonymize.c
View file @
b40d261f
...
...
@@ -888,8 +888,13 @@ void apply_function_to_field(int function,int protocol,int field,unsigned char *
break
;
case
HASHED
:
//printf("I will call HASH for algorithm %d and padding %d\n",params->hash_algorithm,params->padding_behavior);
total_len
=
ntohs
(
packet
->
iph
->
ip_len
);
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
)
donotreplace
=
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment