Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
babeld
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
babeld
Commits
a62b7c9b
Commit
a62b7c9b
authored
Jun 24, 2019
by
Etienne MARAIS
Committed by
Juliusz Chroboczek
Aug 05, 2019
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add no_hmac_verify flag.
Flag to allow empty or wrong hmac in the packet trailer.
parent
1544810a
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
11 deletions
+26
-11
babeld.man
babeld.man
+5
-0
configuration.c
configuration.c
+7
-0
interface.c
interface.c
+2
-1
interface.h
interface.h
+3
-0
message.c
message.c
+9
-10
No files found.
babeld.man
View file @
a62b7c9b
...
...
@@ -414,6 +414,11 @@ otherwise.
Send multiple copies of TLVs other than Hellos to all neighbours rather
than sending a single multicast packet. The default is false.
.TP
.BR no_hmac_verify " {" true | false }
Do not check packet signatures, accept unsigned or incorrectly signed packets
even if one or more keys are configured on the interface. The default is
.BR false .
.TP
.BR rfc6126\-compatible " {" true | false }
Disable some features that are incompatible with RFC 6126 (the older
version of the Babel protocol), such as source-specific routing and RTT
...
...
configuration.c
View file @
a62b7c9b
...
...
@@ -607,6 +607,12 @@ parse_anonymous_ifconf(int c, gnc_t gnc, void *closure,
if
(
c
<
-
1
)
goto
error
;
if_conf
->
unicast
=
v
;
}
else
if
(
strcmp
(
token
,
"no_hmac_verify"
)
==
0
)
{
int
v
;
c
=
getbool
(
c
,
&
v
,
gnc
,
closure
);
if
(
c
<
-
1
)
goto
error
;
if_conf
->
no_hmac_verify
=
v
;
}
else
if
(
strcmp
(
token
,
"link-quality"
)
==
0
)
{
int
v
;
c
=
getbool
(
c
,
&
v
,
gnc
,
closure
);
...
...
@@ -829,6 +835,7 @@ merge_ifconf(struct interface_conf *dest,
MERGE
(
lq
);
MERGE
(
faraway
);
MERGE
(
unicast
);
MERGE
(
no_hmac_verify
);
MERGE
(
channel
);
MERGE
(
enable_timestamps
);
MERGE
(
rfc6126
);
...
...
interface.c
View file @
a62b7c9b
...
...
@@ -396,7 +396,8 @@ interface_updown(struct interface *ifp, int up)
if
(
IF_CONF
(
ifp
,
unicast
)
==
CONFIG_YES
)
ifp
->
flags
|=
IF_UNICAST
;
if
(
IF_CONF
(
ifp
,
no_hmac_verify
)
==
CONFIG_YES
)
ifp
->
flags
|=
IF_NO_HMAC_VERIFY
;
if
(
IF_CONF
(
ifp
,
hello_interval
)
>
0
)
ifp
->
hello_interval
=
IF_CONF
(
ifp
,
hello_interval
);
else
if
(
type
==
IF_TYPE_WIRELESS
)
...
...
interface.h
View file @
a62b7c9b
...
...
@@ -53,6 +53,7 @@ struct interface_conf {
char
lq
;
char
faraway
;
char
unicast
;
char
no_hmac_verify
;
int
channel
;
int
enable_timestamps
;
int
rfc6126
;
...
...
@@ -84,6 +85,8 @@ struct interface_conf {
#define IF_TIMESTAMPS (1 << 6)
/* Remain compatible with RFC 6126. */
#define IF_RFC6126 (1 << 7)
/* Packets with a wrong or empty packet trailer are accepted */
#define IF_NO_HMAC_VERIFY (1 << 8)
/* Use Babel over DTLS on this interface. */
#define IF_DTLS (1 << 9)
...
...
message.c
View file @
a62b7c9b
...
...
@@ -586,9 +586,8 @@ parse_packet(const unsigned char *from, struct interface *ifp,
return
;
}
if
(
ifp
->
key
!=
NULL
)
{
if
(
check_hmac
(
packet
,
packetlen
,
bodylen
,
neigh
->
address
,
to
)
!=
1
)
{
if
(
ifp
->
key
!=
NULL
&&
!
(
ifp
->
flags
&
IF_NO_HMAC_VERIFY
))
{
if
(
check_hmac
(
packet
,
packetlen
,
bodylen
,
neigh
->
address
,
to
)
!=
1
)
{
fprintf
(
stderr
,
"Received wrong hmac.
\n
"
);
return
;
}
...
...
Julien Muchembled
@jm
mentioned in commit
378be94a
·
Sep 02, 2022
mentioned in commit
378be94a
mentioned in commit 378be94a13da35581312ad2f34dff8f585d0cd68
Toggle commit list
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