Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
labs
BIRD Internet Routing Daemon
Commits
bf97bd28
Commit
bf97bd28
authored
May 31, 1999
by
Pavel Machek
Browse files
Cleanup of warnings
parent
91c7c741
Changes
1
Hide whitespace changes
Inline
Side-by-side
proto/rip/auth.c
View file @
bf97bd28
...
...
@@ -50,21 +50,20 @@ rip_incoming_authentication( struct proto *p, struct rip_block_auth *block, stru
struct
password_item
*
head
;
struct
rip_md5_tail
*
tail
;
tail
=
(
char
*
)
packet
+
(
block
->
packetlen
-
sizeof
(
struct
rip_block_auth
));
tail
=
(
struct
rip_md5_tail
*
)
(
(
char
*
)
packet
+
(
block
->
packetlen
-
sizeof
(
struct
rip_block_auth
))
)
;
head
=
P_CF
->
passwords
;
while
(
head
)
{
if
(
head
->
id
==
block
->
keyid
)
{
struct
MD5Context
ctxt
;
int
i
;
char
md5sum_packet
[
16
];
char
md5sum_computed
[
16
];
memcpy
(
md5sum_packet
,
tail
->
md5
,
i
);
memcpy
(
md5sum_packet
,
tail
->
md5
,
16
);
password_strncpy
(
tail
->
md5
,
head
->
password
,
16
);
MD5Init
(
&
ctxt
);
MD5Update
(
&
ctxt
,
packet
,
block
->
packetlen
);
MD5Update
(
&
ctxt
,
(
char
*
)
packet
,
block
->
packetlen
);
MD5Final
(
md5sum_computed
,
&
ctxt
);
if
(
memcmp
(
md5sum_packet
,
md5sum_computed
,
16
))
...
...
Write
Preview
Supports
Markdown
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